git-report

Crates.iogit-report
lib.rsgit-report
version1.1.0
created_at2025-08-19 22:00:24.323429+00
updated_at2025-09-21 21:30:52.893681+00
descriptionA CLI tool to generate detailed commit reports from git repositories.
homepage
repositoryhttps://github.com/fresh-milkshake/git-report
max_upload_size
id1802556
size83,942
Nik (fresh-milkshake)

documentation

README

Git Report Logo
Rust Ollama Git tokio License: MIT

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.

Features

  • 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

Installation

Prerequisites

  • 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)

Install from cargo

cargo install git-report

Build from Source

git clone <repository-url>
cd git-report
cargo build --release

The binary will be available at target/release/git-report.exe (Windows) or target/release/git-report (Linux/macOS).

Usage

Basic Usage

Run the tool in a git repository to start the interactive commit selection:

git-report

This will:

  1. Show you a list of recent commits
  2. Let you select the "from" commit (older commit)
  3. Let you select the "to" commit (newer commit)
  4. Generate a report with all commits in that range (including the from and to commits)

Command-line Options

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

Examples

# 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.txt

Report Format

The 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

AI-Enhanced Reports

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:

  1. Title and Repository Information - Clear identification of the report scope
  2. Executive Summary - High-level overview of changes made
  3. Detailed Commit Analysis - In-depth examination of each commit
  4. Technical Impact Assessment - Analysis of technical changes and their business impact
  5. 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.

Example Report Output

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.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Commit count: 11

cargo fmt