Don't just explore your code or foldersβexplore your conversations, or pick up where you left off.
Semantic search β’ Organize by project β’ Favorite conversations β’ 100% local
npx @colbymchenry/cmemInteractive installer configures Claude Code automatically
Ever closed your terminal and lost that perfect Claude conversation? The one where you finally figured out that tricky bug, or designed that elegant architecture?
cmem gives Claude Code a long-term memory. Every conversation is automatically saved, indexed, and searchableβso you (and Claude) can pick up right where you left off.
Using CMEM MCP to fetch conversational data about previous chat sessions
Claude can search through your conversation history and synthesize answersβall without cluttering your main session context.
Easily navigate between previous chat sessions and pick back up right where you left off
Browse, search, filter, rename, and restore any conversation with the interactive TUI.
π§ Sub-Agent Summarization β When Claude needs context from past sessions, cmem spawns a separate Claude instance to read and synthesizeβkeeping your main conversation context clean. Just like Explore agents, but for your conversation history.
π Semantic Search β Find conversations by meaning, not keywords. "That React hooks discussion" or "the database migration plan" just works.
π€ Claude Can Remember β Via MCP integration, Claude can search your past conversations. "What did we decide about auth last week?" Finally, context that persists.
π Automatic Sync β A background daemon watches your Claude Code sessions and keeps everything indexed in real-time.
πΎ Never Lost β Every conversation is automatically backed up. Even if Claude Code clears its storage, cmem restores your sessions instantly when you resume them.
π¦ 100% Local & Private β Everything runs on your machine. No cloud services, no API keys, no external servers. Just SQLite + local AI embeddings.
npx @colbymchenry/cmemThe setup wizard will:
- Install
cmemglobally - Download the embedding model (~130MB, one-time)
- Optionally set up auto-sync on login (macOS)
- Configure MCP server in
~/.claude.json+ permissions in~/.claude/settings.json
That's it. Your conversations are now being remembered.
- Node.js 18+
No other dependencies. The AI embedding model downloads automatically on first use and runs entirely in Node.js.
cmem # Browse sessions in beautiful TUI
cmem --local # Browse sessions from current folder only
cmem search "query" # Semantic search across all conversations
cmem watch # Start the sync daemon
cmem stats # See what's storedClaude Code sessions β cmem watch daemon β SQLite + Vector DB
β
Claude Code β MCP Server β Semantic Search
- Watch: The daemon monitors
~/.claude/for new/changed sessions - Index: Conversations are parsed and embedded locally using
nomic-embed-text-v1.5 - Search: Query by meaning using vector similarity
- Remember: Claude can access past conversations via MCP tools
The cmem watch daemon runs in the background and automatically syncs your Claude Code sessions:
- With daemon installed: Sessions sync automatically whenever you use Claude Code
- Without daemon: Run
cmem watchmanually, or sessions sync when you open the TUI
On macOS, you can install the daemon to start automatically on login:
cmem install # Enable auto-start
cmem uninstall # Disable auto-startOnce configured, Claude Code gains these abilities:
| Tool | What it does |
|---|---|
search_and_summarize |
The star feature β Ask a question, get an AI-synthesized answer from past sessions |
search_sessions |
Find sessions by semantic similarity |
list_sessions |
Browse recent sessions |
get_session |
Retrieve full conversation history |
get_session_context |
Get context to continue a past conversation |
Main Claude Session cmem MCP Server
β β
β "What did we decide about auth?" β
βββββββββββββββββββββββββββββββββββββββββββββΊβ
β β
β ββββββββββ΄βββββββββ
β β 1. Vector search β
β β 2. Find sessions β
β β 3. Read content β
β ββββββββββ¬βββββββββ
β β
β ββββββββββ΄βββββββββ
β β Spawn Claude CLI β
β β (sub-agent) β
β β β
β β Reads sessions, β
β β synthesizes β
β β answer β
β ββββββββββ¬βββββββββ
β β
β "Based on your Jan 15 session, you β
β decided to use JWT with refresh..." β
ββββββββββββββββββββββββββββββββββββββββββββββ€
β β
This keeps your main context cleanβonly the concise summary comes back, not the raw session content. Uses Haiku by default for speed, configurable to Sonnet or Opus.
| Command | Description |
|---|---|
cmem |
Launch interactive TUI |
cmem --local |
Launch TUI filtered to current folder |
cmem setup |
Run setup wizard |
cmem search <query> |
Semantic search |
cmem list |
List all sessions |
cmem restore <id> |
Output session context |
cmem watch |
Start sync daemon |
cmem install |
Auto-start daemon on login (macOS) |
cmem uninstall |
Remove auto-start |
cmem stats |
Storage statistics |
cmem mcp |
Start MCP server |
All your sessions in one place, smart-sorted into three tiers:
- Starred sessions β Your favorites, sorted by message count
- Named sessions β Custom-named conversations, sorted by message count
- Everything else β Sorted by message count
Press s to star/unstar a session.
Browse sessions organized by project folder.
- Press
Enterto drill into a project's sessions - Press
sto enter sort mode β useβ/βto reorder,Enterto confirm - Custom project order is persisted
| Key | Action |
|---|---|
β/β or h/l |
Switch tabs (Global / Projects) |
β/β or j/k |
Navigate |
Enter |
Resume session / Open project |
s |
Star session (Global) / Sort mode (Projects) |
r |
Rename session |
R |
Clear custom name |
d |
Delete session |
/ |
Search (Global tab) |
Esc |
Back / Cancel |
q |
Quit |
All data is stored locally in ~/.cmem/:
sessions.dbβ SQLite database with vector embeddingsmodels/β Downloaded embedding model (~130MB)backups/β Full copies of all conversation JSONLs (auto-restored if Claude deletes them)
Claude Code sessions are read from ~/.claude/.
- SQLite + sqlite-vec β Embedded vector database
- transformers.js + nomic-embed-text-v1.5 β Local AI embeddings (768 dimensions, runs in Node.js)
- ink β Beautiful terminal UI (React for CLI)
- MCP β Model Context Protocol for Claude integration
MIT
Stop losing your best conversations.
npx @colbymchenry/cmem