Summarize recent Git contributions into clear, human-readable updates using AI
Project description
git-digest
Summarize recent Git contributions into clear, human-readable updates using AI. Perfect for standup meetings, progress reports, and understanding what happened in your repositories.
Features
- 🤖 AI-Powered Summaries: Uses Cohere, OpenAI or Anthropic to generate intelligent summaries
- 📁 Multi-Repository Support: Analyze multiple repositories simultaneously
- 👥 Author Filtering: Focus on specific contributors' work
- 📅 Flexible Date Ranges: Filter by date, days, or commit count
- 🎯 Two Summary Modes: Chronological overview or grouped by author
- 🔍 Cross-Repository Analysis: Identify related work across multiple projects
- 📊 Detailed Logging: Track what's being analyzed with debug mode
Installation
Using pip
pip install git-digest
Using pipx (recommended)
pipx install git-digest
From source
git clone https://github.com/rafidka/git-digest.git
cd git-digest
uv sync
Setup
You'll need an API key for one of the supported LLM providers:
OpenAI
export OPENAI_API_KEY="your-api-key-here"
Cohere (default)
export COHERE_API_KEY="your-api-key-here"
Anthropic
export ANTHROPIC_API_KEY="your-api-key-here"
Quick Start
# Summarize the current repository (last 7 days)
git-digest .
# Summarize multiple repositories
git-digest /path/to/repo1 /path/to/repo2
# Use a specific LLM provider
git-digest . --provider openai
# Get commits from a specific time period
git-digest . --since "2024-01-01" --until "2024-01-31"
# Focus on specific authors
git-digest . --authors "alice,bob"
# Group summary by author instead of chronological
git-digest . --by-author
Usage Examples
Basic Usage
# Analyze current directory (default: last 7 days)
git-digest .
# Analyze specific repository
git-digest /path/to/my/project
# Multiple repositories
git-digest ~/projects/frontend ~/projects/backend ~/projects/mobile
Time Filtering
# Last N days
git-digest . --days 14
# Last N commits
git-digest . --count 50
# Specific date range
git-digest . --since "2024-01-01" --until "2024-01-31"
# Natural language dates
git-digest . --since "last monday" --until "yesterday"
git-digest . --since "1 week ago"
Author Filtering
# Single author (partial matching, case-insensitive)
git-digest . --authors alice
# Multiple authors
git-digest . --authors alice,bob,charlie
# Or using multiple flags
git-digest . --authors alice --authors bob
Summary Modes
# Chronological overview (default)
git-digest .
# Group by author
git-digest . --by-author
# Author-focused analysis with time filter
git-digest . --by-author --days 30 --authors "alice,bob"
Advanced Examples
# Debug mode with detailed logging
git-digest . --debug
# Multi-repo analysis for the last 2 weeks using OpenAI
git-digest ~/projects/* --days 14 --provider openai --debug
# Focus on recent work by specific team members
git-digest . --days 7 --authors "alice,bob,charlie" --by-author
# Last 25 commits across multiple repos
git-digest ~/frontend ~/backend --count 25
Command Line Options
| Option | Short | Description |
|---|---|---|
repo_paths |
Paths to git repositories to analyze (required) | |
--since |
-s |
Start date (e.g., '2024-01-01', '1 week ago', 'yesterday') |
--until |
-u |
End date (e.g., '2024-01-31', 'today') |
--days |
-d |
Get commits from the last N days (overrides since/until) |
--count |
-c |
Get the last N commits (overrides since/until/days) |
--authors |
Filter commits by author names (supports comma-separated values) | |
--by-author |
Group summary by author instead of chronological overview | |
--provider |
LLM provider: openai, cohere (default), anthropic | |
--debug |
Enable debug logging | |
--help |
Show help message |
Supported LLM Providers
| Provider | Default Model | Environment Variable |
|---|---|---|
| Cohere (default) | command-a-03-2025 | COHERE_API_KEY |
| OpenAI | gpt-5 | OPENAI_API_KEY |
| Anthropic | claude-opus-4-1-20250805 | ANTHROPIC_API_KEY |
Sample Output
Chronological Mode
==================================================
GIT DIGEST SUMMARY
==================================================
Based on the recent commits from your repository, here's what's been happening:
## Key Development Activities
**Feature Development**
- Implemented user authentication system with JWT tokens
- Added password reset functionality with email verification
- Created user profile management interface
**Bug Fixes & Improvements**
- Fixed memory leak in data processing pipeline
- Improved error handling in API endpoints
- Enhanced logging for better debugging
**Infrastructure & Maintenance**
- Updated dependencies to latest stable versions
- Added comprehensive test coverage for auth module
- Set up automated deployment pipeline
The development focus has been on strengthening the authentication system while maintaining code quality through better testing and monitoring.
==================================================
By-Author Mode
============================================================
GIT DIGEST SUMMARY - BY AUTHOR
============================================================
## Alice Johnson <alice@company.com> (15 commits)
Alice focused on the authentication system overhaul, implementing JWT-based login, password reset functionality, and user profile management. She also enhanced the API security by adding proper input validation and rate limiting. Her work established a solid foundation for user management features.
## Bob Smith <bob@company.com> (8 commits)
Bob concentrated on infrastructure improvements, updating the CI/CD pipeline and adding comprehensive test coverage. He also fixed several critical bugs in the data processing module and improved overall system performance through caching optimizations.
## Charlie Brown <charlie@company.com> (5 commits)
Charlie worked on frontend enhancements, improving the user interface for the new authentication features and fixing responsive design issues. He also contributed to the documentation updates and helped with code review processes.
============================================================
Environment Variables
All environment variables are optional but at least one LLM provider API key is required:
OPENAI_API_KEY- OpenAI API keyCOHERE_API_KEY- Cohere API keyANTHROPIC_API_KEY- Anthropic API key
Error Handling
git-digest provides helpful error messages for common issues:
- Missing API keys: Clear instructions on which environment variable to set
- Invalid repositories: Identifies which paths are not valid git repositories
- Network issues: Graceful handling of API connectivity problems
- Empty results: Informative messages when no commits match your criteria
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Install development dependencies:
uv sync --dev - Install pre-commit hooks:
uv run pre-commit install - Make your changes and add tests
- Run the test suite:
uv run pytest - Run linting:
uv run ruff check && uv run pyright - Pre-commit hooks will automatically run on commit, or manually:
uv run pre-commit run --all-files - Submit a pull request
Development
# Clone and setup
git clone https://github.com/rafidka/git-digest.git
cd git-digest
uv sync --dev
# Install pre-commit hooks
uv run pre-commit install
# Run from source
uv run git-digest . --help
# Run tests
uv run pytest
# Format and lint
uv run ruff format
uv run ruff check
uv run pyright
# Run all pre-commit checks
uv run pre-commit run --all-files
Releasing
This project uses automated PyPI publishing via GitHub Actions. To create a new release:
- Update the version in
pyproject.toml - Commit the version change:
git commit -am "Bump version to X.Y.Z" - Create a git tag:
git tag vX.Y.Z - Push tag and commits:
git push && git push --tags - Create a GitHub Release from the tag at https://github.com/rafidka/git-digest/releases/new
- GitHub Actions will automatically:
- Run all quality checks
- Build the package
- Publish to PyPI
Setting up PyPI Publishing (First Time)
To enable automatic PyPI publishing, you need to:
-
Set up PyPI Trusted Publishing:
- Go to https://pypi.org/manage/account/publishing/
- Add a new publisher for
your-username/git-digest - Environment name:
pypi
-
Create GitHub Environment:
- Go to your repo Settings → Environments
- Create environment named
pypi - No additional protection rules needed (workflow uses OIDC)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
v0.7.0
- Renamed project from
git-recaptogit-digest - Added comprehensive PyPI metadata
- Set up automated PyPI publishing workflow
- Enhanced project documentation
Previous Versions
- v0.5.2: Multi-repository analysis, author filtering, cross-repository coordination
- v0.1.0: Initial release with basic Git commit summarization
Project details
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 git_digest-0.7.3.tar.gz.
File metadata
- Download URL: git_digest-0.7.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00845e45074b597538a6e22a5651c89df55e2765492170e4e8ba40417b133f46
|
|
| MD5 |
3acc2ed3e48e535fc57b8e23908b68d1
|
|
| BLAKE2b-256 |
aae99eb4d9d45e3c7e3ed02f934e6ce68d538aaab4099dde7f33c66b16313cc5
|
Provenance
The following attestation bundles were made for git_digest-0.7.3.tar.gz:
Publisher:
publish.yml on rafidka/git-digest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_digest-0.7.3.tar.gz -
Subject digest:
00845e45074b597538a6e22a5651c89df55e2765492170e4e8ba40417b133f46 - Sigstore transparency entry: 460775566
- Sigstore integration time:
-
Permalink:
rafidka/git-digest@8631c5e92644eefac07dceeb7259383d136aeb9f -
Branch / Tag:
refs/tags/v0.7.3 - Owner: https://github.com/rafidka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8631c5e92644eefac07dceeb7259383d136aeb9f -
Trigger Event:
release
-
Statement type:
File details
Details for the file git_digest-0.7.3-py3-none-any.whl.
File metadata
- Download URL: git_digest-0.7.3-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15c9446342a7f876d1de9b2ed31ec4bc0e69a9c17b16b3343467a15bc57b0cdc
|
|
| MD5 |
944055aa6f3efccb2409e9149841de89
|
|
| BLAKE2b-256 |
f033fd7e377a96db8910bce914fbc00792a1d7d8ae226a5620bf391d6659e29e
|
Provenance
The following attestation bundles were made for git_digest-0.7.3-py3-none-any.whl:
Publisher:
publish.yml on rafidka/git-digest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_digest-0.7.3-py3-none-any.whl -
Subject digest:
15c9446342a7f876d1de9b2ed31ec4bc0e69a9c17b16b3343467a15bc57b0cdc - Sigstore transparency entry: 460775585
- Sigstore integration time:
-
Permalink:
rafidka/git-digest@8631c5e92644eefac07dceeb7259383d136aeb9f -
Branch / Tag:
refs/tags/v0.7.3 - Owner: https://github.com/rafidka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8631c5e92644eefac07dceeb7259383d136aeb9f -
Trigger Event:
release
-
Statement type: