Deep git repo analytics in your terminal β contributors, hotspots, code churn, effort estimation & beautiful ASCII reports.
Know your codebase like never before. One command, zero config.
- π Full repo analysis β commits, contributors, files, churn, frequency heatmap
- π₯ Hotspot detection β find your most-changed files
- π ASCII bar charts β beautiful Rich-powered terminal output
- β±οΈ Effort estimation β approximate developer hours & sessions
- π Blame viewer β who owns each line, with ownership summary
- π One-line summary β
"2,341 commits by 12 devs across 890 files over 3.2 years" - βοΈ Repo comparison β compare two repos side by side
- π¦ JSON output β pipe into
jqor your favorite tool - π Zero config β just point it at a git repo
# Install
pip install -e .
# Analyze any repo
gitstats analyze /path/to/repo
# One-line summary
gitstats summary /path/to/repo
# Who wrote this file?
gitstats blame src/main.py
# Estimate developer effort
gitstats effort /path/to/repo
# Compare two repos
gitstats compare /path/to/repo1 /path/to/repo2
# JSON output for scripting
gitstats analyze /path/to/repo --format jsonFull repo analysis with:
- Total commits, contributors, files
- Top contributors (with bar charts)
- Most-changed files (hotspots)
- Code churn ratio (added vs deleted)
- Commit frequency heatmap by hour & day
- Language distribution
- Repo age
Rich blame output showing who owns each line, with an ownership summary at the bottom.
Estimates developer effort based on commit patterns:
- Number of coding sessions (3h gap heuristic)
- Estimated total hours
- Per-developer breakdown
One-line repo summary:
π 342 commits by 5 devs across 127 files over 1.2 years
Side-by-side comparison of two repos β commits, contributors, files, churn, languages, age.
from gitstats.git_helpers import get_summary, get_contributors, get_churn
summary = get_summary("/path/to/repo")
print(summary) # "342 commits by 5 devs..."
contributors = get_contributors("/path/to/repo")
for c in contributors:
print(f"{c['name']}: {c['commits']} commits")
churn = get_churn("/path/to/repo")
print(f"Churn ratio: {churn['ratio']}")| Feature | gitstats | git-quick-stats | gitstats (Go) |
|---|---|---|---|
| Language | Python | Bash | Go |
| Rich terminal UI | β | β | β |
| JSON output | β | β | β |
| Effort estimation | β | β | β |
| Repo comparison | β | β | β |
| Zero config | β | β | β |
| Blame viewer | β | β | β |
| Install size | Small | Tiny | Medium |
- SVG/PNG chart export
- Git merge request analysis
- Team velocity trends over time
- Web dashboard mode
- GitHub/GitLab API integration
- Config file support (.gitstatsrc)
- CI/CD pipeline health metrics
MIT β see LICENSE
Built with β€οΈ by zehedisodef1-oss