Emerald docs
Everything you need to use Emerald 2.2.2. For the full server reference see SERVER_SETUP.md on GitHub.
Getting started
- Download and install Emerald for your system. The download page shows what to click at the first-launch warning.
- On first launch Emerald asks how to start: an empty vault, import an existing folder, or open a vault from your server.
- Press Ctrl+N for a new note and start typing. Notes save by themselves about a second after you stop.
A short tour shows you around the first time. The search box sits at the top of the sidebar with New note and New folder below it. The bottom bar holds the vault switcher, the note count and the sync status. The gear opens Settings.
Vaults and importing
A vault is a folder of notes. The first one is Documents/Emerald. You can keep several, for example work and personal, and switch from the vault name in the bottom bar. Add one at any time from Settings › Vaults:
- Import a folder… Pick a folder you already have, such as an Obsidian vault. Emerald checks every file first and lists any it can’t sync, like names containing
? * : |or files over 64 MB. The folder stays where it is: nothing is moved or copied. With Upload to my sync server checked, it also becomes a vault on your server. - Open from server… Lists the vaults on your server and downloads the one you pick. Use this on your second computer.
- New vault… An empty vault, optionally synced as a new server vault.
Remove… in the vault list either takes a vault off the list (its folder stays) or, after you type its name, moves the folder to the system trash.
Coming from Obsidian
Import your Obsidian vault folder. Notes, folders, [[wiki links]], backlinks and tags carry over because they’re all plain Markdown. Plugins, canvas boards and embeds don’t. Dot-folders such as .obsidian are left out of sync. Obsidian can keep working on the same folder.
Writing and linking
- Name notes with paths such as
Projects/Ideasto put them in folders. Click a note’s title to rename it. - Type
[[to link to another note. Follow links from the links row above the editor, from Preview, or from the Linked from panel. - Ctrl+G shows the graph of how notes connect.
- Search matches titles, text and tags. Enter opens the first hit, Esc clears.
- Daily note opens today’s dated note.
- Right-click a note for Rename, Move to folder, Duplicate, Copy link, Reveal and Delete. Deleted notes go to the Trash, with ten seconds to undo.
- Put images and other files in the vault folder with your file manager. They sync too.
Shortcuts
On a Mac, use ⌘ wherever this page shows Ctrl.
| Keys | Action |
|---|---|
| Ctrl+N | New note, with the title selected |
| Ctrl+O or Ctrl+Shift+F | Search notes |
| Ctrl+P or Ctrl+K | Jump to a note or run a command |
| Ctrl+G | Graph view |
| Ctrl+W | Close the tab |
| Ctrl+S | Save and sync now |
| Ctrl+= / − / 0 | Zoom in, out, reset |
Sync
Sync is optional. There are two ways to have your notes on more than one computer:
- A folder you already sync. Import a folder inside OneDrive, iCloud Drive or Dropbox as your vault. Your cloud service copies the files. Fine when you use one computer at a time.
- The Emerald sync server. A small program on a machine you own. Changes arrive on other computers in about a second, and offline edits never overwrite each other. The setup guide gives you the exact commands.
With the server, connected computers sync when you press Ctrl+S, when you stop typing for three seconds, and when another program changes a file in the vault folder. One server can hold several vaults; they all share its token.
Conflicts and limits
If two computers edit the same note while offline, the remote version keeps the original name and your local edit gets a conflict filename. The bottom bar shows a conflict count. Settings › Sync lists each one with Compare…, which shows both side by side and lets you keep either or both. An edit always wins over a deletion made at the same time.
- Files up to 64 MiB each.
- Paths starting with a dot, and symlinks, are not synced.
- Use separate folders for client and server, and one server process per server folder.
- Sync is not a backup. Back up the server folder separately.
Updates
Emerald checks GitHub for a new release twice a day. Update now downloads the installer for your system, checks it against the release’s SHA256SUMS, installs it and reopens Emerald. Windows asks for permission and Linux for your password. Only the latest-release check is sent to GitHub; nothing about you or your notes. Turn the check off in Settings › About.
Where things are stored
| Notes | The vault folder, Documents/Emerald by default, as plain .md files. Run emerald --vault "/path" to use another folder. |
| Sync connection | One file per vault in your user configuration folder (%APPDATA%/Emerald on Windows), outside the vault. Or set EMERALD_SERVER, EMERALD_TOKEN and EMERALD_VAULT. |
| Vault list | app.json in the same configuration folder. |
| Sync state | .emerald-sync-*.json inside the vault. |
Agent API
An AI agent or script can use the sync server as memory it shares with you. Every request sends Authorization: Bearer <token>. Files of a named vault live under /vaults/<name> (URL-encoded, so AI Memory becomes AI%20Memory); the main vault has no prefix. Named vaults need Emerald Server 2.1 or later.
| Request | What it does |
|---|---|
GET /files | JSON object of every path and its SHA-256 |
GET /file?name=<path> | The note’s raw bytes |
PUT /file?name=<path>&base= | Create a note; the body is the whole file |
PUT /file?name=<path>&base=<hash> | Update, giving the hash of the version you read |
DELETE /file?name=<path>&base=<hash> | Delete that version |
GET /changes?after=<token> | Waits up to about 25 seconds for a change (Server 2.2+) |
GET /vaults · PUT /vaults/<name> | List vaults, create one (on the server root) |
Changes return 204. 409 means someone else changed the note: read it again and reapply your edit. 400 is a bad path or missing file, 401 a wrong token.
curl -X PUT -H "Authorization: Bearer $EMERALD_TOKEN" "$EMERALD_SERVER/vaults/AI%20Memory"
curl -H "Authorization: Bearer $EMERALD_TOKEN" "$EMERALD_SERVER/vaults/AI%20Memory/files"
curl -H "Authorization: Bearer $EMERALD_TOKEN" "$EMERALD_SERVER/vaults/AI%20Memory/file?name=notes/today.md"
curl -X PUT -H "Authorization: Bearer $EMERALD_TOKEN" --data-binary @today.md \
"$EMERALD_SERVER/vaults/AI%20Memory/file?name=notes/today.md&base="
Instructions written for agents themselves are in AGENTS.md.
Build from source
You need stable Rust from rustup.rs.
git clone https://github.com/Galitube-Developement/Emerald.git
cd Emerald
cargo run --locked --release --bin emerald # the notebook
cargo run --locked --release --bin emerald-server -- --folder ./server-vault
To install only the server on a machine without the release packages, for example a Raspberry Pi: cargo install --locked --git https://github.com/Galitube-Developement/Emerald --bin emerald-server. Packaging scripts for MSI, DMG, .deb and Flatpak are in packaging/.
FAQ
Is there a phone app?
Not yet. Emerald runs on Windows, macOS and Linux.
Do I need the sync server?
No. Emerald works fully on one computer. For several computers you can also use a folder that OneDrive, iCloud or Dropbox already syncs.
Why does my computer warn me when I open it?
The installers aren’t code-signed yet. The download page shows the clicks to get past the warning, and how to check the file against its checksum.
Are my notes encrypted?
Notes are plain files on your computer and on your server. Use HTTPS (Tailscale or Caddy) between them. End-to-end encryption is not included yet.
Does Emerald send anything about me?
No. There’s no account and no telemetry. The only outside request is the update check to GitHub, which you can turn off.