Git activity analysis and LLM-powered summary tools for developers and consultants
Project description
Code Recap
Generate beautiful activity reports, client summaries, and blog posts from your git history—powered by LLMs.
What It Does
Code Recap helps developers and consultants who work across multiple repositories:
📊 Year-in-Review Reports — Generate polished summaries of your work for clients, complete with statistics, achievements, and technology breakdowns. Export as Markdown or HTML.
⏱️ Daily Time Logging — Quickly summarize what you worked on today (or any day) for billing and time tracking. No more digging through commits.
✍️ Blog Post Generation — Turn your commits into technical blog posts. The AI researches your changes and drafts content with real code examples.
📈 Activity Statistics — Track commits, lines changed, languages used, and coding streaks across all your projects.
🗂️ Multi-Client Organization — Automatically group repositories by client using pattern matching. Each client gets their own reports.
📝 Example Output
See what generated reports look like:
- Example HTML Report — Browse the styled HTML version
- Monthly summary (markdown)
- Annual client summary (markdown)
Use Cases
Year-end report with HTML
code-recap summarize 2025 --author "Your Name" --html --open
# → Reports saved to ./code-recap-2025/ (markdown + HTML)
Daily time logging
code-recap daily --author "Your Name" --date yesterday
Blog post from your commits
code-recap blog full "Building a Custom Protocol" --period 2025-Q3 --author "Your Name"
Multi-year statistics (CSV export)
code-recap stats 2020:2025 --author "Your Name" --granularity year --format csv
How It Works
Run code-recap from a directory containing git repositories:
~/Documents/Repos/ # Run code-recap here
├── project-a/ # Git repository (scanned)
├── project-b/ # Git repository (scanned)
├── side-project/ # Git repository (scanned)
└── code-recap-2025/ # Generated reports (created)
├── summary-2025.md
└── html/
└── index.html
No configuration needed for basic use. Just run the command and get a unified report.
For Consultants (Optional)
If you work with multiple clients, create a config.yaml to organize reports by client (see example config):
clients:
"Acme Corp":
directories:
- "acme-*" # Matches acme-firmware, acme-ios, etc.
"Beta Inc":
directories:
- "beta-*"
This creates separate reports per client in code-recap-2025/acme_corp/, etc.
Quick Start
# Initialize (creates config, prompts for API keys, shows next steps)
uvx code-recap init
# Or set API key manually
export OPENAI_API_KEY='sk-...'
# Generate your year-in-review
cd ~/Documents/Repos
uvx code-recap summarize 2025 --author "Your Name" --html --open
# → Output: ./code-recap-2025/
That's it! Your reports open automatically in the browser.
Installation Options
# Run directly (no install)
uvx code-recap summarize 2025 --author "Your Name"
# Or install globally
uv tool install code-recap # then use: code-recap summarize ...
pip install code-recap # then use: code-recap summarize ...
Configuration (Optional)
For multi-client workflows:
code-recap init # Creates config.yaml + API key files
# Edit config.yaml to define your clients
Or copy the full example with all options documented.
Recommended Models
Code Recap uses LiteLLM to support multiple LLM providers. Choose based on your needs:
| Model | Command | Best For | Cost |
|---|---|---|---|
| GPT-4o-mini | --model gpt-4o-mini |
Default choice, reliable and fast | ~$0.15/year |
| Gemini 2.0 Flash | --model gemini/gemini-2.0-flash |
Large codebases (1M context), very fast | ~$0.05/year |
| Claude Haiku | --model anthropic/claude-3-5-haiku-latest |
Best writing quality for summaries | ~$0.30/year |
Costs shown are approximate for summarizing 1 year of typical developer activity (~3000 commits).
# Examples
code-recap summarize 2025 --author "Your Name" # Uses default (GPT-4o-mini)
code-recap summarize 2025 --author "Your Name" --model gemini/gemini-2.0-flash
code-recap summarize --list-models # See all available models
Command Reference
All functionality is accessed through the code-recap command with subcommands:
code-recap <command> [options]
Commands:
summarize, report LLM-powered activity summaries (main command)
daily, today Daily activity for time logging
stats, activity Statistics without LLM (text/markdown/CSV)
html Convert markdown to HTML reports
blog Generate blog posts from commits
commits List commits for a date
deploy Deploy HTML reports
git, repos Repository utilities (fetch, archive)
code-recap summarize — LLM-Powered Summaries
Generates narrative summaries of git activity using hierarchical LLM summarization.
code-recap summarize 2025 --author "Your Name" # All clients
code-recap summarize 2025 --author "Your Name" --client "Acme" # Specific client
code-recap summarize 2025 --author "@company.com" # Match by email domain
code-recap summarize 2025 --author "Your Name" --html --open # With HTML + open browser
code-recap summarize 2025 --author "Your Name" --dry-run # Preview (no API cost)
| Option | Description | Default |
|---|---|---|
--granularity |
Period breakdown (week/month/quarter/year) | month |
--model |
LLM model (see Recommended Models above) | gpt-4o-mini |
--client |
Filter to specific client | All clients |
--max-cost |
Budget limit in USD | 1.00 |
--html |
Also generate HTML reports | false |
--open |
Open HTML in browser (implies --html) | false |
--dry-run |
Preview without API calls | false |
code-recap daily — Daily Time Logging
Generates concise summaries for a specific date—perfect for time tracking and billing.
code-recap daily --author "Your Name" # Today
code-recap daily --author "Your Name" --date yesterday
code-recap daily --author "Your Name" --date -2 # 2 days ago
code-recap daily --author "Your Name" --no-llm # Just list commits
code-recap stats — Statistics & CSV Export
Generates detailed statistics with support for text, markdown, and CSV output.
code-recap stats 2025 --author "Your Name"
code-recap stats 2020:2025 --author "Your Name" --granularity year --format csv
code-recap stats 2025-Q3 --author "Your Name" --format markdown
Output includes: commit counts, line changes, per-language breakdown, per-project stats, active days, and coding streaks.
code-recap blog — AI Blog Post Generator
Two-stage pipeline: research commits first, then generate a polished blog post.
# Full pipeline
code-recap blog full "Building a Real-Time LED Controller" \
--period 2025-09 --author "Your Name"
# Or step by step (allows editing research before writing)
code-recap blog research "My Topic" --period 2025-Q3 --author "Your Name"
code-recap blog write output/blog/my-topic/research.md
code-recap html — Branded HTML Reports
Converts markdown summaries to styled HTML reports with your company branding.
code-recap html # Generate all HTML reports
code-recap html --client "Acme" # Just one client
code-recap commits — Daily Commit Log
Lists all commits for a specific date across all repositories.
code-recap commits 2025-01-03 --author "Your Name"
code-recap commits $(date +%Y-%m-%d) --author "Your Name" # Today
code-recap git — Repository Management
Utilities for managing multiple repositories.
code-recap git fetch # Fetch all repos in parallel
code-recap git archive --days 365 # Archive inactive repos (dry run)
code-recap git archive --days 365 --execute
code-recap git unarchive my-project --execute
Configuration
Configuration is optional. For basic use, just run the scripts—no config needed.
For customization, create a template config:
code-recap init # Creates config.yaml with commented examples
Or copy the full example with all options documented.
Client Configuration (config.yaml) — Optional
If you're a consultant working with multiple clients, configure project-to-client mapping:
clients:
"Acme Corp":
directories:
- "acme-*" # Matches acme-firmware, acme-ios, etc.
exclude:
- "*-legacy" # Except acme-legacy (goes to Other)
"Beta Inc":
directories:
- "beta-*" # Matches beta-api, beta-frontend
Personal:
directories:
- "dotfiles" # Exact match
- "my-*" # Glob pattern
# Optional: assign unmatched projects to a default client
# default_client: Personal
Matching rules:
directories: Glob patterns for repo directory names (supports*,?,[seq])exclude: Patterns to exclude (takes precedence overdirectories)- Use
*keyword*for substring matching - Matching is case-insensitive
- First match wins (order matters in YAML)
- Unmatched projects go to "Other"
Exclusion Patterns (excludes.yaml)
Configure files/directories to exclude from line count statistics:
# Global exclusions (apply to all projects)
global:
- "*.hex"
- "*/build/*"
- "package-lock.json"
# Project-specific exclusions
projects:
MyProject:
- "vendor/*"
AnotherProject:
- "generated/*"
API Keys (config/keys/)
For LLM-powered scripts (summarize_activity.py, generate_blog_post.py), set API keys as environment variables:
# OpenAI
export OPENAI_API_KEY='sk-...'
# Anthropic
export ANTHROPIC_API_KEY='sk-ant-...'
# Google Gemini
export GEMINI_API_KEY='...'
Or create key files in config/keys/ and source them:
# Copy examples
cp -r config.example/keys config/keys
# Edit with your keys
nano config/keys/openai.sh
# Source all keys
source config/keys/all.sh
Installation
Using uv (Recommended)
cd ~/Documents/Repos/code-recap
# Install as a tool
uv tool install .
# Or run directly
uv run code-recap summarize 2024 --author "Your Name"
uv run code-recap stats 2024 --author "Your Name"
uv run code-recap commits 2024-01-15 --author "Your Name"
uv run code-recap git fetch
Using pip
cd ~/Documents/Repos/code-recap
# Install in development mode
pip install -e .
# Then run
code-recap summarize 2024 --author "Your Name"
Development
# Install with dev dependencies (includes ruff)
uv sync --dev
# Run linting
uv run ruff check .
uv run ruff format .
Dependencies
- Python 3.9+
- Git (command line)
- litellm (for
summarize_activity.pyandgenerate_blog_post.py) - pyyaml (for configuration parsing)
- ruff (dev only, for linting)
Common Options
Most scripts share these options:
| Option | Description | Default |
|---|---|---|
--root |
Root directory containing repos | Parent of cwd |
--author |
Filter commits by author | Required |
--client |
Client name for organizing outputs | (none) |
--output-dir |
Base output directory | output/ |
-o, --output |
Explicit output file path | Auto-generated |
--stdout |
Write to stdout instead of file | false |
--filter |
Filter repos by name pattern | All repos |
--no-fetch |
Skip fetching before processing | Fetch enabled |
License
MIT License - see LICENSE for details.
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 code_recap-1.0.4.tar.gz.
File metadata
- Download URL: code_recap-1.0.4.tar.gz
- Upload date:
- Size: 91.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27652491dda9113ad348e55b6a0c619d49f9c253c2f2b206dfe59dd971fd88e5
|
|
| MD5 |
ae41b50a3e0cd41c53fdb4937fe7e0e4
|
|
| BLAKE2b-256 |
02ba95cfa08e53eeab35bfb0b83db91074fe6f086090eb34d692f08c52fdbb7f
|
Provenance
The following attestation bundles were made for code_recap-1.0.4.tar.gz:
Publisher:
publish.yml on NRB-Tech/code-recap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_recap-1.0.4.tar.gz -
Subject digest:
27652491dda9113ad348e55b6a0c619d49f9c253c2f2b206dfe59dd971fd88e5 - Sigstore transparency entry: 797438871
- Sigstore integration time:
-
Permalink:
NRB-Tech/code-recap@5e3cbdf3dbe2ac96473362c6dd473a1faf8317c1 -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/NRB-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e3cbdf3dbe2ac96473362c6dd473a1faf8317c1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file code_recap-1.0.4-py3-none-any.whl.
File metadata
- Download URL: code_recap-1.0.4-py3-none-any.whl
- Upload date:
- Size: 93.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a4bff5c177f65748fb47510b85bdc9b29a16f88c50f090ee5481dfede4a530b
|
|
| MD5 |
d75561e5776f8506155e1c051da345e3
|
|
| BLAKE2b-256 |
1ab77cca2be07d2bf131eb8852597640552ff4a213aedaaec23434bf0b46143c
|
Provenance
The following attestation bundles were made for code_recap-1.0.4-py3-none-any.whl:
Publisher:
publish.yml on NRB-Tech/code-recap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_recap-1.0.4-py3-none-any.whl -
Subject digest:
0a4bff5c177f65748fb47510b85bdc9b29a16f88c50f090ee5481dfede4a530b - Sigstore transparency entry: 797438877
- Sigstore integration time:
-
Permalink:
NRB-Tech/code-recap@5e3cbdf3dbe2ac96473362c6dd473a1faf8317c1 -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/NRB-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e3cbdf3dbe2ac96473362c6dd473a1faf8317c1 -
Trigger Event:
push
-
Statement type: