-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Reference
Longhand's commands, each with a one-line purpose. Current as of v0.13.0 — run longhand --help for the always-true list.
One-shot orchestrator: ingest + analyze + install hooks + register MCP + doctor. Run once after install.
Verify installation. Checks database, hooks, MCP registration, index health. First thing to run when something isn't working.
Discover and parse Claude Code JSONL files into SQLite + ChromaDB. Incremental by default.
Reconcile on-disk transcripts against the sessions table. Prints a bucket summary (fully indexed, partially indexed, null-project, oversize-skipped, missing). With --fix, re-ingests what's missing using current project-inference logic — useful any time you suspect a hook failure left gaps (the doctor freshness and hook-error rows will tell you). Idempotent; safe to run any time.
Re-run extractors and analysis on existing sessions. Use --all after upgrading to re-process historical data with new logic.
List ingested sessions with event and edit counts.
List inferred projects with categories.
Semantic search across all events. Accepts filters for session, project, tool, file, event_type.
Storage footprint and indexing stats.
Chronological view of a session. Supports --offset, --tail, pagination.
Get surrounding context for a specific event.
Show before/after diff for a single edit event.
Proactive fuzzy recall. Time parsing + project match + episode search. The command you'll use most.
Three modes, plus --json on all of them:
-
bare
status— recent-work digest: sessions, outcomes, projects, first asks (--days N,-p <project>,--limit N) -
status <project-name>— where did we leave off on X. Git-aware. -
status --session <session-id>— the tail of one session so you can pick up where you left off (--events N)
longhand recap → bare status · longhand continue <id> → status --session <id> · longhand patterns → longhand recall "<topic>". All three still run through 0.x and print a pointer to their replacement.
Every edit to a file across all sessions, chronologically.
Reconstruct exact file state at a point in a past session.
Extract git operations (commits, pushes, checkouts) from one or all sessions.
Export a session or episode to a standalone markdown file.
Wire the SessionEnd auto-ingest hook into ~/.claude/settings.json.
Wire the UserPromptSubmit auto-injection hook.
Register Longhand's MCP server with Claude Code / Claude Desktop.
View and tune hook behavior — relevance threshold, injection size, etc. See Configuration.