Claude Code CLI
Not installed? See the official guide. This tutorial doesn't cover Claude Code installation.
// INSTALL → DAEMON → MCP → HOOKS → (DISTILL) · LOCAL ONLY
npm install is just the start. The daemon isn't running yet, MCP isn't wired, and hooks aren't configured. This page walks you through 4 steps to get the system live, then a 5th (optional) that makes memories grow on their own.
Each step is a single command. If one fails, it doesn't break the previous step — try them one at a time without worry. These four make the system usable; a fifth step makes memories accumulate, and it's at the end.
You'll get two CLI commands: ccmem (the daemon itself) and ccmem-mcp (the MCP server Claude Code calls).
npm install -g @tznthou/ccrecall
Why is the binary called ccmem instead of ccrecall? Because ccrecall on npm is already taken by spences10/ccrecall — an unrelated analytics tool. The project is still ccRecall; only the binary name sidesteps the conflict.
One command registers the daemon as a macOS LaunchAgent: writes the plist to ~/Library/LaunchAgents/, creates the log directory, starts immediately, and keeps starting at every login.
ccmem install-daemon
// LINUX / WINDOWS / JUST TRYING → run in foreground
ccmem # Ctrl+C to quit
Register ccRecall's MCP server with Claude Code. --scope user means it works in every project — no per-repo setup.
claude mcp add ccrecall --scope user -- ccmem-mcp
Step 3's MCP is "Claude pulls memories on demand." Hooks fire automatically at session boundaries — SessionStart brings memories into a new conversation, SessionEnd confirms this one got indexed. One command finds ~/.claude/settings.json, backs it up, and merges (not overwrites) two hook registrations.
ccmem install-hooks
⚠ IMPORTANT
Restart any running Claude Code sessions after install — hook config doesn't hot-reload. Preview without writing: ccmem install-hooks --dry-run. Remove later: ccmem uninstall-hooks (only deletes ccRecall's own entries).
The first four steps give you indexing, startup injection, and manual recall_save. Up to here, a memory only exists if you deliberately save one. To make them accumulate, add one line to your shell config — after that, every session ends with Haiku reading the transcript and distilling up to 5 entries into the store, for about $0.001 a run.
source "$(npm root -g)/@tznthou/ccrecall/scripts/post-session-extract.sh"
Then use ccrecall-extract instead of claude — every claude flag still works:
ccrecall-extract # instead of: claude
ccrecall-extract --resume # flags work as usual
alias ccdm='ccrecall-extract' # if the name is too long
// requires jq and curl on PATH (both ship with macOS)
Skip distillation for one session: CCRECALL_SKIP_EXTRACT=1 ccrecall-extract. If the daemon isn't running the wrapper skips itself — it will never block you from starting a conversation.
// 4 STEPS → SYSTEM LIVE · +1 STEP → MEMORIES GROW ON THEIR OWN
Three quick checkpoints. If something's off, this section helps you locate which link is broken.
CHECK #01
{"status":"ok"} means yes. 7749 is the default port; override via CCRECALL_PORT in the plist if needed.
CHECK #02
Start a fresh Claude Code session and ask:
Claude should proactively invoke mcp__ccrecall__recall_query to search past conversations. Seeing "looking up memories" in tool calls means the connection is live.
CHECK #03
On first boot, the daemon kicks off runIndexer to walk every historical JSONL and build the index. The watcher only arms after that pass completes. Empty results during this window aren't a bug — a dozen sessions take seconds; hundreds may take a minute or two.
Now that it's installed, these pages cover what it does behind the scenes and how it splits work with the other tool.
CCRECALL · DETAIL
Component spec, trust contract, the full index → distill → inject → recall flow, and what actually lands on disk.
→ ccrecall detail page
SCHEMA · CONTRACT
Why the 6 baseline tables demand a cross-PR, how ownership splits the rest, why every migration step rolls back.
→ architecture page
CCFAMILY · OVERVIEW
ccRecall remembers forward, ccRewind digs backward — they don't solve the same problem.
→ ccfamily home
SUPPORT
GitHub Issues for bug tracking, design discussion, feature requests.
→ github.com/tznthou/ccRecall/issues