#git #statistics #dev-tools #cli

bin+lib git-insights

A CLI tool to generate Git repo stats and insights

5 releases

0.0.5-rc.2 Oct 4, 2025
0.0.4 Sep 23, 2025
0.0.3 Sep 21, 2025
0.0.2 Sep 21, 2025
0.0.1 Sep 20, 2025

#2399 in Command line utilities

Download history

260 downloads per month

MIT license

165KB
4.5K SLoC

git-insights

package-build Crates.io Docs Deps

A cli tool to generate Git repo stats and insights.

Features

  • Overall repository statistics
    • Total commit count
    • Total file count
    • Total lines of code (LOC)
    • Per-author breakdown (LOC/commits/files) with % distribution
  • Individual user insights
    • Get file "ownership" list
    • Ownership table flags: --top N, --sort loc|pct and --by-email (default matches by name)
    • Total locs, inserts, updates, deletes
    • Past PRs/issues count
    • Tags/releases count
  • Data export
    • Export to JSON
    • Export to CSV
  • Visualizations
    • Commit heatmap
    • Code-frequency histograms (hour-of-day, day-of-week, day-of-month)
    • Code-frequency heatmaps (day-of-week x hour-of-day, day-of-month x hour-of-day)
    • Hotspot analysis
    • Timeline charts
  • CLI/UX
    • Fast, no-deps
    • Helpful global and per-command help
    • Version command
    • Clean progress spinner while processing files
    • Group by author name by default, or use --by-email for "Name <email>"
    • Clean git calls (no pager)

Installation

Installing from crates.io

cargo install git-insights

Installing via cargo + git

cargo install --git https://github.com/Magnus167/git-insights.git

Building from source

git clone https://github.com/Magnus167/git-insights.git
cd git-insights
cargo install --path .

Installing via pip (Python)

This project provides an optional Python package built with maturin/pyo3. Requirements:

  • Rust toolchain (for building the extension)
  • Python with pip
  • maturin (recommended): pip install maturin

Install the Python package:

pip install .

Alternatively for local dev:

maturin develop --features python

Python usage

  • CLI via Python:
python -m git_insights --help
  • CLI via console script (installed by pip):
git-insights --help

Usage

git-insights provides several commands to analyze your repository. To see the available commands and options, run:

git-insights --help

License

MIT License. See LICENSE file for details.

Dependencies

~2–4MB
~67K SLoC