Tab Ledger

Nothing lost. Everything findable.

pip install tab-ledger
Python 3.10+

Getting started

Three commands to go from zero to searchable.

1
tab-ledger index
Scans ~/.claude/projects/ and indexes all session files
2
tab-ledger build
Builds the knowledge base — FTS5 search, project mapping, cross-session links
3
tab-ledger search "your query"
Search across everything. Done.

Claude Code integration

Add Tab Ledger as an MCP server to give Claude Code native access to your session history.

~/.claude/settings.json
{
  "mcpServers": {
    "tab-ledger": {
      "command": "tab-ledger",
      "args": ["mcp"]
    }
  }
}

This exposes 8 tools:

kb_search kb_semantic kb_context kb_memory kb_session kb_projects kb_timeline kb_stats

Commands

tab-ledger indexIndex sessions from ~/.claude/projects/
tab-ledger buildBuild the knowledge base (8 stages)
tab-ledger search "query"Full-text search (FTS5 syntax)
tab-ledger semantic "query"Semantic search via embeddings
tab-ledger statsToken, cost, and tool analytics
tab-ledger timeline <project>Session history for a project
tab-ledger context <project>Continuation context (next steps, blockers)
tab-ledger memory <project>Full continuity packet
tab-ledger projectsList all indexed projects
tab-ledger session <uuid>Detailed session view
tab-ledger serveWeb dashboard on localhost:7777
tab-ledger mcpStdio MCP server

All commands output JSON. Add --project or --limit N to filter.

Python API

from tab_ledger import KnowledgeBase

kb = KnowledgeBase()
results = kb.search("auth flow", project="my-project")
context = kb.get_continuation_context("my-project")
stats   = kb.get_stats()
kb.close()

How it works

Tab Ledger reads the JSONL session files that Claude Code writes to disk, extracts structured data, and builds a searchable knowledge base. Nothing leaves your machine.

Source
~/.claude/projects/*.jsonl
Storage
~/.tab-ledger/
Databases
ledger.db + knowledge_base.db
Search
SQLite FTS5 + embeddings
github.com/Riley-Coyote/tab-ledger
Local-first. No cloud. All yours.