Spec 010 — Quickstart
中文版: quickstart.zh.md
Keep one Coffer vault in sync across your machines using a git repo you own. The master key never travels through git; you bring it to each new machine once, out-of-band.
1. Create a remote you own
Make an empty private repository (GitHub, GitLab, or self-hosted), e.g. git@github.com:you/coffer-vault.git. Coffer uses your normal git credentials (SSH key or token) — the same ones git push already uses.
2. Initialise sync on machine A
coffer sync init git@github.com:you/coffer-vault.gitThis creates the sync workspace (~/.coffer/sync/), records the remote, and does a first sync run. Check it:
coffer sync status # -> clean, last sync <time>3. Bring the master key to machine B (out-of-band)
On machine A:
coffer sync key export ~/coffer-master.keyMove that file to machine B over a channel you trust (USB, password manager, secure copy) — not through the sync repo. On machine B:
coffer sync key import ~/coffer-master.key4. Pull the vault on machine B
coffer sync init git@github.com:you/coffer-vault.git
coffer sync status # -> clean; credentials decrypt because the key is presentMachine B now has the same knowledge, memory, registered resources, and credentials.
If you skip step 3, sync still works but credentials stay locked:
coffer sync statuslists them undercredentials_locked, and resources that need them won't spawn until you import the key.
5. Day-to-day
coffer sync # export -> pull -> (if clean) push -> importRun it whenever you switch machines. Or turn on hands-off mode:
coffer sync config --auto on --interval 300With auto-sync, the daemon pushes your changes (debounced) and pulls others on the interval — no manual command.
Seeing your machines
coffer sync machines # every machine attached to the vault
coffer sync machines --rename studio # rename this machineEach machine registers itself (name, platform, last sync) when it syncs; the list also appears in the desktop Sync panel.
Conflicts resolve themselves
If you edited the same resource/file on two machines before syncing, the run auto-resolves each conflicted path to the most recently synced edit and completes — no manual step. (With auto-sync on both machines, "most recently synced" and "newer" coincide.) In the rare case the engine cannot settle a path, the run parks in conflicted and the UI points you at your own repository (e.g. GitHub); the CLI escape hatch still works:
coffer sync status # -> conflicted, lists the paths (rare)
coffer sync resolve --theirs resources/mcp_server/confluence.yaml # or --ours, or edit then --resolved
coffer sync # completesREST / Desktop
Everything above is also available over /api/v1/sync/* and in the desktop Sync settings panel (configure remote — validated on save, toggle auto-sync, see status with actionable error hints, trigger a run, compare master-key fingerprints across machines).