Credentials. A shared Postgres or MongoDB connection needs database credentials, so store them outside the repo and never commit them.
Who it is forA developer or small team who uses Claude Code on more than one machine and wants one memory store.
The problemThe default SQLite store lives on one machine, so decisions and maps made on a laptop are missing on a desktop.
The outcomeMemory is kept in a Postgres or MongoDB database you run, so every machine using Claude DB reads the same store.
What you need first
- Node 22.16 or newer
- A git repository for your project
- Claude Code installed and able to run hooks
- Optional: a Postgres or MongoDB database if you want to share memory across machines
Steps
npm install -g claude-dbcd your-projectclaude-db install --project- Run
claude-db use pgorclaude-db use mongodband follow the prompts to point Claude DB at your database. (inferred, check the README) - Run
claude-db doctorto check the setup, thenclaude-db statusto confirm what is recorded.
Prompt for your agent
In the repo <repo-path>, switch claude-db to the database <pg-or-mongodb> and run claude-db doctor. Expected output is a passing setup check and a status line showing the chosen database. Verify that claude-db status reports the same memory count on a second machine after one chat is recorded.
Caveat. The README gives the command only as a table entry, so the exact connection steps are in the documentation site and you should confirm them there.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page