HomeUser guide

User Guide

Mahfouz is a cross-platform Markdown PKM (personal knowledge management) app. Your notes are plain Markdown files in a folder that is also a git repository — the repo is the source of truth; Mahfouz’s local database is just a rebuildable index on top of it. This guide covers every feature currently in the app.

Mahfouz needs git. If it can’t find a usable git when it starts, it offers to install its own copy, or shows how to install git yourself. See Git.

Menu → Help → Keyboard Shortcuts (Cmd/Ctrl+/) opens a quick-reference shortcut cheat sheet inside the app. This document is the long-form manual.


Vaults

A vault is a folder on disk containing your notes, and (usually) a git repository. Mahfouz doesn’t create a vault for you on first launch — use File → Open Vault… (Cmd/Ctrl+O) to point it at an existing folder or an empty one you want to turn into a vault.

You can have multiple vaults open at once. Each appears as its own collapsible section at the top of the Sidebar’s Notes view, showing either the connected repo’s owner/repo name (with a cloud icon) or the local folder name (with a computer icon) if it isn’t connected to a remote yet. Click a vault section’s gear/⋯ button to open Vault Settings for that vault specifically (see Git sync & remotes and Git LFS below), including:


Notes & organization

Every note is a single Markdown file, <note-id>.md, at the vault root. The moment a note gets its first child it becomes a folder of the same name holding its own file (<note-id>/<note-id>.md) and its children (<note-id>/<child-id>.md, nesting the same way). Once a note has a folder it keeps it. You never see these paths day to day — the Sidebar presents them as a normal expandable tree. Vaults created before this layout are offered a one-time migration on open; declining keeps the older one-folder-per-note shape, which still works.


The editor

Mahfouz’s editor is CodeMirror 6 in live-preview source mode — you’re always editing real Markdown text, but certain syntax renders visually (checkboxes, bullets, highlights, tags, wikilinks, media) as you type, rather than showing raw symbols.

There are two independent view modes for how much raw syntax stays visible, switched with the toolbar’s Show source button (persisted per-device, not per-note):

Other editor behavior:


Markdown syntax reference

Everything below is plain Markdown (GFM-flavored) that Mahfouz recognizes and renders specially:

| Syntax | Result | |—|—| | # , ## , ### (up to 6) | Heading levels 1–6 | | **bold** | Bold | | _italic_ | Italic | | ~~strikethrough~~ | Strikethrough | | `inline code` | Inline code | | ==highlight== | Highlighted text | | ~sub~ | Subscript | | ^sup^ | Superscript | | - , * , + at line start | Bullet list | | 1. at line start | Ordered list (auto-renumbered) | | [ ] , [x] , [] at line start | Checkbox (click to toggle) | | > at line start | Blockquote | | --- on its own line | Horizontal rule and a page/slide break (see Presenting) | | fenced block | Code block, styled distinctly from prose | | text | Link | | https://example.com | Bare autolink (what pasting a URL produces) | | [[Note Title]] | Wikilink to another note by title | | #tag | Tag (indexed, filterable in the Sidebar) | | alt alone on a line | Embedded image/video/audio, auto-detected from the file extension | | GFM pipe table (| a | b | rows with a — separator row) | Interactive table in Preview mode | | YAML frontmatter (— fenced block at the very top) | Note metadata — id, bookmarked, external_images`, and any custom attributes you add |

Tables

Insert one via the toolbar’s Table button (a hover grid, minimum 8×8, that grows as you approach its edge — pick rows × columns, it shows the size as you hover). In Preview mode a table is always a live, editable grid instead of raw pipe syntax:


The formatting toolbar

The toolbar above the editor, left to right:

Right-aligned at the end of the toolbar:

A plugin that registers toolbar items (such as draw.io’s New diagram or Mermaid’s Insert diagram) adds its own buttons at the right end of the toolbar, after Attributes and just before ⋯ (More), but only while the plugin is enabled. A toolbar button with a keyboard shortcut can be rebound or turned off in .config/settings.md under ## Shortcuts, the same way as a plugin command (see Presenting notes as slides for an example). Plugin tabs and the Preferences → Plugins list both show each plugin’s icon.

All toggle-style formatting (bold, italic, lists, headings, blockquote, etc.) is a smart toggle: applying it again removes it, and applying a different list type to a line that already has one converts it in place rather than stacking markers.


Media, images & attachments



Tags

Any # immediately followed by a letter (and not inside code) is a tag — #project, #ideas, etc. Tags are indexed automatically:


Cmd/Ctrl+K opens the search overlay — searches across all open vaults as you type (debounced), matching title and body text with multi-term AND matching, ranked roughly: exact title match, then title-starts-with, then title contains all terms, then title contains the whole phrase, then body-only matches. Matched terms are highlighted in the title and a generated snippet. With an empty query it shows your 8 most recently edited notes instead. Navigate results with ↑/↓ (or Ctrl+P/Ctrl+N), Home/End, and open with Enter.


Table of contents & page preview

Two right/left-hand panels, both driven by the editor’s current scroll position (“whichever section is at the top of the viewport is active”):


Note pills & the right sidebar

A row of pills sits at the right end of the note’s path, above the text:

Clicking a pill opens the right sidebar on that section. While the sidebar is open, the pills move into the top of it and turn sections on and off there; a highlighted pill means its section is showing. Turning off the last section closes the sidebar, and opening it again from the toolbar (or Mod+Shift+\) shows every section.

The sidebar’s sections, in order:


Attributes panel

Attributes Mahfouz understands get a matching control; everything else is a free-form row. Both round-trip straight to the note’s YAML frontmatter, so they’re visible and hand-editable outside the app too.

The panel shows in two places: as a block in the document under the note’s first heading, and as a right-sidebar section (open it with the attributes pill — see Note pills).

The read-only Created, Updated and Path rows live in the sidebar’s Details section; the block in the document shows them only if you’ve chosen to there.


History & trash

Mahfouz has no separate undo-history database — history is git history.

Auto-commit and disk-only notes

By default every note auto-commits, as above. If you’d rather keep a note’s work-in-progress out of history, turn its auto-commit off. The note is then disk only: it still saves to disk as you type, but Mahfouz never commits it on its own, so it isn’t pushed or shared until you say so.

Limits worth knowing:


Presenting notes as slides

Any note can be shown as a Slidev deck — every bare --- line is a slide break (a note with none is a one-slide deck).

Slides templates

A template gives your decks a look — background color or image, text and accent colors, a font, a logo, a footer — for both Present and PDF export.


Git

Mahfouz needs git 2.20 or newer. If your machine has one, Mahfouz uses it and installs nothing. On a Mac, the stub at /usr/bin/git only counts once the Command Line Tools are installed. The Linux .deb and .rpm packages install git as a dependency, so on Linux the screen below mostly matters for the AppImage.

When Mahfouz finds no usable git at startup, it shows a Git is required screen instead of opening your vaults:

Mahfouz’s own copy:

To see which git is in use, open About Mahfouz: it shows the git version and whether it’s the system’s or Mahfouz’s own.


Git sync & remotes

Vault Settings → Vault section:


Git LFS for large media

If a vault will hold large media files, turn on Git LFS for it in Vault Settings → Vault: it shows whether git-lfs is installed and configured for this vault, and an Enable Git LFS for media button that runs git lfs install --local and writes a tracking block to .gitattributes for you. This is opt-in per vault, and only affects files added after you enable it — existing committed media isn’t migrated retroactively.

git-lfs itself doesn’t need to be installed separately: turn on the Git LFS plugin in Preferences → Plugins and Mahfouz downloads and manages it for you (no Homebrew required — currently Macs only, Apple Silicon or Intel). If you already have git-lfs on your system PATH (e.g. via Homebrew), Mahfouz detects and uses that instead.


Plugins & registries

Preferences → Plugins lists every plugin, grouped by the registry it comes from. A registry is a git repository of plugins, much like a Homebrew tap. mahfouz (github.com/mahfouz-app/plugins) is built in, and you can add others under Registries → Add a registry with a git URL or a GitHub owner/repo.

The built-in mahfouz registry has:


Fields (!name)

Type ! followed by letters anywhere in a note to trigger autocomplete over your custom fields. Selecting one inserts it in place, once, as fixed text. Comes seeded with !today, !now, !time, !iso, !uuid, !title, !page, !total.

Manage them in Vault Settings → Fields — an editable table of Field / Expansion / Description rows. Expansions support these tokens:

Token Expands to
{date:FMT} Current date/time, using YYYY, MM, DD, HH, mm, ss — e.g. {date:YYYY-MM-DD}
{iso} Current timestamp as an ISO 8601 string
{uuid} A random UUID
{title} The note’s title

Anything else in the expansion passes through as literal text. This lives in the vault as .config/fields.md, a plain Markdown table you can also hand-edit directly.

Fields also work in a slides template’s header or footer (Vault Settings → Slides), or a note’s header / footer attribute, where — unlike in the editor — they’re evaluated fresh every time the note is presented or exported, so {date:YYYY-MM-DD} and friends stay current. Two extra tokens, {page} and {total}, are available only there (headers and footers).


Notifications

Everything Mahfouz has to tell you — exports, plugin installs and updates, errors saving or syncing — collects in the notification center. Open it with the bell button at the right end of the titlebar, next to the AI chat button.

Sounds, system notifications and quiet time

Settings → Notifications controls how notifications interrupt you:

Do not disturb, the moon button in the notification center’s header, silences everything for an hour, until tomorrow morning, or until you turn it off. It applies to this computer only.

New versions of Mahfouz

When a new version of Mahfouz is released, a notification tells you which version is out and which one you have. What’s new opens the release notes; Download opens the installer where one is available for your platform. Mahfouz doesn’t install anything itself.


Settings

Settings… (Cmd/Ctrl+,, or menu Mahfouz → Settings…) — applies instantly and is stored in .config/settings.md (a plain Markdown file you can hand-edit):

Setting Options Default
Tab size 2 or 4 spaces 4
Color mode System / Light / Dark System
Font Serif / Monospace Serif
Line numbers Shown / Hidden Hidden

Sidebar sort order (alphabetical vs. chronological) is also a persisted preference, toggled from the Sidebar header.

Keyboard shortcuts are also stored in .config/settings.md (see below) — edit the file directly to remap or disable one; blank a binding to disable it.


Keyboard shortcuts reference

Remappable app shortcuts (.config/settings.md, ## Shortcuts table). Mod = ⌘ on macOS, Ctrl elsewhere:

Shortcut Action
Mod+N New note (sibling of selection)
Mod+Alt+Shift+N New note (child of selection)
Mod+Alt+N New note (parent level)
Mod+/ Open keyboard shortcuts help
Mod+W Close active tab
Mod+S Manual save + commit
Mod+\ Toggle left sidebar
Mod+Shift+\ Toggle right sidebar
Mod+1 Go to all notes
Mod+2 Go to bookmarks
Mod+3 Go to tags
Mod+4 Go to trash
Mod+5 Go to search
— Toggle auto-commit for note (no default key)
Mod+Shift+R Reveal the active note in Finder / File Explorer (row reveal_in_file_manager; an older reveal_in_finder row still works and is renamed on the next write)
Mod+Shift+P Present active note as slides (a plugin command: its row is mahfouz/slidev:present-fullscreen)

Fixed editor shortcuts (not remappable):

Shortcut Action
Mod+B Bold
Mod+I Italic
Mod+Shift+X Strikethrough
Mod+E Inline code
Mod+, (comma) Subscript
Mod+. (period) Superscript
Mod+Shift+H Highlight
Mod+Shift+K Insert link
Mod+Alt+1 / 2 / 3 Heading 1 / 2 / 3
Mod+Shift+8 Bullet list
Mod+Shift+7 Ordered list
Mod+Shift+9 Checklist
Mod+Shift+. Blockquote
Mod+Shift+M Insert media or file

Other useful bindings: Tab/Enter inside a checklist or list continue it; Cmd/Ctrl+Click opens a link or wikilink; [[ triggers wikilink autocomplete; ! triggers field autocomplete.

Native menu-only shortcuts (macOS): Cmd+Shift+N New Vault, Cmd+Shift+O Open Vault, Cmd+F Find and Replace, Cmd+Shift+L toggle line numbers.


Status bar

The footer, left to right:


Tabs

Notes open in a browser-style tab strip: click a tab to switch, click its × (or middle-click) to close, right-click for a context menu. Cmd/Ctrl+click (or middle-click) a Sidebar row to open it in a new tab without switching away from your current one. History revisions and Present-as-tab both open as their own read-only/embedded tabs alongside your regular notes.


Sending feedback

Click the speech-bubble button near the bottom of the left rail, or choose Help → Send Feedback…, to report a bug, suggest an idea, or ask a question. Pick a kind, give it a title and some details, and press Submit.

Feedback becomes a public issue on mahfouz-app/docs. If you’re signed in to GitHub (Vault settings → Collaborators), it’s filed under your account, so you’ll get replies there. Otherwise, the Mahfouz feedback bot files it for you; add a way to reach you in the details if you’d like a reply. Once it’s filed, the dialog links to the new issue.

Include diagnostics (on by default) appends the app version, operating system and CPU architecture, and nothing else. Nothing from your vault or notes is ever sent. Expand What’s included to see the exact lines, or untick the box to leave them out.