@imateapot0418/glitz
v0.1.0
Published
Engaging terminal visualizations for your git repo's commit history
Maintainers
Readme
✨ glitz
Engaging terminal visualizations for your git repo's commit history.
Install
npm install -g glitzOr run directly with npx:
npx glitz heroesUsage
glitz <command> [options]
Commands:
glitz heroes [path] Show a ranked leaderboard of repo contributors
Options:
-h, --help Show help
-v, --version Show version numberheroes
Displays a ranked leaderboard of contributors with commit counts, lines added/removed, and colorful bar charts.
# Run in the current directory
glitz heroes
# Point at a specific repo
glitz heroes /path/to/repo
# Show top 5, sorted by lines added
glitz heroes --limit 5 --sort insertions
# Only commits from the last 3 months
glitz heroes --since "3 months ago"
# Include merge commits
glitz heroes --include-merges
# Output raw JSON data
glitz heroes --jsonOptions:
| Flag | Alias | Description | Default |
|------|-------|-------------|---------|
| --limit | -l | Number of authors to display | 10 |
| --sort | -s | Sort by: commits, insertions, deletions, net | commits |
| --since | | Only count commits after date (e.g., "3 months ago") | |
| --include-merges | | Include merge commits in statistics | false |
| --json | | Output raw intermediate data as JSON | false |
Example output:
✨ Repo Heroes — my-project (main)
────────────────────────────────────────────────────────────
🥇 Alice Chen █████████████████████████ 142 commits +12,340 -3,201
🥈 Bob Martinez ████████████████████ 98 commits +8,102 -2,444
🥉 Carol Park █████████████ 61 commits +4,320 -1,100
4 Dave Flynn ██████████ 47 commits +3,010 -890
5 Eve Johnson ████████ 35 commits +2,100 -560
────────────────────────────────────────────────────────────
5 contributors | 383 commits | +29,872 | -8,195Adding New Visualizations
Glitz is designed to be extensible. To add a new visualization:
- Create a new file in
src/visualizations/(e.g.,timeline.ts) - Export a function matching the
Visualizationtype signature - Register it in
src/visualizations/index.ts - Add a yargs subcommand in
src/cli.ts
Author Deduplication with .mailmap
Glitz uses git's %aN / %aE format specifiers, which respect your repo's .mailmap file. If the same person has committed under different names or emails, create a .mailmap file in your repo root to unify them:
Alice Chen <[email protected]> <[email protected]>
Alice Chen <[email protected]> <[email protected]>See git-mailmap docs for details.
Disabling Colors
Glitz respects the NO_COLOR environment variable. To disable colored output:
NO_COLOR=1 glitz heroesDevelopment
# Install dependencies
npm install
# Run in dev mode (no build step)
npm run dev -- heroes /path/to/repo
# Build
npm run build
# Run tests
npm test
# Link globally for testing
npm link
glitz heroesRequirements
- Node.js >= 16
- Git (must be available in PATH)
License
MIT
