VVitkilabs

Anvil is an alpha testing release. It may have bugs. If something here doesn't match what you see, tell us.

Anvil docs · Claude Code memory

A memory for Claude Code that lasts.

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.

What Claude Code keeps on its own

Two sets of Markdown files.

Claude Code already has a memory, and it works well for many people.[1]

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.

Set it up

Five steps.

  1. Install Anvil. Get it from the download page: macOS (Apple silicon), Windows 10 or 11, or Linux (.deb, .rpm or AppImage). On a Mac, Homebrew is easiest:
    brew install --cask vitkilabs/anvil/vitkilabs-anvil
  2. Create your vault. Open Anvil. Pick a passphrase and save the recovery PDF somewhere outside the Anvil folder. Your memories and keys are encrypted with it.
  3. Connect Claude Code. On the setup screen, leave Claude Code ticked and click Connect. Or use a terminal; add --dry-run first to see what would change without changing anything:
    anvil connect --client code
  4. Pick how Anvil thinks. Anvil needs a model for its own work, such as sorting and summarising memories. Use your Claude or ChatGPT sign-in, add an API key, or point it at a local model.
  5. Start a new Claude Code session. Type /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.
What Anvil changes

Three files, and only Anvil's entries.

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.

FileWhat Anvil adds
~/.claude.jsonAn MCP server called anvil, which gives Claude tools to recall and write memories.
~/.claude/settings.jsonFour hooks, listed below. Each one runs the anvil command.
~/.claude/CLAUDE.mdA 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.

What gets remembered

Recall before each prompt. Saving before it stops.

The hooks are what make it automatic. Claude doesn't have to remember to check its memory.

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.

Where it lives

On your computer, encrypted.

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.

Questions

Short answers.

Does Claude Code remember anything between sessions?

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.

How does Anvil give Claude Code a memory that lasts?

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.

Where does Anvil store Claude Code's memory?

On your own computer, in an encrypted database in the .anvil folder in your home folder. Anvil doesn't send your memories to Vitkilabs.

Do I need an account or an API key?

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.

How do I undo it?

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.

Sources

Where the facts about other products come from.

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.

  1. Anthropic, Claude Code docs: How Claude remembers your project (CLAUDE.md, auto memory, what loads at the start of a session).
More questions

Related pages.