git-heatmap
v0.10.1
Published
Interactive commit heatmap dashboard for any git repository
Maintainers
Readme
git-heatmap
Interactive commit heatmap dashboard for any git repository.
Features
- Stats: total commits, active days, current/longest streak, contributors, busiest day
- Recent commits panel with messages and timestamps
- Commit editing: rewrite messages, authors, dates, and emails
- Bulk timestamp shift: move multiple commits forward or backward in time
- Reflog panel: browse recent HEAD movements
- Author leaderboard with per-author commit breakdown
- Rebase recovery: automatic backup refs with abort/restore UI
- Dark/light mode (follows system preference)
- Interactive tooltips on hover
- Live local server: refreshes on page reload
- Auto-opens browser, stops on Ctrl+C
- Zero runtime dependencies
Quick Start
Run inside any git repository, no install needed:
npx git-heatmapAutomatically opens your browser at http://127.0.0.1:3333. Press Ctrl+C to stop.
Global Install
For frequent use, install globally:
npm install -g git-heatmapThen simply run git-heatmap in any repo.
Options
--port <number> Port to listen on (default: 3333, or PORT env)
--no-open Don't open browser automatically
-h, --help Show help messageExamples:
git-heatmap --port 4000
git-heatmap --no-openProject Structure
git-heatmap/
├── package.json
├── tsconfig.json
├── build.ts # esbuild build script
├── README.md
├── LICENSE
├── dist/ # Compiled output (generated by build.ts)
└── src/
├── index.ts # CLI entry point (HTTP server)
├── args.ts # CLI argument parsing
├── types.ts # Shared TypeScript interfaces
├── calendar.ts # Data processing (commit map, calendar weeks, stats)
├── git.ts # Git data collection (repo name, commits, authors)
├── html.ts # Page template (SVG heatmap, stat cards, layout)
└── client/ # Client-side Preact app (bundled by esbuild)
├── app.tsx # Preact entry point
├── state.ts # Reactive state (@preact/signals)
├── utils.ts # Utility functions
├── assets.d.ts # Type declarations for .svg/.scss imports
├── components/ # Preact components (.tsx)
├── styles/ # SCSS stylesheets
└── icons/ # SVG icon assetsRequirements
- Node.js ≥ 18
- Git
⚠️ Warning
Commit editing features use git rebase and rewrite history. This can break shared branches. Only use on local/private branches. If a rebase fails, a recovery banner will appear with options to abort or restore. Always back up important repositories before editing commits.
License
MIT
