npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@v0idd0/gitstats

v2.0.2

Published

gitstats — local git analytics CLI. Lines of code, commits over time, contributors, heatmap, hotspots, bus factor, streaks, release cadence, burndown. Free forever from vøiddo.

Readme

gitstats

npm version npm downloads License: MIT Node ≥14

Local git analytics, no signup, no remote. Run it in any repo and get an instant read on the codebase — LOC, contributors, commit heatmap, bug hotspots, bus factor, streaks, release cadence, burndown.

Free forever gift from vøiddo.

  gitstats — voiddo.com/tools/gitstats
  ────────────────────────────

  SUMMARY
  ───────
  Repository:   my-repo
  Commits:      1,423
  Contributors: 7
  First commit: 2023-11-02
  Last commit:  2026-04-22 (3 hours ago)

  HOTSPOTS (most-changed files)
  ────────
     87  ██████████████  src/api/router.py
     61  █████████░░░░░  src/models/user.py
     54  ████████░░░░░░  src/services/billing.py
     ...

  BUS FACTOR
  ──────────
  2 author(s) cover 50% of 1423 commits.
    • Jane Doe              612  43.0%
    • John Smith            251  17.6%

Why gitstats

git log | wc -l gives you one number. cloc doesn't know about history. GitHub's "Insights" tab is behind a login, and it lies by omission (no bus-factor, no streaks, no hotspots). gitstats runs locally in your terminal, reads only what git already tells it, and surfaces the metrics that actually help you ship.

Install

npm install -g @v0idd0/gitstats

Or one-shot via npx:

npx -y @v0idd0/gitstats --hotspots --top 30

Quickstart

# Full dashboard (summary + LOC + contributors)
gitstats

# Specific metrics
gitstats --loc --commits --heatmap
gitstats --hotspots --top 30
gitstats --bus-factor
gitstats --streak
gitstats --releases
gitstats --weekday --hours
gitstats --burn                      # additions vs deletions per month
gitstats --coauthors                 # Co-Authored-By leaderboard

# Per-author deep-dive
gitstats --author "Jane Doe"
gitstats --author "Jane Doe" --streak --hotspots

# Date / range filters
gitstats --since 2026-01-01 --until 2026-03-31 --contributors
gitstats --last-month
gitstats --last-year
gitstats --range v1.0.0..v2.0.0 --contributors --hotspots

# Machine output
gitstats --json --hotspots | jq '.hotspots[0]'
gitstats --csv --contributors > contributors.csv

Metrics

| Flag | What it shows | |------|---------------| | --summary | One-block overview: repo name, commit count, contributors, first/last commit | | -l, --loc | Lines of code by extension, with bars + percentages | | -c, --commits | Commits by month (last 12) | | --contributors | Top contributors leaderboard with commit bars | | -H, --heatmap | 52-week ASCII activity heatmap (GitHub-style) | | --hotspots | Most-changed files (churn analysis, bug-hotspot signal) | | --bus-factor | How many authors cover 50% of commits — low = risky | | --weekday | Commit distribution by day of week | | --hours | Commit distribution by hour of day (0–23) | | --burn | Additions vs deletions per month (green vs red bars) | | --releases | Git tag cadence — average gap between releases | | --streak | Longest + current daily commit streak | | --coauthors | Co-Authored-By trailer leaderboard | | -a, --author <name> | Per-author stats: commits, first/last, additions, deletions, net |

Filters

| Flag | Description | |------|-------------| | --since <date> | Include commits on/after this date | | --until <date> | Include commits on/before this date | | --last-month | Shortcut for --since 30 days ago | | --last-year | Shortcut for --since 1 year ago | | --range <rev1..rev2> | Limit to a ref range (e.g. v1.0..v2.0) |

Output

| Flag | Description | |------|-------------| | --json | Emit the picked metrics as JSON | | --csv | Emit contributors / LOC / hotspots / summary as CSV | | --top <N> | Limit hotspots / contributors rows (default 20) | | -h, --help | Show help | | --version | Show version |

Features worth calling out

Hotspots — bug-hotspot signal

Counts how many commits touched each file. Files at the top of the list are where churn concentrates — where bugs cluster, where refactors avoid, where onboarding hits hardest. A classic signal from Your Code as a Crime Scene, computed in under a second on any repo.

Bus factor

How many authors do you need to read to understand 50% of the repo's history? If the answer is 1, you have a people-risk problem, not a code problem. gitstats surfaces the raw number plus a ⚠ warning when it's ≤ 1.

Streak

Longest and current consecutive-day commit streak. Useful for solo-dev retros, not as a productivity cudgel.

Release cadence

Reads refs/tags, computes average gap between tags, and shows your last 5 release intervals. Useful for "are we shipping faster or slower than last quarter?" without pulling up GitHub.

Burndown

Additions vs deletions per month as stacked green/red bars. Fast visual signal for "is this codebase growing unbounded or being maintained?"

Range-aware everything

--range v1.0..v2.0 --hotspots tells you which files changed most between two releases. Great for changelog prep and regression risk review.

Shell-injection-safe

Every git invocation uses spawnSync('git', [...args]) — no shell interpolation — so --author "x\"; rm -rf /" is just a query with no matches, not a catastrophe.

Programmatic use

const analyzer = require('@v0idd0/gitstats/src/analyzer');

const hotspots = analyzer.getHotspots(process.cwd(), {}, 10);
const bf = analyzer.getBusFactor(process.cwd());
const streak = analyzer.getStreak(process.cwd());

console.log('top hotspot:', hotspots[0]);
console.log('bus factor:', bf.factor);
console.log('longest streak:', streak.longest);

Exports: isGitRepo, getRepoName, getCommitCount, getContributors, getLinesOfCode, getCommitsByDay, getCommitsByMonth, getCommitsByWeekday, getCommitsByHour, getFirstCommit, getLastCommit, getLastCommitRelative, generateHeatmap, getAuthorStats, getHotspots, getBusFactor, getStreak, getReleaseCadence, getCoauthors, getBurndown.

From the same studio

vøiddo builds sharp, free-forever CLIs for devs who are tired of paywalls:

Full catalog: voiddo.com/tools.

License

MIT © vøiddo — free forever, no asterisks.

Links

  • Docs: https://voiddo.com/tools/gitstats/
  • Source: https://github.com/voidd0/gitstats
  • npm: https://npmjs.com/package/@v0idd0/gitstats
  • Studio: https://voiddo.com
  • Issues: https://github.com/voidd0/gitstats/issues
  • Support: [email protected]

Built by vøiddo — a small studio shipping AI-flavoured products, free dev tools, Chrome extensions and weird browser games.