claude-db182
Menu

CLI reference

Every command is also available as cdb. Most of the time you will not run any of these: capture and recall are hooks, and Claude reaches the rest over MCP.

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 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 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 starts a local server only while you are looking at it, opens the browser, and stops on Ctrl+C — no background process is left running. --export writes a standalone HTML snapshot instead. adoption reads this project's transcripts and reports Bash commands, greps, hook fires and memory-tool calls, so whether any of this is working is a number rather than a feeling.

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: live git grep, or the code graph

Modes are text, usages, explain and path. 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)

reembed is what you run after installing @xenova/transformers, so existing rows are searchable at the new dimension rather than only new ones. flush is what you run after upgrading claude-db, since it re-ingests transcripts through the current extractor and updates observations in place.

Configuration

~/.claude-memory/config.json holds the settings. Every key has a working default, so the file is optional.

KeyDefaultWhat it does
embeddings.providerautoauto uses the real model when installed, else the built-in embedder
inject.perPrompttrueInject matching memory above each prompt
inject.minOverlap1Content words a memory must share with the prompt to be injected; 0 off
capture.summarizeoffon writes session summaries with your own Claude CLI; costs tokens
capture.summarizeModelopusModel for those summaries: opus, sonnet or haiku, always low effort
updatesnotifyUpdate checks: auto, notify or off
Edit this page on GitHub