A command-line tool that generates detailed commit reports from git repositories. It allows you to select a range of commits and creates a comprehensive text report with all commit details.
- Interactive Commit Selection: Choose commits from a list with clear descriptions
- Command-line Arguments: Specify commit ranges directly via command line
- Detailed Reports: Includes commit messages, authors, dates, and files changed
- AI-Enhanced Reports: Generate human-readable summaries using local Ollama
- Flexible Output: Custom output file names or auto-generated timestamps
- Git Integration: Uses git executable to gather accurate repository information
- Git executable in your PATH
- Ollama (for AI-enhanced reports) - install Ollama
- After installation, pull the model (gemma3 is the default model):
ollama pull gemma3 - For faster generation, use smaller models:
ollama pull gemma3:270m(291MB) - For better quality, use larger models (default):
ollama pull gemma3:4b(3.3GB)
- After installation, pull the model (gemma3 is the default model):
cargo install git-reportgit clone <repository-url>
cd git-report
cargo build --releaseThe binary will be available at target/release/git-report.exe (Windows) or target/release/git-report (Linux/macOS).
Run the tool in a git repository to start the interactive commit selection:
git-reportThis will:
- Show you a list of recent commits
- Let you select the "from" commit (older commit)
- Let you select the "to" commit (newer commit)
- Generate a report with all commits in that range (including the from and to commits)
Usage: git-report.exe [OPTIONS]
Options:
-o, --output <OUTPUT> Output file path (default: git-report-{timestamp}.txt)
-f, --from <FROM> From commit hash or reference
-t, --to <TO> To commit hash or reference
-l, --limit <LIMIT> Number of commits to show in selection [default: 50]
--ai Generate AI-enhanced report using local Ollama
--model <MODEL> Ollama model to use for AI generation [default: gemma3]
-h, --help Print help
-V, --version Print version# Generate report for specific commit range
git-report --from abc1234 --to def5678 --output my-report.txt
# Show more commits in selection
git-report --limit 100
# Use partial commit hashes
git-report --from abc1 --to def5
# Generate AI-enhanced report
git-report --ai --from abc1234 --to def5678
# Generate AI-enhanced report with custom output
git-report --ai --output my-ai-report.txt
# Generate AI-enhanced report with specific model
git-report --ai --model llama3.2:3b
# Generate AI-enhanced report with custom model and output
git-report --ai --model qwen3 --output my-report.txtThe generated report includes:
- Header: Repository path, generation timestamp, commit range
- Summary: From/to commits, date range, total commit count
- Detailed Commits: For each commit:
- Commit subject and hash
- Author and date
- Full commit description (if available)
- List of files changed
When using the --ai flag, the entire report is generated by AI using the specified Ollama model. The AI creates a complete, professional report with the following structure:
- Title and Repository Information - Clear identification of the report scope
- Executive Summary - High-level overview of changes made
- Detailed Commit Analysis - In-depth examination of each commit
- Technical Impact Assessment - Analysis of technical changes and their business impact
- Conclusion - Summary of overall work accomplished
The AI report uses professional language, avoids repetition, and explains technical changes in business terms when possible. It's designed to be concise yet comprehensive, and suitable for not tech-savvy people.
You can specify which Ollama model to use with the --model flag. The default model is gemma3. Make sure you have the specified model installed in Ollama.
This commit range includes updates to the project’s report generation and documentation. We’ve added checks to ensure the ‘from’ and ‘to’ commit ranges are correctly included in the generated reports, and enhanced the installation instructions in the README. Key changes include: a new function to check the Ollama server, improved LLM prompt formatting, inclusion of from and to commit details in the reports, and updated installation instructions for Cargo.
This project is licensed under the MIT License. See the LICENSE file for details.