claude-db231
Menu

CLI reference

Every command is also available as cdb. claude-db --version prints the version. Capture and recall are hooks, so you rarely need these.

Setup

CommandWhat it does
claude-db install [--project]Register hooks and the MCP server
claude-db uninstall [--project]Remove them, keeping your memory
claude-db statusIs it wired up, and when did it last record anything
claude-db catchupWhere you stopped: last chat, to-dos, handoff and git
claude-db doctor [--deep]Resolved config; --deep proves a full round trip

Memory

CommandWhat it does
claude-db search [--all] [--tag <name>] <query>Search this project's memory, or every project
claude-db remember [--key <name>] <text>Record a rule outright, e.g. "always use pnpm here"
claude-db forget <id>Delete specific observations by id
claude-db forget --session <id>Clear one session's summary, so it stops being injected
claude-db distill [on|off]Turn chats into facts with Haiku; no argument, status
claude-db pick [on|off]Let Haiku pick the memory shown with each prompt
claude-db redactRe-apply secret redaction to memory already saved
claude-db seed --from-gitFill a cold memory from this repo's history
claude-db statsWhat this project's memory is made of
claude-db projectsEvery project with memory stored
claude-db view [--export <file>]See this project's memory live in the browser
claude-db adoptionHow often sessions grep vs use the memory tools

view runs a local server only while you look at it and stops on Ctrl+C. --export writes a standalone HTML snapshot instead.

Code graph

CommandWhat it does
claude-db scan [--force]Build the code graph for this repo
claude-db usages [--mode <m>] <symbol>What uses a symbol: the code graph plus live git grep
claude-db languagesWhich languages are read with real syntax

Modes are usages (the default), explain, path and text. See Code graph for what each one answers.

Database

CommandWhat it does
claude-db use <url>Switch database and verify it
claude-db sync <url>Two-way merge with another database
claude-db export [--all]Dump memory as JSONL, for backup or migration
claude-db import <file>Load a dump back in; safe to repeat
claude-db merge [<path>]Move memory from an old project path onto this one

Maintenance

CommandWhat it does
claude-db flushRe-ingest every transcript for this project
claude-db reembedRe-embed everything with the current model
claude-db prune --older-than <days>Delete old memory (dry run without --yes)
claude-db reset [--project] --yesDelete memory (dry run without --yes)

Run reembed after installing @xenova/transformers, and flush after upgrading claude-db.

Configuration

Settings live in ~/.claude-memory/config.json. The file is optional, and every key has a default.

KeyDefaultWhat it does
embeddings.providerautoauto uses the real model when installed, else the built-in embedder
inject.perPrompttrueShow related memory with each prompt
inject.minOverlap2Content words a memory must share with the prompt to be considered; 0 off
inject.promptResults2Most memories shown with one prompt
pick.enabledtrueLet Haiku pick which memories to show with a prompt
pick.dailyLimit150Most picks a day; after that only strong word matches are shown
capture.scriptedfalseCapture headless claude -p / SDK sessions too
distill.enabledtrueTurn each finished chat into short facts with one Haiku call
distill.dailyLimit30Most Haiku calls a day; older chats wait for the next day
distill.backfillDays90How far back older chats are turned into facts
capture.summarizeoffon writes session summaries with your own Claude CLI; costs tokens
capture.summarizeModelopusModel for those summaries: opus, sonnet or haiku, always low effort
project.remoteoriginThe git remote that names a project
updatesnotifyUpdate checks: auto, notify or off
Edit this page on GitHub