{"id":51008404,"url":"https://github.com/voidd0/gitstats","last_synced_at":"2026-06-20T23:31:01.504Z","repository":{"id":353200382,"uuid":"1218345494","full_name":"voidd0/gitstats","owner":"voidd0","description":"git contribution stats by author, file, hour. zero config.","archived":false,"fork":false,"pushed_at":"2026-04-29T06:14:20.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T20:46:13.902Z","etag":null,"topics":["cli","contribution-graph","devtools","git","javascript","nodejs","statistics"],"latest_commit_sha":null,"homepage":"https://tools.voiddo.com/gitstats/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voidd0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T19:30:34.000Z","updated_at":"2026-04-29T06:14:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/voidd0/gitstats","commit_stats":null,"previous_names":["voidd0/gitstats"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/voidd0/gitstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fgitstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fgitstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fgitstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fgitstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidd0","download_url":"https://codeload.github.com/voidd0/gitstats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Fgitstats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34589204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","contribution-graph","devtools","git","javascript","nodejs","statistics"],"created_at":"2026-06-20T23:31:00.846Z","updated_at":"2026-06-20T23:31:01.492Z","avatar_url":"https://github.com/voidd0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitstats\n\n[![npm version](https://img.shields.io/npm/v/@v0idd0/gitstats.svg?color=A0573A)](https://www.npmjs.com/package/@v0idd0/gitstats)\n[![npm downloads](https://img.shields.io/npm/dw/@v0idd0/gitstats.svg?color=1F1A14)](https://www.npmjs.com/package/@v0idd0/gitstats)\n[![License: MIT](https://img.shields.io/badge/license-MIT-A0573A.svg)](LICENSE)\n[![Node ≥14](https://img.shields.io/badge/node-%E2%89%A514-1F1A14)](package.json)\n\n**[Homepage](https://tools.voiddo.com/gitstats/?ref=gitstats-readme)** · **[GitHub](https://github.com/voidd0/gitstats)** · **[npm](https://www.npmjs.com/package/@v0idd0/gitstats)** · **[All tools](https://tools.voiddo.com/?ref=gitstats-catalog-readme)** · **[Contact](mailto:support@voiddo.com)**\n\n---\n\n**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.\n\nFree forever gift from [vøiddo](https://voiddo.com).\n\n```\n  gitstats — tools.voiddo.com/gitstats\n  ────────────────────────────\n\n  SUMMARY\n  ───────\n  Repository:   my-repo\n  Commits:      1,423\n  Contributors: 7\n  First commit: 2023-11-02\n  Last commit:  2026-04-22 (3 hours ago)\n\n  HOTSPOTS (most-changed files)\n  ────────\n     87  ██████████████  src/api/router.py\n     61  █████████░░░░░  src/models/user.py\n     54  ████████░░░░░░  src/services/billing.py\n     ...\n\n  BUS FACTOR\n  ──────────\n  2 author(s) cover 50% of 1423 commits.\n    • Jane Doe              612  43.0%\n    • John Smith            251  17.6%\n```\n\n## Why gitstats\n\n`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.\n\n## Install\n\n```bash\nnpm install -g @v0idd0/gitstats\n```\n\nOr one-shot via `npx`:\n\n```bash\nnpx -y @v0idd0/gitstats --hotspots --top 30\n```\n\n## Quickstart\n\n```bash\n# Full dashboard (summary + LOC + contributors)\ngitstats\n\n# Specific metrics\ngitstats --loc --commits --heatmap\ngitstats --hotspots --top 30\ngitstats --bus-factor\ngitstats --streak\ngitstats --releases\ngitstats --weekday --hours\ngitstats --burn                      # additions vs deletions per month\ngitstats --coauthors                 # Co-Authored-By leaderboard\n\n# Per-author deep-dive\ngitstats --author \"Jane Doe\"\ngitstats --author \"Jane Doe\" --streak --hotspots\n\n# Date / range filters\ngitstats --since 2026-01-01 --until 2026-03-31 --contributors\ngitstats --last-month\ngitstats --last-year\ngitstats --range v1.0.0..v2.0.0 --contributors --hotspots\n\n# Machine output\ngitstats --json --hotspots | jq '.hotspots[0]'\ngitstats --csv --contributors \u003e contributors.csv\n```\n\n## Metrics\n\n| Flag | What it shows |\n|------|---------------|\n| `--summary` | One-block overview: repo name, commit count, contributors, first/last commit |\n| `-l, --loc` | Lines of code by extension, with bars + percentages |\n| `-c, --commits` | Commits by month (last 12) |\n| `--contributors` | Top contributors leaderboard with commit bars |\n| `-H, --heatmap` | 52-week ASCII activity heatmap (GitHub-style) |\n| `--hotspots` | Most-changed files (churn analysis, bug-hotspot signal) |\n| `--bus-factor` | How many authors cover 50% of commits — low = risky |\n| `--weekday` | Commit distribution by day of week |\n| `--hours` | Commit distribution by hour of day (0–23) |\n| `--burn` | Additions vs deletions per month (green vs red bars) |\n| `--releases` | Git tag cadence — average gap between releases |\n| `--streak` | Longest + current daily commit streak |\n| `--coauthors` | Co-Authored-By trailer leaderboard |\n| `-a, --author \u003cname\u003e` | Per-author stats: commits, first/last, additions, deletions, net |\n\n## Filters\n\n| Flag | Description |\n|------|-------------|\n| `--since \u003cdate\u003e` | Include commits on/after this date |\n| `--until \u003cdate\u003e` | Include commits on/before this date |\n| `--last-month` | Shortcut for `--since 30 days ago` |\n| `--last-year` | Shortcut for `--since 1 year ago` |\n| `--range \u003crev1..rev2\u003e` | Limit to a ref range (e.g. `v1.0..v2.0`) |\n\n## Output\n\n| Flag | Description |\n|------|-------------|\n| `--json` | Emit the picked metrics as JSON |\n| `--csv` | Emit contributors / LOC / hotspots / summary as CSV |\n| `--top \u003cN\u003e` | Limit hotspots / contributors rows (default 20) |\n| `-h, --help` | Show help |\n| `--version` | Show version |\n\n## Features worth calling out\n\n### Hotspots — bug-hotspot signal\nCounts 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.\n\n### Bus factor\nHow 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.\n\n### Streak\nLongest and current consecutive-day commit streak. Useful for solo-dev retros, not as a productivity cudgel.\n\n### Release cadence\nReads `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.\n\n### Burndown\nAdditions vs deletions per month as stacked green/red bars. Fast visual signal for \"is this codebase growing unbounded or being maintained?\"\n\n### Range-aware everything\n`--range v1.0..v2.0 --hotspots` tells you which files changed most between two releases. Great for changelog prep and regression risk review.\n\n### Shell-injection-safe\nEvery `git` invocation uses `spawnSync('git', [...args])` — no shell interpolation — so `--author \"x\\\"; rm -rf /\"` is just a query with no matches, not a catastrophe.\n\n## Programmatic use\n\n```js\nconst analyzer = require('@v0idd0/gitstats/src/analyzer');\n\nconst hotspots = analyzer.getHotspots(process.cwd(), {}, 10);\nconst bf = analyzer.getBusFactor(process.cwd());\nconst streak = analyzer.getStreak(process.cwd());\n\nconsole.log('top hotspot:', hotspots[0]);\nconsole.log('bus factor:', bf.factor);\nconsole.log('longest streak:', streak.longest);\n```\n\nExports: `isGitRepo`, `getRepoName`, `getCommitCount`, `getContributors`, `getLinesOfCode`, `getCommitsByDay`, `getCommitsByMonth`, `getCommitsByWeekday`, `getCommitsByHour`, `getFirstCommit`, `getLastCommit`, `getLastCommitRelative`, `generateHeatmap`, `getAuthorStats`, `getHotspots`, `getBusFactor`, `getStreak`, `getReleaseCadence`, `getCoauthors`, `getBurndown`.\n\n## From the same studio\n\nvøiddo builds sharp, free-forever CLIs for devs who are tired of paywalls:\n\n- [`@v0idd0/jsonyo`](https://tools.voiddo.com/jsonyo/?ref=gitstats-related-jsonyo-readme) — JSON that yells at you when it's broken\n- [`@v0idd0/tokcount`](https://tools.voiddo.com/tokcount/?ref=gitstats-related-tokcount-readme) — token counter for 60+ LLMs (GPT-5.4, Claude Opus 4.7, Gemini 3.1, Llama 4, Grok 4.1)\n- [`@v0idd0/ctxstuff`](https://tools.voiddo.com/ctxstuff/?ref=gitstats-related-ctxstuff-readme) — stuff a repo into an LLM context window\n- [`@v0idd0/promptdiff`](https://tools.voiddo.com/promptdiff/?ref=gitstats-related-promptdiff-readme) — diff two prompts with token impact + word-frequency delta\n- [`@v0idd0/httpwut`](https://tools.voiddo.com/httpwut/?ref=gitstats-related-httpwut-readme) — HTTP debugger with DNS/TCP/TLS phase timing\n\nFull catalog: [tools.voiddo.com](https://tools.voiddo.com/?ref=gitstats-catalog-readme).\n\n## License\n\nMIT © [vøiddo](https://voiddo.com) — free forever, no asterisks.\n\n## Links\n\n- Docs: https://tools.voiddo.com/gitstats/?ref=gitstats-docs-readme\n- Source: https://github.com/voidd0/gitstats\n- npm: https://npmjs.com/package/@v0idd0/gitstats\n- Studio: https://voiddo.com/?ref=gitstats-studio-readme\n- Issues: https://github.com/voidd0/gitstats/issues\n- Support: support@voiddo.com\n\n---\n\nBuilt by [vøiddo](https://voiddo.com/) — a small studio shipping AI-flavoured products, free dev tools, Chrome extensions and weird browser games.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidd0%2Fgitstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidd0%2Fgitstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidd0%2Fgitstats/lists"}