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 🙏

© 2025 – Pkg Stats / Ryan Hefner

git-leaderboard

v1.0.3

Published

A colorful git contribution leaderboard for your repo

Downloads

226

Readme

Git Leaderboard 🏆

A colorful git contribution leaderboard for your repository. Track and visualize contributions from all team members with detailed statistics.

Features

  • 📊 View detailed contribution statistics (lines added, removed, net changes)
  • 📈 Visual bar chart showing relative contributions
  • 🔢 Track commit counts per contributor
  • 📅 Filter by date range
  • 🎯 Sort by different metrics (commits, added, removed, net lines)
  • 📋 Multiple output formats (table, JSON, CSV)
  • 🎨 Colorful terminal output
  • 🔍 Filter contributors (include/exclude)
  • 📧 Display author email addresses
  • ⚡ Fast and lightweight

Installation

Run directly

npx --yes git-leaderboard

Global Installation

npm install -g git-leaderboard

Local Installation

npm install
npm link

Usage

Navigate to any git repository and run:

git-leaderboard [options]

Options

| Option | Description | |--------|-------------| | -V, --version | Output the version number | | -s, --sort <type> | Sort by: commits, added, removed, net (default: net) | | -l, --limit <number> | Limit the number of contributors shown | | -r, --reverse | Reverse the sort order | | --since <date> | Show contributions since date (e.g., '2024-01-01', '1 week ago') | | --until <date> | Show contributions until date | | -f, --format <type> | Output format: table, json, csv (default: table) | | --no-color | Disable colored output | | -e, --exclude <authors...> | Exclude specific authors | | -i, --include <authors...> | Include only specific authors | | --show-email | Show author email addresses | | --show-commits | Show commit count in the table | | --no-chart | Hide the bar chart (shown by default) | | -h, --help | Display help for command |

Examples

Basic Usage

Show all contributors with net line changes:

git-leaderboard

Sort by Commits

git-leaderboard --sort commits --show-commits

Show Top 5 Contributors

git-leaderboard --limit 5

Filter by Date Range

Show contributions from the last month:

git-leaderboard --since "1 month ago"

Show contributions for a specific year:

git-leaderboard --since "2024-01-01" --until "2024-12-31"

Export to JSON

git-leaderboard --format json > stats.json

Export to CSV

git-leaderboard --format csv > stats.csv

Exclude Bot Accounts

git-leaderboard --exclude "dependabot,renovate"

Show Only Specific Contributors

git-leaderboard --include "John,Sarah"

Show with Email Addresses

git-leaderboard --show-email

Sort by Lines Added (Descending)

git-leaderboard --sort added

Sort by Commits (Ascending)

git-leaderboard --sort commits --reverse --show-commits

Hide the Bar Chart

git-leaderboard --no-chart

Complete Example

Show top 10 contributors by commits in the last 6 months with commit counts:

git-leaderboard --sort commits --show-commits --limit 10 --since "6 months ago"

Output Examples

Table Format (Default)

No.  Contributor                         Added    Removed        Net  Chart
1    John Doe                             5234        892       4342  ████████████████████
2    Jane Smith                           3421        654       2767  ████████████▌
3    Bob Johnson                          1876        432       1444  ██████▌

Summary:
Total                                    10531       1978       8553

The bar chart visualizes the sorted metric (net changes by default). Use --no-chart to hide it.

JSON Format

[
  {
    "name": "John Doe",
    "added": 5234,
    "removed": 892,
    "net": 4342,
    "commits": 45
  },
  {
    "name": "Jane Smith",
    "added": 3421,
    "removed": 654,
    "net": 2767,
    "commits": 38
  }
]

CSV Format

No,Contributor,Commits,Added,Removed,Net
1,"John Doe",45,5234,892,4342
2,"Jane Smith",38,3421,654,2767

Use Cases

  • 📈 Team Performance: Track team contributions over time
  • 🎯 Sprint Reviews: Analyze contributions during specific sprints
  • 📊 Reports: Generate contribution reports in various formats
  • 🏅 Recognition: Identify top contributors for recognition
  • 📅 Historical Analysis: Compare contributions across different time periods
  • 🔍 Code Reviews: Understand contribution patterns

Tips

  • Use --since and --until to analyze specific time periods
  • Combine --sort with --show-commits for detailed insights
  • The bar chart scales based on your sort metric (--sort added shows bars for lines added)
  • Export to CSV for use in spreadsheets and further analysis
  • Use --exclude to filter out bot accounts (dependabot, renovate, etc.)
  • Pipe JSON output to tools like jq for advanced filtering

License

MIT

Author

Saad5400

Repository

https://github.com/Saad5400/git-leaderboard