claude-db CLI
Persistent memory for Claude Code on your own database: capture of decisions and context plus a code graph, injected into every prompt
- 235 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Installs hooks into project settings and reads session transcripts
- Builds a graph over the codebase files
- Writes data to a local or external database
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/claude-dbDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Installs hooks into project settings and reads session transcripts
- Builds a graph over the codebase files
- Writes data to a local or external database
This is third-party code. Review the repository files before installing.
What it does
The tool gives Claude Code memory that survives sessions and stores it in a database of your choice: SQLite, PostgreSQL or MongoDB. Capture and recall run as hooks, so decisions and context are saved on their own and injected into every new prompt. A separate command builds a code graph: proper symbol parsing for TypeScript, JavaScript, Python, Go, Rust and Ruby, and pattern-based reading for other languages. Through MCP the agent gets code search modes: a live grep, usages lookup, explain and a path between symbols.
Who it is for. For developers who do not want to re-explain the project layout and past decisions to the agent every time.
Good fit when
- The agent forgets context between sessions and re-derives the codebase
- You want a history of decisions and reasons kept next to the code
- You want fast usages and symbol relations lookup through the agent
Not a fit when
- The project is a one-off and cross-session memory is not needed
- You cannot set up a local database or write into the project directory
Example request
Why does capture read the transcript? Look up past decisions on this in memoryLimitations
It works with Claude Code through hooks and MCP. Data lives in your database: with SQLite nothing leaves the machine, while PostgreSQL or MongoDB need access to that database. The install command writes .claude/settings.local.json and .mcp.json, and the latter holds a machine-specific path that is worth adding to .gitignore.
How to disable. Remove the claude-db entries from .claude/settings.local.json and .mcp.json, then drop the global package with npm uninstall -g claude-db.
FAQ
Where is data stored?
In a database of your choice: SQLite locally, or PostgreSQL or MongoDB. With SQLite nothing leaves the machine.
Do I run the search by hand?
No. Capture and recall are hooks, so context is injected into every prompt automatically. The claude-db scan command is only for the code graph.
Discussion
No questions or reviews yet.
Related
CLI toolsA debugging tool for Claude Code that reads the session logs already saved on disk and shows exact file paths, diffs, model thinking and a category-by-category
The atomic binary and a Claude Code config set: repo wiki, code graph and an autopilot that takes an issue to a pull request.
Streams Claude Code hidden thinking, tool calls and subagents to a separate terminal with a live session tree
A starter kit for Claude Code: a CLAUDE.md memory-bank template with ready hooks, subagents and skills you copy into your project
An Emacs package for Claude Code: per-project sessions and an MCP server exposing buffers, LSP and diffs to the agent.
An MCP server that gives an agent search over a large Claude Code guide, official docs, releases and ready-made templates
README in short
The README frames the problem: the agent starts each session from zero and re-derives the code. claude-db keeps decisions and context in your database and injects them into every prompt via hooks. Install: npm install -g claude-db, then claude-db install --project, where --project scopes memory to one repository and writes local settings. The claude-db scan command builds a code graph and exposes text, usages, explain and path modes over MCP, and a re-scan re-parses only changed files.