-
Notifications
You must be signed in to change notification settings - Fork 4
Getting Started
Five minutes from clone to your first longhand recall returning a real answer from your past sessions.
-
Python 3.10 or higher — check with
python3 --version -
Claude Code installed and used at least once (Longhand reads from
~/.claude/projects/) - macOS or Linux — Windows users should use WSL2
- ~100 MB of disk for the index (scales with your history; ChromaDB + SQLite together)
If you've never run Claude Code, there's nothing for Longhand to ingest. Come back after you've had a few sessions.
pip install longhandConfirm the CLI is on your PATH:
longhand --versionTo upgrade later, run pip install -U longhand.
If you want to hack on Longhand itself, clone the repo and use editable mode:
git clone https://github.com/Wynelson94/longhand.git
cd longhand
pip install -e .pip install -e . installs in editable mode so you can pull updates with git pull without reinstalling.
One command wires up everything:
longhand setupThis does six things in order:
-
Ingest — discovers every JSONL file in
~/.claude/projects/and parses every event (user messages, assistant text, tool calls, tool results, thinking blocks) into SQLite and ChromaDB - Analyze — runs the extractors (errors, file references, topics, git operations) and the per-session analysis (project inference, episode extraction, segment clustering, outcome classification)
-
Install SessionEnd hook — adds a line to
~/.claude/settings.jsonso every future Claude Code session auto-ingests when it closes - Install UserPromptSubmit hook — adds an optional hook that auto-injects relevant past context before Claude sees your next prompt
- Register MCP server — makes the 16 recall tools available to Claude Code agents mid-session
- Doctor — verifies all components wired correctly
First-time ingest on a large history (100+ sessions) can take a few minutes because ChromaDB has to generate embeddings for every event. Subsequent ingests are incremental and fast.
Ask it something in plain English:
longhand recall "that time we fixed the auth middleware"You'll get back matched projects, relevant problem→fix episodes with diffs, conversation segments, and a prebuilt markdown narrative you can read top-to-bottom.
Try a fuzzy time reference:
longhand recall "the bug I was stuck on a couple weeks ago"The time parser handles "last week," "a couple months ago," "in March," and similar fuzzy phrases — no exact dates required.
Once the MCP server is registered, Claude can call recall tools during a live session. Try asking:
"Do you remember the stripe webhook bug I fixed? Show me the diff."
Claude will call recall with your question, pull the episode, show you the fix, and continue the conversation with full context. No more re-explaining.
See the MCP Tools Reference for every tool Claude has access to.
Run the built-in diagnostic:
longhand doctorIt reports the status of the database, the hooks, the MCP registration, and the index. Most first-run issues show up there with a clear fix.
If doctor looks clean but something still isn't working, see the Troubleshooting page.
-
"No sessions found" on first ingest — confirm Claude Code has actually written to
~/.claude/projects/. If you're a brand-new Claude Code user with zero completed sessions, Longhand has nothing to read. -
MCP tools not showing up in Claude — restart Claude Code after
longhand setupso it picks up the new MCP config. - Slow first recall — ChromaDB lazy-loads its embedding model on first query. First call takes several seconds, subsequent calls are ~126ms.
-
Hook didn't fire —
longhand doctorwill tell you if the hook is installed. Check that~/.claude/settings.jsoncontains aSessionEndentry.
- MCP Tools Reference — learn what Claude can call
- CLI Reference — browse the 29 commands
- Codex — using Codex too? Capture its threads into the same archive and search both from either client
- Configuration — tune hook behavior and relevance thresholds