Anvil is an alpha testing release. It may have bugs. If something here doesn't match what you see, tell us.
Claude Code starts every session with a fresh context window. On its own, it carries knowledge forward in plain Markdown files: CLAUDE.md, which you write, and auto memory, which Claude writes. To give it a memory that is searched on every prompt and kept encrypted on your own machine, install the free Vitkilabs Anvil app and connect it to Claude Code. Anvil then hands Claude the memories that match each prompt, and asks it to save what's worth keeping before it stops.
Claude Code already has a memory, and it works well for many people.[1]
~/.claude/projects/<project>/memory/, one folder per repository. The first 200 lines or 25KB of its MEMORY.md index load at the start of each conversation. It stays on that machine.For a small project, that may be all you need, and you can read and edit every file. Anvil is for when you want more: a memory that is searched for each prompt rather than a fixed slice loaded at the start, that is encrypted, and that Codex and GitHub Copilot can use too.
brew install --cask vitkilabs/anvil/vitkilabs-anvil--dry-run first to see what would change without changing anything:
anvil connect --client code/mcp: anvil should be listed as connected. anvil doctor checks the rest. Then tell Claude something worth remembering, start another session and ask about it.Anvil saves a backup of each file as <file>.anvil-bak before its first edit, and leaves everything else in the file as you had it.
| File | What Anvil adds |
|---|---|
~/.claude.json | An MCP server called anvil, which gives Claude tools to recall and write memories. |
~/.claude/settings.json | Four hooks, listed below. Each one runs the anvil command. |
~/.claude/CLAUDE.md | A short block of instructions between <!-- anvil:begin --> and <!-- anvil:end -->. Your own text outside the markers is left alone. |
The getting started guide lists every change in full, and how to undo it.
The hooks are what make it automatic. Claude doesn't have to remember to check its memory.
/compact you type yourself is never held up.The hooks make sure Claude is handed its memories. They can't make it use them. Claude decides what to do with what it's given, and now and then it sets a memory aside or doesn't save something. That happens inside the assistant, not in Anvil, and Anvil can't prevent it. If something matters, ask Claude to check Anvil.
What ends up in memory is the kind of thing you'd otherwise re-explain: decisions and the reasons for them, constraints, fixes that worked, how you like things done. Anvil stores facts and the links between them, flags a new fact that clashes with an old one, and shows where each memory came from. Search matches your words and, when they don't appear, your meaning. You can also bring in an Obsidian vault, JSONL exports or your chat history on first run.
Anvil's instructions ask Claude to use Anvil instead of its own MEMORY.md files, so you have one store, not two. If memory files appear anyway, anvil doctor warns you, and anvil memory tripwire --ingest moves them into Anvil.
Anvil keeps your memory in an encrypted database (SQLCipher) in one folder: ~/.anvil on macOS and Linux, C:\Users\<you>\.anvil on Windows. Your AI keys and assistant sign-ins stay in the vault on your machine and are never sent to Vitkilabs. Anvil runs as a small background service that talks over a local socket or named pipe, and opens no inbound network ports.
The same memory works in Codex and ChatGPT's desktop app, and in GitHub Copilot. Connect them too, and what you teach one assistant, the others can recall.
Two things to know. On a Mac, nothing starts Anvil at login, so open it after you restart; until you do, the hooks do nothing and show no error. After each Anvil update, run anvil connect --refresh so Claude Code gets the current instructions.
Yes. Claude Code loads CLAUDE.md files, which you write, and auto memory, notes Claude writes itself, at the start of each session. Both are plain Markdown files on your machine. From auto memory, it loads the first 200 lines or 25KB of the MEMORY.md index.
Anvil connects to Claude Code as an MCP server and adds four hooks. Before each prompt, it hands Claude up to eight memories that match what you asked. When Claude finishes, Anvil asks it to save anything worth keeping.
On your own computer, in an encrypted database in the .anvil folder in your home folder. Anvil doesn't send your memories to Vitkilabs.
No. The Free plan needs no account. For its own work, Anvil can use your existing Claude or ChatGPT sign-in, so you don't need a key. You can add an API key or use a local model instead.
In Anvil, open Settings › Assistants, untick Connect Anvil to this assistant and click Save and apply. Or run anvil connect --client code and answer n to the first question. Either way removes Anvil's MCP server, hooks and instructions block.
Each was checked on its maker's own site on 18 October 2026. Products change: if one of these no longer matches, tell us and we'll correct it.