Recapture what you built with Claude — conversation history analyzer and report generator
Project description
Claude Recap
Recapture what you built with Claude Code.
中文文档
Turn your local Claude Code conversation history into interactive dashboards, periodic reports, and AI-powered summaries — all without sending raw conversations anywhere.
Features
- Interactive Dashboard — GitHub-style activity heatmap, project breakdown, filterable session browser
- AI-Powered Summaries — Anthropic, OpenAI, or any OpenAI-compatible API (ollama, vllm, together, deepseek, groq, ...)
- Smart Token Optimization — Auto-sampling and progressive compression for large histories
- Statistical Summaries — Useful reports even without AI: streak analysis, peak periods, project rankings
- Multi-period Reports — Daily / Weekly / Monthly / Yearly
- Purpose-driven Exports — General, Academic, Job Search, Work Report modes
- Multiple Formats — Self-contained HTML, Markdown, JSON
- Cross-platform — macOS, Linux, Windows — auto-detects Claude data directory
- Privacy-first — Runs entirely on your machine; network calls only when you opt in
Getting Started
pip install claude-recap
claude-recap # quick usage stats
claude-recap serve # launch interactive dashboard
claude-recap report --open # generate & open a weekly HTML report
Reports include a statistical summary by default — no API key required.
AI Setup (Optional)
Use any LLM provider for richer narrative summaries:
claude-recap config --setup
Interactive setup walks you through choosing a provider:
| # | Provider | Install | Example |
|---|---|---|---|
| 1 | Anthropic (Claude) | pip install claude-recap[ai] |
Claude Sonnet / Opus |
| 2 | OpenAI | pip install claude-recap[openai] |
GPT-4o / GPT-4o-mini |
| 3 | OpenAI-compatible | pip install claude-recap[openai] |
ollama, vllm, together, deepseek, groq, etc. |
Or install everything: pip install claude-recap[all]
Using environment variables (alternative to config --setup):
# Anthropic
export ANTHROPIC_API_KEY=sk-ant-...
# OpenAI
export OPENAI_API_KEY=sk-...
# OpenAI-compatible (e.g. ollama)
export OPENAI_API_KEY=not-needed
export OPENAI_BASE_URL=http://localhost:11434/v1
export CLAUDE_RECAP_MODEL=llama3
export CLAUDE_RECAP_PROVIDER=openai
Then generate reports with AI:
claude-recap report --ai # AI-enhanced report
claude-recap report --ai --purpose academic # AI academic report
Usage
claude-recap — Quick Stats
$ claude-recap
╭──────────────────────╮
│ Claude Recap v0.1.0 │
╰── 2026-03-10 → 04-04 ╯
Sessions 42
Messages 2665
Active Days 18
Projects 12
claude-recap serve — Interactive Dashboard
claude-recap serve [--port 6275]
Opens a local dashboard with activity heatmap, messages-per-day chart, project & tool breakdown, session browser with filters, and an AI Insights button.
claude-recap report — Generate Reports
claude-recap report # weekly HTML + stats summary
claude-recap report --ai -p monthly --purpose academic # monthly academic + AI summary
claude-recap report --from 2026-01-01 --to 2026-03-31 # custom date range
claude-recap report -f markdown --purpose work_report # Markdown work report
| Purpose | Focus |
|---|---|
general |
Overall activity and key conversations |
academic |
Research activities, experiments, methodologies |
job_search |
Technical skills, tools used, problem complexity |
work_report |
Deliverables, productivity, project progress |
claude-recap config — Manage AI Provider
claude-recap config --setup # interactive provider setup
claude-recap config --show # show current config
claude-recap config --set-key # update API key only
claude-recap schedule — Automate Reports
claude-recap schedule --period weekly
Prints platform-specific cron / Task Scheduler instructions for recurring report generation.
Token Optimization
For users with large conversation histories, Claude Recap automatically:
- Samples strategically — keeps all recent sessions (last 14 days), uniformly samples older ones (cap: 200 sessions)
- Compresses progressively — if the prompt exceeds the token budget, reduces topic count and content length in stages
- Shows estimates — displays estimated token count before making API calls
This means even with thousands of sessions, a single API call stays within reasonable bounds.
How It Works
Claude Recap reads the JSONL conversation logs stored locally by Claude Code:
| Platform | Default Location |
|---|---|
| macOS / Linux | ~/.claude/ |
| Windows | %LOCALAPPDATA%\claude\ or %APPDATA%\claude\ |
Override with --dir or CLAUDE_HISTORY_DIR. All processing happens locally. The optional --ai flag sends only condensed session metadata (not full conversations) to your configured LLM provider.
Development
git clone https://github.com/MazelTovy/claude-recap.git
cd claude-recap
pip install -e ".[all]"
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_recap-0.2.0.tar.gz.
File metadata
- Download URL: claude_recap-0.2.0.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8d6de2c8a092a48ab357bbca24c55d2085254a02328d905ad05ffc8efb1b821
|
|
| MD5 |
0da30eeef5db313a6faf3d36fc37226f
|
|
| BLAKE2b-256 |
39c2ac5759fa57fdc72ebcce43a91be9af94d7868f0c06ba22e3434f51a7d1e9
|
File details
Details for the file claude_recap-0.2.0-py3-none-any.whl.
File metadata
- Download URL: claude_recap-0.2.0-py3-none-any.whl
- Upload date:
- Size: 37.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d59a76dd101fabde0c21671dc3b35ff31ad462e5a7a0391fdabe7faa71dfe79
|
|
| MD5 |
24ca7f99fe3a8641460c98ccbed0c330
|
|
| BLAKE2b-256 |
cb2b11621719f3261d1a3ad9f0ae2712e67d63f4480378954d1549b958b675c3
|