Advanced
Bring it up
anagraphe start runs anagraphe up for you. Run anagraphe up by hand to
name your first project without a prompt, or to start Anagraphe again after
anagraphe down.
anagraphe up --project your_project
How the first project gets its name:
- With
--project <name>,upwrites the name into~/.anagraphe/bundle/.envfor you. - Without
--project, on the first run,upasks for a name. It suggests your current folder's name when that is a valid name.
- If it cannot ask (for example, Claude Code ran it), it stops. See
no project name givenunder If something goes wrong. - Once a store exists, a different
--projectis refused.
To change the name later, use anagraphe project rename.
On the first run, up also:
- Makes random passwords for the store in
~/.anagraphe/bundle/.state. Never share that folder. - Starts Anagraphe and waits until it is healthy.
- Loads your project's vocab.
- Creates an MCP access token called
defaultand connects Claude Code to it.
If claude is not installed, registering fails, or you ran up as root or
with sudo, step 4 prints the token and a claude mcp add command for you to run
instead. Treat that printed token like a password.
Running anagraphe up again is safe. It keeps your passwords and your
default token.
If up stopped after it created the default token, that token is lost.
From ~/.anagraphe/bundle, run docker compose exec engine anagraphe token revoke default,
then run anagraphe up again.
Details
These are the details behind the Get started steps.
- The installer puts Anagraphe in
~/.anagrapheand theanagraphecommand in~/.local/bin. It checks the download's checksum and pins the exact Anagraphe images. It starts nothing. - Keep your projects outside
~/.anagraphe. Commands that write files refuse to run there, and in your home folder. - If
~/.local/binis not on your PATH, the installer adds it to~/.profile, and to~/.bashrcand~/.zshrcif you have them. That takes effect in a new terminal.
anagraphe starttakes no arguments except-v, which shows every step. It runsanagraphe up, then sets up the project in this folder, then checks that Claude Code is connected.startrefuses to run in your home folder, in~/.anagraphe, or in/.
- In your first project's folder,
startsets that project up again. In every other folder it asks you to name the project.
If the anagraphe MCP server isn't registered with Claude Code, start
stops. See Claude Code is not connected to anagraphe under
If something goes wrong.
The new token that fix makes replaces the old one for every other tool that
used it, too (see "MCP access token").
Upgrading
How to move to a newer release, and how to go back if you need to.
To update, run anagraphe update. See
Updates and backups.
If anagraphe update is an unknown command, your release is too old to have
it. Run the installer again instead:
curl -q -fsSL --proto '=https' --proto-redir '=https' --tlsv1.2 https://get.anagraphe.ai/latest/install.sh | sh && anagraphe up
When a new release changes how your data is stored, anagraphe up:
- Lists the changes and asks you to agree.
- Stops Anagraphe.
- Saves a copy of your database to
~/.anagraphe/bundle/.state/pre-upgrade/<UTC timestamp>.dump. - Applies the changes and starts Anagraphe again.
If nobody can answer (for example, Claude Code or a script ran it), up
changes nothing and stops. To agree up front:
anagraphe up --yes
anagraphe up, start and doctor print one line when a newer release
exists. The check sends nothing about you or your store. To turn that line
off, export ANAGRAPHE_NO_UPDATE_CHECK=1 in your shell. To also silence the
notice Claude gets from the engine, add ANAGRAPHE_NO_UPDATE_CHECK=1 to
~/.anagraphe/bundle/.env, then run anagraphe up.
An engine that is signed in learns of new releases through its licence check-in, with no extra connection, and Claude tells you once per session.
Upgrading from a release that used Memgraph. anagraphe up cleans up
the old settings and container for you. If the engine then refuses to start
and names an MG_ setting, run the new installer and anagraphe up again.
To free the space the old graph data uses, find it with
docker volume ls --filter name=mgdata and delete it with docker volume rm.
A database from another PostgreSQL version. Each release runs one
PostgreSQL version. If your data was made by another one, anagraphe up
stops before starting the database, changes nothing and names both
versions. Do not delete the Docker volume it names: it holds your data.
Write to info@anagraphe.ai, naming that volume, to move your data.
Projects renamed before v1.11.0. On the first engine start after the
upgrade, Anagraphe rebuilds any project whose entry ids drifted after a
rename from its own history, by itself. anagraphe check id-drift then
exits 0.
Going back. If saving the copy fails, nothing is changed and Anagraphe
stays stopped; the message tells you whether
docker start anagraphe-adopter-engine restarts the old release safely.
Do not restore in that case: your data was never touched.
If the database update itself fails, put the saved copy back (the newest one, or name a file from that folder):
anagraphe restore --pre-upgrade
It shows when the copy was made, because anything added after that is lost.
It asks you to type restore, or takes --yes. It first saves your current
data to ~/.anagraphe/bundle/.state/pre-restore/, and afterwards prints the
command that undoes the restore. Nothing deletes those copies; delete old
ones yourself when you no longer need them. Then it replaces all your data
with the copy. While the update is still waiting, Anagraphe stays stopped.
To try the update again, run anagraphe up --yes. To stay on the previous
release instead, install it by its version number, then start it. The
previous version is the one anagraphe update named in its
(you had vX.Y.Z) line; for example, for v1.0.6:
curl -q -fsSL --proto '=https' --proto-redir '=https' --tlsv1.2 https://get.anagraphe.ai/v1.0.6/install.sh | sh && anagraphe up
MCP access token
Claude Code reaches your store with an access token. This section covers creating, listing and replacing tokens.
Every MCP token on this stack can reach every project on it. Claude Code in
a project folder works on that folder's project, because anagraphe start
writes the project's name into that folder's .mcp.json; open the other
folder to read another project. A call that names a different project is
refused with project_not_authorized. This keeps work in the right project;
it is not a wall between projects: anything that can read your access keys or
run anagraphe on this computer can reach every project.
anagraphe up creates the default token. anagraphe start creates a
project-… token for each project and saves it in
~/.anagraphe/mcp-tokens/. To replace a project's token, run
anagraphe onboard --name <project> in its folder, then reopen Claude Code
there. See "How Claude Code finds your project".
Run the docker compose commands below from the bundle folder:
cd ~/.anagraphe/bundle
To give another tool its own token:
docker compose exec engine anagraphe token create --name <client-name>
It prints only the token. Give your other MCP client the address
http://127.0.0.1:8000/mcp (or the MCP_PORT you set in .env) and two
headers: Authorization: Bearer <token> and X-Anagraphe-Project: <project>.
docker compose exec engine anagraphe token listshows each token's name and whether it is live.
docker compose exec engine anagraphe token revoke <name>stops a token at once. You can reuse the name afterwards.
To replace the default token:
- Run
anagraphe up --rotate-mcp-token. It revokes the old token, makes a new one and connects Claude Code to it. - Reopen Claude Code.
Other tools that used the old token stop working until you give them the new one.
- It replaces your user-wide
anagrapheentry in Claude Code, even one you pointed elsewhere on purpose.
- It does not touch an
anagrapheentry you added by hand to one folder. Remove that one yourself.
- It does not touch the project tokens. The
.mcp.jsonentriesanagraphe startwrites use them and keep working.
Connect Codex, Cursor, Gemini CLI or Windsurf
Anagraphe is optimised for Claude Code. Support for Codex, Cursor, Gemini
CLI, Windsurf and other MCP clients is in beta: they get the MCP tools and
the usage rules (from the server or the AGENTS.md block below), but not
the skills, subagents and rules that anagraphe start puts in .claude/,
which only Claude Code reads. The claim-drift judge (anagraphe judge run)
needs Claude Code installed and logged in on this computer, whichever tool
you use day to day.
Create a token for the tool as above. Put it in the environment variable
ANAGRAPHE_MCP_TOKEN of the shell that starts the tool; the snippets below
read it from there, so start the tool from that shell (for example
cursor .); an editor opened from a desktop launcher may not see the
variable and then sends an empty token. They use the default address:
change 8000 if you set MCP_PORT. Replace <project> with the name of
the project the tool works on.
The X-Anagraphe-Project header tells Anagraphe which project a tool works
on. If your Anagraphe has more than one project, it refuses tool calls
without that header, except licence sign-in, with project_not_authorized,
and the message names the header. With only one project, a tool without the header works on that
project.
Cloud-hosted agents run on someone else's machine and cannot reach
127.0.0.1 on yours.
Codex, in ~/.codex/config.toml:
[mcp_servers.anagraphe]
url = "http://127.0.0.1:8000/mcp"
bearer_token_env_var = "ANAGRAPHE_MCP_TOKEN"
http_headers = { "X-Anagraphe-Project" = "<project>" }
Cursor, in ~/.cursor/mcp.json (or .cursor/mcp.json in the project):
{
"mcpServers": {
"anagraphe": {
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"Authorization": "Bearer ${env:ANAGRAPHE_MCP_TOKEN}",
"X-Anagraphe-Project": "<project>"
}
}
}
}
Windsurf, in its mcp_config.json (its current docs place it at
~/.config/devin/mcp_config.json; check which file your version reads):
{
"mcpServers": {
"anagraphe": {
"serverUrl": "http://127.0.0.1:8000/mcp",
"headers": {
"Authorization": "Bearer ${env:ANAGRAPHE_MCP_TOKEN}",
"X-Anagraphe-Project": "<project>"
}
}
}
}
Gemini CLI, in ~/.gemini/settings.json. Use httpUrl; url is a
different transport:
{
"mcpServers": {
"anagraphe": {
"httpUrl": "http://127.0.0.1:8000/mcp",
"headers": {
"Authorization": "Bearer ${ANAGRAPHE_MCP_TOKEN}",
"X-Anagraphe-Project": "<project>"
}
}
}
}
Gemini CLI's settings reference says string values in settings.json may
use ${VAR}, but its MCP page shows that only for the env block. If your
version sends the header with a literal ${...}, put the token itself in
the header instead. It then sits in that file in plain text: restrict the
file with chmod 600 ~/.gemini/settings.json and keep it out of version
control.
The server sends its usage rules to every tool when it connects. Codex and
Gemini CLI use them. Cursor and Windsurf may ignore the server's rules; the
AGENTS.md block below covers it. Paste it into AGENTS.md at your
project's root:
anagraphe is this project's planning store. Architecture, decisions, workflows, lessons, cross-references and tasks live here, not in markdown files: read the store before answering questions about them. Change it only through its write tools: event_append (dry_run first, then commit), task_set_status for a task's status, reconcile for a finding on an existing node. Exported files are regenerated; never edit them. After a write, pass await_event_id=<returned id> to the next read.
Tasks and todos are task nodes in the store, not local lists. Put a finding on the ticket you are working or file it as a linked child; never leave a node with no edges. When you change a figure on a node, run referrers and fix the nodes that cite it in the same turn.
Recall: combine tag_query and referrers with vector_search. If vector_search returns license_required, say the recall was structural only.
Engine bugs: report_bug previews a scrubbed report. Show it to the user verbatim and call report_bug_send only on their explicit yes.
Licence sign-in: call license_login_start, show its verification_uri and user_code exactly as returned, never invent, reconstruct or edit the URL or code, then call license_login_status.
If bootstrap or system_health returns update_available, tell the user its summary once per session; never upgrade for them.
The store holds a newer vocab than your file
anagraphe doctor reports this when the store's vocab is a newer version
than the vocab.yaml you gave it. There is nothing to apply. Find the
newer vocab.yaml and, from the folder that holds it, run
anagraphe doctor --vocab-path vocab.yaml.
Don't edit the older file to match unless you know what the newer one
contained.
Onboard your project
anagraphe start onboards the project in the current folder: your first
project, or a new one (see
Add another project):
anagraphe start
start writes your project's files into the current folder, registers
the project in the store, loads its vocab and connects Claude Code to it.
- A new project gets the default setup, unless the folder has an
anagraphe-answers.yaml(what the interview writes; see "Customizing your project").onboardasks before it uses an answers file it was not given.
- In a new folder,
startasks for a name. A name other than your first project's adds a new project. It counts toward your plan's limit until you remove it (see "Remove or rename a project" on Using Anagraphe). - Before it creates a new project,
onboardasks you to confirm. It also asks before it connects a folder to a project that already exists (the folder's files say it holds that project), and before it uses ananagraphe-answers.yamlit was not given with--file.--yesskips these questions.startnever passes--yes. In a script, useonboard --name <name> --yes. onboardrefuses a project that already exists when this folder does not hold it (novocab.yamlor planning skill of that project here), because it would replace that project's vocab. It shows the command for a new project named after the folder instead.- If this folder's git repository still has the old Claude Code connection
for another project,
onboardstops before it writes anything and shows the command to run first. - Names starting with
test_or_are refused.
If the folder has an anagraphe-answers.yaml, onboard asks before it uses it,
because a cloned repository can carry one. Naming it with --file (or --yes)
is your confirmation:
anagraphe onboard --name your_project --file anagraphe-answers.yaml
To keep working on a project that is already set up, run
anagraphe onboard --name <it> without --file; it keeps its vocab.yaml
(see "Change the vocab later").
Details
start onboards a project the same way as onboard: with the
folder's anagraphe-answers.yaml if there is one, else with the default
setup. It asks before using an answers file it did not write. You can customise the vocab later; see "Customizing your
project".
How Claude Code finds your project
anagraphe start (and onboard) writes an anagraphe entry into
.mcp.json in the project's folder. Claude Code reads .mcp.json in the
folder you open it in and in every folder above it, and uses the closest
one. So Claude Code in any subfolder of a project's folder works on that
project. It goes by the real folder: a symlink that leads out of the
project's folder leaves the project too.
For a project named my-app, the entry looks like this:
{
"mcpServers": {
"anagraphe": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"X-Anagraphe-Project": "my-app"
},
"headersHelper": "anagraphe mcp-headers my-app"
}
}
}
The entry holds no secret, so you can commit .mcp.json. The project's
access key is in ~/.anagraphe/mcp-tokens/, in a file only you can read.
When Claude Code starts the server, it runs anagraphe mcp-headers my-app,
which reads that file and gives Claude Code the key.
Approve the server. The first time you open Claude Code in the folder,
it asks New MCP server found in this project: anagraphe. Choose
Use this MCP server. Claude Code keeps your answer in
.claude/settings.local.json, not in ~/.claude.json. Until you approve,
or if you chose Continue without using this MCP server, Claude Code there
uses your user-wide anagraphe entry, which names no project. With more
than one project, its calls are then refused with project_not_authorized.
claude mcp list does not show whether you approved the server; run
anagraphe doctor in the folder instead. To answer again, run
claude mcp reset-project-choices in the folder, reopen Claude Code there
and approve the server.
Trust, and claude -p. Claude Code runs anagraphe mcp-headers only in
a folder you have trusted, through the prompt it shows the first time you
open it there. claude -p never shows that prompt. In a folder you never
trusted, it connects without the key and is refused, and Claude Code prints
headersHelper not run. Open claude once in that folder (in a git
repository, in its main folder), accept the prompt, then run claude -p
again.
anagraphe must be on Claude Code's PATH. Claude Code runs
anagraphe mcp-headers with its own PATH. If it cannot find anagraphe,
it connects without the key and is refused. Start Claude Code from a
terminal where anagraphe --help works, or run the install command again.
The address check. anagraphe mcp-headers gives the key only to the
address saved with it. That catches an entry still pointing at an old port.
It does not stop a .mcp.json written to steal the key: Claude Code's trust
prompt and server approval do that, so approve only servers in folders you
trust. If you change MCP_PORT, run anagraphe onboard --name <project>
in each project's folder.
A project inside another project's folder. A folder inside a project's
folder already works on that project, so anagraphe start there stops:
Run this:
cd /home/you/my-app && anagraphe start
anagraphe: NOT done: this folder is inside project my-app's folder; Claude Code here already uses my-app. To make a separate project here anyway, run: anagraphe onboard --name <new name>
anagraphe onboard --name <new name> in the inner folder makes a separate
project with its own .mcp.json, and the closer one wins. An inner
project's folder without its own .mcp.json entry is refused rather than
given the outer project; run anagraphe onboard --name <inner project>
there.
Git worktrees. A worktree made with git worktree add is usually not
inside the main folder, so Claude Code there only finds .mcp.json if the
worktree has its own copy. Commit .mcp.json, or, if the
worktree has the project's vocab.yaml, run
anagraphe onboard --name <project> in the worktree. Claude Code keeps
trust and server approval for every worktree under the repository's main
folder: approve the server there. Approving it only inside a worktree has
no effect.
A local entry wins. An anagraphe entry added with
claude mcp add --scope local beats .mcp.json in that folder. Older
releases connected projects that way. anagraphe onboard removes the old
entry for its own project.
Check a folder. In the folder, run anagraphe doctor. Its lines that
start with Folder connection: show which .mcp.json Claude Code uses
there, whether the project's access key is in place, and whether you
trusted the folder and approved the server. For example, in a project's
folder:
Folder connection: /home/you/my-app/.mcp.json uses project my-app (http://127.0.0.1:8000/mcp).
and outside any project:
Folder connection: this folder is not inside any project; sessions here use the default connection.
A line with NOT OK is followed by what to do: a Run this: block with the
command alone, or a Fix: line when there is no single command to paste. doctor
then ends with NOT done and exits 1. A line with WARN
means doctor could not find out, for example
Folder connection: WARN: could not check whether Claude Code allows the anagraphe server here (no approval found; managed or --settings sources are not read).
The Folder connection: lines only read files; doctor does not start
the server.
Moving from the old connection. Releases before this one kept each
project's connection in Claude Code's own settings for that folder. After
anagraphe update, anagraphe up and anagraphe start print a line for
each project still connected that way:
anagraphe: project my-app still uses the old Claude Code connection.
Run this:
cd /home/you/my-app && anagraphe onboard --name my-app
When Anagraphe cannot tell which folder the old connection belongs to, the
line above Run this: reads In its folder: and the command is the
anagraphe onboard --name <project> command alone.
- For each such project, run the command the message shows.
If one project's folder is inside another's, do the inner one first.
onboardreplaces the project's token, writes.mcp.jsonand removes the old connection. It printsanagraphe: Claude Code asks once whether to use the anagraphe server in .mcp.json: approve it. - Reopen Claude Code in that folder and approve the
anagrapheserver.
Running onboard again is safe: your project's entries and history stay as
they are.
Who can change your vocab
Only anagraphe up, vocab-apply, init, onboard and
event import --with-vocab can change a project's vocab. They use a
password kept only in ~/.anagraphe/bundle/.state/vocab_admin.env.
- Claude Code and other MCP clients can't change the vocab. The store
refuses with
vocab_admin_required. - Anyone who can use your user account on this computer can change it.
Treat your user account and
~/.anagraphe/bundle/.stateas the trust boundary.
Licensing (premium tools)
Some tools need a plan. Premium tools (e.g. vector_search) are denied
until you sign this computer in to your licence.
To sign in, ask Claude "Log me in to Anagraphe", or run anagraphe login.
See step 3 of Get started.
- Signing in through Claude turns your plan on at once.
- After
anagraphe login, your plan turns on within about five minutes. Runanagraphe checkinto turn it on now. - Login spends a seat and is not repeatable: on a machine that is already signed in, it refuses with "This machine is already signed in to a licence".
- To sign in as someone else, run
anagraphe logout, thenanagraphe login. Logout asks you to confirm (--yesskips that) and deletes nothing. - For moving your plan to another computer, see Your plan.
No browser? For example a script, or a server you reach over ssh:
- In the customer portal, create an enrollment token. It is shown once.
- Run:
anagraphe license enroll --code cf_enr_...
- When it worked, you see
anagraphe: Done. This machine is signed in and your licence is active.
Enrolling spends a seat and uses up the token. If it reports that the first check-in failed, you are still enrolled. Retry just the check-in (if it says the check-in was rejected, retrying won't help: follow the steps it prints):
anagraphe checkin
After that, Anagraphe checks in on its own about every 6 hours. Run
anagraphe checkin whenever you want one now.
Not signed in? You can still use your first project, without the premium tools. Adding more projects is refused until you sign in.
Licence states
Your licence state shows which tools work.
anagraphe license status
fsm_state in its output is one of these:
| State | What it means | What works |
|---|---|---|
unenrolled | This machine has not signed in, or its first check-in has not happened yet. | Everything in your first project except the premium tools. No further projects. |
active | Signed in, and the last check-in succeeded. | Everything your plan includes. |
degraded_stale | No check-in has succeeded for a while (3.5 days by default). | Premium tools are off and no new projects can be added until the next check-in succeeds. |
lapsed | The subscription has ended. | Same as unenrolled: premium tools are off and no new projects can be added. |
expired | No check-in has succeeded for longer than the licence token lasts (8 days by default). | Same as lapsed. |
revoked | The licence for this machine was revoked. | Same as lapsed. |
In every state you can still read, write and export all of your existing
projects. Nothing is deleted when a licence lapses, expires or is revoked.
A check-in that succeeds restores your plan, except from revoked: then
run anagraphe logout, then anagraphe login (this moves your seat to this
computer). If it happens again, write to info@anagraphe.ai.
To renew, see Your plan.
Customizing your project
This is optional. The default setup (task, decision, lesson, note and
session kinds, plus priority and effort tags) is enough to start with.
To shape your own vocab by interview, before you onboard the project:
- Make sure Anagraphe is running (
anagraphe up).
- Open Claude Code in your project folder and run
/anagraphe-setup.anagraphe upinstalls it for you. It asks questions, suggests the default answer for each, and writesanagraphe-answers.yaml. Its last question is the project name. Then it sets the project up for you; Claude Code asks you to allow that command. - Close Claude Code and open it again in that folder.
If you would rather set it up yourself, run anagraphe start in that
folder. It asks first, then uses the interview's answers.
On Windows, run Claude Code inside WSL, where Anagraphe is installed. A
Claude Code started from Windows cannot run anagraphe.
Prefer to write the answers yourself? Run
anagraphe onboard --name <your-project> --file my-vocab.yaml, with any file
name; a relative one is read from the current folder. If the file doesn't
exist, it writes a template there for you to fill in.
Change the vocab later. A new answers file changes nothing once a project is onboarded. Instead:
- Edit
vocab.yamlin the project folder.
- Run
anagraphe onboard --name <that project>there. It applies the file and sets itsschema_versionfor you.
This does not regenerate the project's planning skill.
Or add a node kind or a status value by hand with vocab-apply. In
vocab.yaml, add the kind to node_kinds and the value to
tag_namespaces.status.values, adding to the lists already in the file.
vocab-apply does not set schema_version for you: raise it by 1. For
example, from version 1 (the lines below show only what you add or change):
schema_version: 2
node_kinds:
# ...existing kinds...
- constraint
- question
tag_namespaces:
status:
values:
# ...existing values...
- waiting
anagraphe vocab-apply --project <project> --vocab-path vocab.yaml
previews the change and writes nothing; add --commit to apply it. Run it in
the project folder.
First project only: VOCAB_PATH. To have anagraphe up apply your first
project's vocab.yaml on every run:
- In
~/.anagraphe/bundle/.env, setVOCAB_PATHto the file's full path, for exampleVOCAB_PATH=/home/you/myproject/vocab.yaml. A relative path points at the wrong folder.
- Run
anagraphe up.
After that, each edit must raise schema_version by exactly 1. Other
projects ignore VOCAB_PATH; change their vocab with onboard as above.
Backups
With a Pro plan the engine backs up your store on its own. This section covers where backups go and how to keep them safe.
- With Pro, Anagraphe backs up your store once a day.
- Without Pro, no backups run, and
backup statussaysBackups: on, but paused because your plan does not include scheduled backups.(with--json:"status": "idle: not entitled"). Anagraphe checks your plan every hour, so backups start within an hour of getting Pro. - Restoring and exporting never need Pro.
The default repository is not disaster recovery. It sits on the same host, and anagraphe down -v deletes it. Send your backups to a server
of your own (below).
Save your backup password
Without this password no backup can be read, by you or anyone else. It is
not in any backup. After the first backup, a successful anagraphe up,
start or update shows this line just before its last line, until you
run anagraphe backup password once:
ACTION REQUIRED: save your backup password somewhere off this computer — without it no backup can be restored. Show it with: anagraphe backup password
Run anagraphe backup password and keep the password somewhere off this
computer.
Back up to your own server
Anagraphe can send backups to your own server over sftp. We don't host backups.
- Copy these three files into
~/.anagraphe/bundle/secrets/. Replace the empty filesanagraphe upleft there under the same names:
| file | content |
|---|---|
id_sidecar | an ssh private key for your sftp server |
ssh_config | an ssh client config, as in the example below |
known_hosts | that server's host key |
ssh_config needs only Host, HostName and User (and Port if it is
not 22). Anagraphe supplies the key and host-key settings itself:
Host backup-server
HostName your-own-host.example.com
User user
- Add this line to
~/.anagraphe/bundle/.env, with theHostname fromssh_config:
CF_BACKUP_TARGET=sftp:backup-server:/path/to/repo
- Run
anagraphe up. It hands the key,ssh_configandknown_hoststo the backup user for you, so you never runchownorsudo. After that you can't read them, so keep your own copies. To change one, delete it, copy the new one in and runanagraphe upagain.
- If you had backups in another place before, start the new one once:
cd ~/.anagraphe/bundle
docker compose exec -u cf-backup engine anagraphe backup init
- Check with
anagraphe backup status.
To turn scheduled backups off, set CF_BACKUP_TARGET= (empty) in .env.
Only sftp and the default repository are supported, and the engine enforces
it: CF_BACKUP_TARGET must be an sftp: target. Backup runs, the restore
drill, anagraphe restore and anagraphe backup init/verify refuse other
forms (rest:, s3:, b2:, azure:, gs:, swift:, rclone:, a relative
path) before they touch the repository. Storage that needs keys in the
environment (S3, B2, Azure, GCS, a rest-server password) is not. The engine
refuses to start if one of those keys, RESTIC_PASSWORD or PGPASSWORD is
set.
What backups don't cover
~/.anagraphe/bundle/.state. It holds the store's passwords. If you lose it, see "Restoring".
- Your sign-in. On a new computer, run
anagraphe loginagain. - Your backup password. See above.
Check on backups
Ask Claude for system health, or run:
anagraphe backup status
A failing backup does not mark Anagraphe unhealthy, so check this now and
then. Have Pro but it says backups are paused? Run anagraphe license status.
Scheduled digest (Pro)
With a Pro plan the engine can write a daily report of what changed in each project.
The digest is off until you turn it on for a project. Open Claude Code in that project and say:
- "Turn on the scheduled digest."
- "Turn off the scheduled digest."
Each report covers what changed since the last one, tasks that have sat
idle, and tokens saved. Ask Claude "Show me the latest digest", or read it
from ~/.anagraphe/bundle:
docker compose exec engine cat /var/lib/anagraphe/digest/<your project>/latest.md
Reports stay on your computer. Each day also gets its own
digest-<YYYY-MM-DD>.md file next to latest.md.
When you delete a project, its report folder is removed at the next scheduled run, up to one interval later. Without an active Pro plan nothing runs, so the folder stays. A project created under a deleted project's name can show the old report until its first run or the folder is removed. Removal does not happen while another project has no report, for example digest turned off.
To change how often it runs, set CF_DIGEST_INTERVAL (seconds, default
86400, daily) in ~/.anagraphe/bundle/.env, then run anagraphe up.
Claude reports a vocab_gap when you turn it on. Your project was set
up by an older release. In that project's vocab.yaml, add feature to
node_kinds and enabled: {range: bool, applies_to_kinds: [feature]} to the
predicates, as the message names. Raise its schema_version by 1, then run
this in the folder that holds it:
anagraphe vocab-apply --project <project> --vocab-path vocab.yaml --commit
Restoring
How to put a backup back into your store, including after losing the computer.
Restoring replaces everything in your store with a backup. Anagraphe stops
while it runs and starts again after. If the backup was made by an older
version of Anagraphe, it stays stopped instead: run anagraphe up --yes to
update the database and start it.
- See which backups you have:
anagraphe restore list
- Restore the newest one, or put a backup's ID in place of
latest:
anagraphe restore restore --yes latest
Before the first backup, restore list stops with
anagraphe: NOT done: no backup has been made yet, so there is nothing to restore.
With backups turned off, it says backups are not turned on for this install.
Nothing is changed either way.
You can restore a backup made by this version or an older one. If database objects of your own use Anagraphe's tables, the restore stops, names them and changes nothing: drop or move them, then run the restore again.
You lost ~/.anagraphe/bundle/.state but not the computer. anagraphe up
refuses with the bundle_pgdata volume already exists but ./.state is missing/incomplete. Then:
- Run
anagraphe restore rekey. It makes new store passwords.
- Run
anagraphe up.
- To also load a backup, run
anagraphe restore restore --yes latest.
You lost the computer. On the new one, don't run rekey. Do these in
order:
- Install Anagraphe.
- Put your saved backup password in
~/.anagraphe/bundle/secrets/restic_password. - Put
CF_BACKUP_TARGETand your project name (ANAGRAPHE_VOCAB_PROJECT) in~/.anagraphe/bundle/.env. A saved copy of your old.envhas both. - Put the three ssh files (
id_sidecar,ssh_config,known_hosts) in~/.anagraphe/bundle/secrets/.
- Run
anagraphe up. It makes a new, empty store.
- Run
anagraphe restore restore --yes latestto load your data into it.
- Set
CF_BACKUP_TARGETto a new, empty location and runanagraphe up. The old location already holds your old computer's backups, so new backups there are refused.
Exporting your data
Getting your data out, licensed or not, needs no extra configuration. Run this in your project folder:
anagraphe export-bundle --project <your project> --vocab-path vocab.yaml --out bundle.zip
It writes bundle.zip into your current folder: plain Markdown, one file
per entry. Its own README.md carries the node count, the event id the export was taken at, and the bundle's layout.
- The bundle is not encrypted. Your backup password does not protect it. Keep it out of shared drives, chat, sync folders and git, and delete it when you are done.
- It is a one-way exit, not a restore path. It cannot be re-imported
into an engine. To restore, use
anagraphe restore(see "Restoring").
Tearing down
How to stop Anagraphe and, if you want, remove it and its data.
To stop Anagraphe and keep your data:
anagraphe down
Run anagraphe up to start it again. To remove Anagraphe and its data, see
"Remove Anagraphe" on
Updates and backups.
Command reference
Every command below runs through the anagraphe command the installer put
on your PATH, except the token rows, which say how to run them. Add
--help to an engine command for its options; the options of up,
update and restore are in this table.
| Command | What it does |
|---|---|
anagraphe start | Brings the stack up, onboards the current directory as a project (a new folder asks you to name it) and checks that Claude Code has the MCP server registered. |
anagraphe up | Creates or starts the stack. --project <name> names a new store, --yes agrees to pending schema changes, --rotate-mcp-token issues a new MCP access token. |
anagraphe down | Stops the stack and keeps your data. -v also deletes the data volumes. |
anagraphe update | Installs the latest release, then runs anagraphe up. --check only reports whether a newer release exists. |
anagraphe version | Prints the installed release. |
anagraphe help | Lists the commands, grouped, one per line. Same as anagraphe --help. --help on an engine command needs Anagraphe running (anagraphe up). |
anagraphe login | Signs this machine in to your licence in the browser. |
anagraphe logout | Signs this machine out, so you can sign in as someone else. |
anagraphe checkin | Checks in with the licence server now. Same as anagraphe license checkin. |
anagraphe license status | Shows the licence state of this machine (see "Licence states"). |
anagraphe license checkin | Checks in with the licence server now. |
anagraphe license enroll | Signs in with an enrollment code from the portal (--code), for machines that cannot use a browser. |
anagraphe status | Prints a short brief of where a project stands: work in progress, critical open items, recently touched entries. |
anagraphe doctor | Checks that your project's vocab.yaml, the store and the server agree, and that the database login works. |
anagraphe health | Ends with anagraphe: Done. anagraphe is healthy., or anagraphe: NOT done: <what is wrong>. <how to fix it>. Add --json for the full detail; "events_behind": 0 means Anagraphe has caught up with your latest changes. |
anagraphe onboard | For scripts, not listed in anagraphe help: onboards the project --name <name> (files, store registration, vocab, the Claude Code assets and this folder's Claude Code connection); it asks first for a new project, before it connects this folder to a project that already exists, and before it uses this folder's anagraphe-answers.yaml unless you name it with --file; --yes skips these questions. anagraphe start does this for you. |
anagraphe init | Bootstraps a new project. anagraphe start does this for you. |
anagraphe vocab-apply | Applies changes in your vocab.yaml to the store. |
anagraphe vocab-upgrade | Shows which keys of your vocab.yaml still hold an older starter value and what the current starter has instead. It writes nothing until you agree at the prompt, or rerun it with the --accept <digest> it printed. --keep <key> leaves one key as it is: give the key as the agent's preview prints it (glossary.depends, not depends), for example --keep glossary.depends. --add-new also adds keys your file lacks. The preview an agent reads explains each change with a use case. |
anagraphe project list | Lists your projects. |
anagraphe project show | Shows one project's record. |
anagraphe project register | Adds a project to the store. Add --restore to restore a deleted project from its export: it keeps the usage, savings and bug-report history its name still has. |
anagraphe project delete | Saves an export of a project in the current folder, then deletes it and frees its plan slot. See "Remove or rename a project" on Using Anagraphe. |
anagraphe project rename | Renames a project and updates the folder you run it from. See "Remove or rename a project" on Using Anagraphe. |
anagraphe project keep | Chooses the project that would stay writable during a subscription lapse. That write limit is not switched on: today every project stays writable after a lapse, so this changes nothing yet. |
anagraphe token create | Creates a named MCP access token for another client. See "MCP access token" for how to run it. |
anagraphe token list | Lists MCP access tokens and whether each is live or revoked. See "MCP access token" for how to run it. |
anagraphe token revoke | Revokes a named MCP access token. See "MCP access token" for how to run it. |
anagraphe check | Read-only consistency checks over a project, such as orphans, supersede and capture. |
anagraphe check id-drift | Reports projects whose stored entry ids differ from the ids their history means, which a rename before v1.11.0 can leave behind. --project <name> checks one project, --json prints JSON. Exits 1 when any project drifts. |
anagraphe check holds | Reports open, blocked or deferred tasks that say in their text that they wait on another entry ("Held until orc-target lands.", "Blocked by T935.", "Depends on T935.", "trigger: T935 is closed") but have no depends or blocks link to it. It counts a name only when an entry with that id exists in the project, except ids shaped like E-T… or D-…, which it always counts. Any id of an existing entry counts, even a plain word such as release; to clear a finding, add the depends or blocks link. Tasks already in progress are not checked. --project <name> checks one project, --verbose prints every finding, --json prints JSON. Exits 1 when it finds any. |
anagraphe check dangling | Lists entries that name another entry in a depends, blocks, references, decision or lesson field when no live entry has that id, for example because the target was deleted or renamed, so an entry still naming an old id is listed too; with --verbose or --json a renamed id shows the id it now points to. Closed and deprecated entries are checked as well. New writes refuse such a reference; this finds the ones that were already there. --project <name> checks one project, --verbose prints every missing id, --json prints JSON. Exits 1 when it finds any. |
anagraphe check body-size | Lists open tasks whose text is over 24,000 bytes, largest first, each with how many child tasks point to it through derives_from. Closed and deprecated tasks are only counted. Split a long task into child tasks unless it is an umbrella for them. --max-bytes <n> sets the limit (1,000 to 1,000,000), --project <name> checks one project, --json prints JSON. Exits 0 even when it lists tasks. |
anagraphe task set-status | Sets a task's status. |
anagraphe task close | Closes a task. |
anagraphe session close | Records where a working session ended, so the next one can resume. |
anagraphe reconcile | Writes a finding into an existing entry instead of creating a new one. |
anagraphe event add | Appends one event, whatever its kind. Do not auto-approve it for Claude; keep it behind the permission prompt. |
anagraphe event import | Appends events from a JSONL file in one transaction. |
anagraphe node show | Shows one entry. |
anagraphe diff | Shows what changed in a project between two points in its history (Pro). |
anagraphe digest | Builds a project's digest now (Pro), into ./digest in the current folder. |
anagraphe judge run | Runs the claim-drift judge (Pro). It uses the Claude Code installed and logged in on this computer, so it spends your own Claude usage; if ANTHROPIC_API_KEY is set, Claude Code bills that key. |
anagraphe judge accept | Dismisses claim-drift findings for good (Pro). With --commit it is not limited by Claude Code permissions. Do not auto-approve it for Claude; keep it behind the permission prompt. |
anagraphe backup status | Shows backup health. |
anagraphe backup password | Shows your backup password. Save it somewhere off this computer: without it no backup can be restored. |
anagraphe restore list | Lists your backups. |
anagraphe restore restore | Restores the store from a backup. It overwrites the current content. |
anagraphe restore rekey | Recovers the database passwords after anagraphe up stopped at the credential step. |
anagraphe export-bundle | Exports a project as a human-readable .zip. |
anagraphe dump | Writes a project's entries as JSON, or as Markdown with --format md. |
anagraphe build-plugin | Builds the Claude Code plugin pack. |
anagraphe repair-overlay | Repairs a project skill file written by an older release. |
Importing a large file. The MCP tools can't read a file on your
computer: event_import is refused with transport_not_supported, because
the engine runs in a container. Put the JSONL file
(one {"kind": ..., "payload": {...}} object per line) inside your project
folder and run anagraphe event import in that folder: --file is a path
relative to it, and the command does not read from standard input.
--dry-run checks the whole file and writes nothing.
anagraphe event import --file events.jsonl --project <your project> --dry-run
anagraphe event import --file events.jsonl --project <your project>
To restore an export you made earlier, into any store, add --restore (with or
without --dry-run). It accepts lines the plain import refuses: an edge to a
missing endpoint (where the vocabulary has edge.created) or a delete of a
missing node is accepted and does nothing, and
a blank title, a // slug, an unfilled substrate section and a title up to 64 KiB
(2 KiB otherwise) pass. An update of a
missing node that sends body_compact is still refused. Leave it off for a file
you wrote, so a typo is caught.
Exit codes
Most commands that check or change your plan end with one of three exit codes:
0: done, or the check found nothing.
1: the check found something, or Anagraphe refused the write (for example a task that is not live, or a payload that fails validation).
2: the command could not run: an option is wrong or empty, the project is not registered, a folder is missing, or the database is not answering.
Some commands differ:
anagraphe doctorexits1for a problem it found and3when the database permissions are out of date.
anagraphe vocab-applyexits4when the saved vocab is newer than your vocab.yaml, and2when it refuses the vocab.
anagraphe judge runexits3when Anagraphe has not caught up with your latest changes and4when it needs--yes.
anagraphe digestexits3when it wrote some projects and skipped others, and1when every project it tried failed.
anagraphe check capture,check landed,check statusless,check body-sizeandanagraphe statusexit0when the database is not answering, because they only advise.statusalso exits0when no project is given.
- When a
checkcommand given--jsoncannot run, it prints one JSON object,{"ok": false, "error": {"what": ..., "fix": ..., "run": ...}}, on standard output instead of text; the one-lineerror: ... unverifiablemarker on standard error stays when the database cannot be reached. The exit code is the one the text form uses.
anagraphe statusrun in a folder that is not an Anagraphe project exits1, unless you add--project <name>.
anagraphe onboardexits1when the project name is not allowed, and3when the answers file you named with--filedoes not exist: it writes a template there and sets nothing up, so fill it in and run it again.
- A Pro command run without a licence exits
1.
Troubleshooting details
anagraphe doctor compares your project's own vocab.yaml with the store, so run it from your project folder, not the bundle:
anagraphe doctor --project <your project> --vocab-path vocab.yaml
anagraphe health works from any folder:
anagraphe health --project <your project>
It ends with anagraphe: Done. anagraphe is healthy. when nothing is waiting to be processed.
To see whether Anagraphe's containers are healthy, run this from the bundle folder:
cd ~/.anagraphe/bundle
docker compose ps
The engine and postgres containers should both say healthy.
- Run
doctorfrom your project folder.
<your project>is the name you gave your project. For your first project, it isANAGRAPHE_VOCAB_PROJECTin~/.anagraphe/bundle/.env.
MCP tools
Claude Code reaches your store through these tools once the anagraphe MCP
server is registered. Tools marked Basic need a Basic or Pro licence; tools
marked Pro need Pro.
| Tool | What it does | Plan |
|---|---|---|
bootstrap | Returns a project's context. | |
node_show | Returns one entry in full. | |
node_fetch | Returns the compact bodies of several entries. | |
node_at | Returns an entry as it was at a given time. | |
node_neighborhood | Returns the entries linked to one entry. | |
nodes_by_kind | Lists entries of one kind. | |
tag_query | Finds entries by tags. | |
referrers | Finds the entries that reference a given entry. | |
vector_search | Finds entries with semantic search. | Basic |
event_timeline | Lists recent events. | |
event_show | Returns one event in full. | |
event_append | Records one change. | |
event_append_batch | Records several changes in one transaction. | |
event_import | Records changes from a JSONL file in one transaction. Not available on this stack: use anagraphe event import. | |
reconcile | Writes a finding into an existing entry instead of creating a new one. | |
task_set_status | Sets a task's status. | |
session_close | Ends a session and saves where the next one should start. | |
check_orphans | Finds new tasks that are not linked to anything. | |
check_supersede | Finds entries that still cite a superseded decision. | |
check_capture | Finds what recent work learned but did not record. | |
system_health_tool | Reports whether Anagraphe has caught up with your latest changes, and backup health. Backup, licence, server code state and the vocabulary guard cover the whole install, even when you ask about one project; the newest event number is that project's own. | |
canon_diff | Shows what changed between two points in a project's history. | Pro |
digest_latest | Returns a project's latest scheduled digest. | Pro |
judge_queue | Lists claim-drift findings that need a look. | Pro |
judge_repair | Plans or applies fixes for claim-drift findings. | Pro |
judge_accept | Dismisses claim-drift findings for good. Committing it needs the canon:repair permission, which no MCP token has, so through MCP it only lists the rows and a commit is refused with scope_denied; commit from a terminal with anagraphe judge accept --commit. Do not auto-approve it for Claude; keep it behind the permission prompt. | Pro |
pro_features_list | Lists the Pro features and whether each is on for this project. | |
pro_features_set | Switches a Pro feature on or off for one project. | Pro to switch on |
license_login_start | Starts signing this machine in to your licence. | |
license_login_status | Reports how that sign-in is going. | |
report_bug | Previews a bug report about the engine. It sends nothing. | |
report_bug_send | Sends the report you previewed to the Anagraphe team. |