| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Production-grade CLI to analyze Git repositories locally using go-git and go-enry (GitHub Linguist rules).
No git binary required.
go install github.com/loSpaccaBit/git-stats-cli/cmd/git-stats@latestdocker build -t git-stats-cli .
docker run --rm -v "$(pwd):/repo" git-stats-cli analyze /repoDownload binaries from Releases.
# Terminal report (fast — churn off by default)
git-stats analyze .
git-stats analyze /path/to/repo
# Enable churn stats on large repos (slower, uses parallel workers)
git-stats --churn analyze /path/to/repo
git-stats --churn --workers 8 analyze /path/to/repo
# Show timing
git-stats -v analyze /path/to/repo
# Disable colors
git-stats --no-color analyze .
# Show top 20 authors, last 6 months
git-stats --top 20 --months 6 analyze .
# Export reports
git-stats report -f json -o report.json .
git-stats report -f md -o report.md .
git-stats report -f html -o report.html .
# Version
git-stats --versionSame data in machine-readable JSON or human-readable Markdown/HTML.
| Layer | Technology |
|---|---|
| Language | Go 1.22+ |
| CLI | Cobra |
| Git parsing | go-git |
| Language detection | go-enry (Linguist) |
| Terminal output | fatih/color, tablewriter |
| Testing | testing + testify |
| CI/CD | GitHub Actions + GoReleaser |
git-stats-cli/ ├── cmd/git-stats/ # CLI entrypoint ├── internal/ │ ├── analyzer/ # Analysis engine │ ├── formatter/ # Terminal + export renderers │ ├── git/ # go-git wrapper + language detection │ ├── report/ # Report orchestration │ └── version/ # Build version injection ├── pkg/stats/ # Shared data models └── .github/workflows/ # CI and release pipelines
git clone https://github.com/loSpaccaBit/git-stats-cli.git
cd git-stats-cli
go test ./...
go build -o git-stats ./cmd/git-statsgit tag v0.1.0
git push origin v0.1.0GoReleaser publishes multi-platform binaries and attaches checksums automatically.
| Mode | When to use |
|---|---|
| Default (no --churn) | Day-to-day use, large repos, reports json/md/html |
| --churn | When you need lines added/deleted; parallelized via --workers |
| -v / --verbose | Prints analysis duration to stderr |
Benchmark on a local repo:
GIT_STATS_BENCH_REPO=/path/to/repo go test ./internal/analyzer -bench=. -benchmemMIT — see LICENSE.
| Back | FazBrowse Home | New Git URL |