Skip to main content

Git2Report

Turn a Git repository's history into a plain-language weekly progress report, where every number is counted by code and every line carries commit IDs as proof. The AI (optional, local) only writes sentences.

git2report --repo . --since 7d --audience guide --out report.pdf

Install

python -m venv .venv
.venv\Scripts\activate          # Windows   (Linux/macOS: source .venv/bin/activate)
pip install -e ".[dev]"          # core + pytest
pip install -e ".[ollama]"       # only if you want AI sentences (also install Ollama from ollama.com)

Use

🖥️ Interactive Web Studio GUI

Launch the browser-based dashboard to configure, run, preview, and download reports with 1 click:

git2report --ui               # Opens Web Studio at http://localhost:5000
# or: git2report-ui

💻 Command Line (Terminal)

# 1. Standard full-format generation (PDF + HTML + Markdown)
git2report --repo ./myproject --since 7d --all --out report.html

# 2. Local AI with Ollama (Private, offline, zero API keys)
git2report --repo ./myproject --llm ollama --model llama3:8b
# Or shortcut:
git2report --repo ./myproject --ollama --model mistral

# 3. Cloud AI with Google Gemini (Fast, smart summary caching)
git2report --repo ./myproject --llm gemini --model gemini-2.5-flash

# 4. Pure offline deterministic mode (Zero AI, instant)
git2report --repo ./myproject --llm offline --audience guide

# 5. Targeted audience personas
git2report --repo ./myproject --since 2w --audience client --both          # Business & user-facing
git2report --repo ./myproject --since 2w --audience team --both            # Engineering release notes

# 6. Sprint goals & caching
git2report --repo . --next "Finish payment gateway" --next "Write tests"   # Authentic developer goals
git2report --clear-cache                                                   # Reset summary cache

AI Engines (--llm)

  • --llm ollama: Uses a local model running on your machine via Ollama (e.g., llama3:8b, llama3.2, mistral, deepseek-r1:8b, phi4). Zero data leaves your machine. Automatically discovers available local models. If Ollama is offline or uninstalled, it gracefully falls back to deterministic offline wording without crashing.
  • --llm gemini: Uses Google Gemini (gemini-2.5-flash) with smart SHA-256 caching (.git2report_cache.json) for fast execution and zero duplicate token costs. Set GEMINI_API_KEY in your environment or .env file.
  • --llm offline (default): Builds clean human sentences directly from commit messages without invoking any AI.

Every AI output is validated by code: if the model returns invalid JSON, mentions raw numbers, or mentions file paths, Git2Report automatically retries once and falls back safely.

Evaluation (manual vs tool vs baseline)

git2report-eval sheet --repo ./proj --since 45d --n 25 --out eval.csv    # builds the sheet
# open eval.csv in Excel: write manual_summary, give 1-5 scores, count unsupported claims
git2report-eval score eval.csv --out results.md                          # averages: tool vs baseline

The baseline is what you get without the pipeline: the raw commit message (offline) or the raw commit pasted to the AI (--llm ollama). Be honest in the project report about the sample size and whose repo it was.

Audiences (offline mode)

guide = full list, client = only user-facing work (features, fixes, performance), team = release-notes grouped by type. A commit's type comes from type(scope): if present, otherwise it is guessed from its first word (Add = feature, Fix = fix, Remove = refactor...). It is a heuristic, so check it on your own repo.

How it works (7 steps, one file each)

Step File Output
1 Extract extractor.py list of CommitRecord
2 Filter filtering.py kept commits + a reason for every decision
3 Cluster clustering.py {module: [commits]} (scope, then folder, then commit type)
4 Metrics metrics.py numbers (junk files excluded)
5 Chunk chunker.py short code text per module, within a token budget
6 Summarise summarizer.py one sentence per module (AI or offline), checked by code
7 Report report.py Markdown (Jinja2) and PDF (ReportLab)

Tunable rules (junk files, noise words, aliases, budget) live in config.py.

Develop

pytest -q                  # 38 tests, uses a throw-away real Git repo
bash scripts/make_demo_repo.sh   # 10-commit demo repo in ./demo_repo

Status

Done and tested:

  • Steps 1-7 deterministic pipeline with verified commit hashes.
  • 🖥️ Interactive Web Studio GUI (git2report --ui) with real-time progress, live preview, and direct PDF/HTML/MD downloads.
  • ⚡ Smart Summary Cache (.git2report_cache.json) for instant sub-second re-runs and 0 API token waste.
  • 📊 Visual Analytics & Charts (Commit type distribution segmented bar & module churn chart embedded in PDF & HTML).
  • Offline summaries per audience, unmerged "in progress" branches, developer-written sprint goals.
  • 🦙 Ollama Local AI & Google Gemini Cloud AI: Choose between 100% private local models (llama3:8b, mistral, deepseek-r1) or Google Gemini (gemini-2.5-flash), with automated code-validation and fallback.
  • ReportLab PDF, interactive HTML, Markdown, and 43 automated tests.
  • Tried on demo repo, pallets/click, and real full-stack project (CampusThrift).

Optional future work: config file, multi-repo aggregator.

Metadata

Release files for git2report 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git2report 0.1.0
File Size Uploaded Provenance Actions
git2report-0.1.0.tar.gz 53.9 kB Without provenance Details for git2report-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git2report 0.1.0
File Interpreter ABI Platform Actions
git2report-0.1.0-py3-none-any.whl Python 3 none any Details for git2report-0.1.0-py3-none-any.whl

Total release size: 105.5 kB

Release files / git2report-0.1.0.tar.gz

Download URL git2report-0.1.0.tar.gz
Size 53.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6fd31acf20db336de3424adc9f9fe1207753093480675f0c710a97bdded3e2fe
BLAKE2b-256 checksum
How to use checksums
b52d3ec47b1824d66e44a89f74fa3d999b834d6f7ea85943abe362b5121e083d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / git2report-0.1.0-py3-none-any.whl

Download URL git2report-0.1.0-py3-none-any.whl
Size 51.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1550512a081391074d1a92da7c45d98270158e65a3207091bb8fefe679586332
BLAKE2b-256 checksum
How to use checksums
7fbca9a3bf7964c85121f5da33561dab5e7502596ac773dcb3c02fcc70822d6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for git2report 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page