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

gh-star-history

v0.4.5

Published

Visualize and compare GitHub star history as interactive charts, powered by gh CLI

Readme

gh-star-history

star-history-with-regions

Visualize GitHub star history and regional breakdown as interactive charts. Powered by the GitHub CLI - no API tokens needed. Features date range selection, star growth tracking with period comparison, and dynamic regional breakdown.

For example, if you want to see the star growth of claude-code-tips:

npx gh-star-history ykdojo/claude-code-tips

star-history

Or compare multiple repos:

npx gh-star-history vuejs/vue withastro/astro sveltejs/svelte

comparison

Generates a self-contained HTML file with an interactive Plotly chart.

Prerequisites

Usage

npx gh-star-history <owner/repo or URL> ... [options]

Accepts both formats, and multiple repos:

npx gh-star-history ykdojo/claude-code-tips
npx gh-star-history https://github.com/ykdojo/claude-code-tips
npx gh-star-history vuejs/vue withastro/astro sveltejs/svelte

Options

| Flag | Description | |------|-------------| | --style <name> | Chart style: blue (default), green, purple (single repo only) | | --output <path> | Output file path (default: star-history.html) | | --no-open | Don't auto-open the browser | | --no-cache | Skip cache and fetch fresh data | | -h, --help | Show help |

Examples

# Default blue style
npx gh-star-history ykdojo/claude-code-tips

# Green accent
npx gh-star-history ykdojo/claude-code-tips --style green

# Save to specific file
npx gh-star-history torvalds/linux --output linux-stars.html

# Compare multiple repos
npx gh-star-history vuejs/vue withastro/astro sveltejs/svelte

Styles

Three styles matching GitHub's dark theme palette:

  • blue (default) - #58a6ff
  • green - #3fb950
  • purple - #bc8cff

How it works

  1. Fetches stargazer timestamps via GitHub's GraphQL API (no pagination limit)
  2. Caches results to ~/.gh-star-history/ (one file per repo) - subsequent runs only fetch new stars
  3. Generates a self-contained HTML file with Plotly.js loaded from CDN
  4. Opens it in your default browser

The cache saves after every batch, so even if a large fetch gets interrupted, progress is kept. Single-repo charts show both cumulative stars (line) and stars per day (bars) on a dual-axis layout. Multi-repo charts show cumulative lines with a legend for comparison.

Region breakdown

You can also generate a region breakdown chart showing where stargazers are from, based on their public GitHub location. Since location strings are freeform, AI is needed to classify them - use the /gh-star-region-breakdown skill in Claude Code to handle fetching, classification, and chart generation.

region-breakdown

The region breakdown includes:

  • A stacked bar chart showing stars by region over time (top 7 regions per day)
  • An overall breakdown horizontal bar chart with percentages
  • Dynamic top N control - choose how many regions to show individually vs grouped into "Other"
  • Hover over "Other" to see the full breakdown of smaller regions

The top N regions are recomputed based on the selected date range, so you can see which regions are trending in any time period.

Claude Code plugin

If you use Claude Code, you can install the plugin:

/plugin marketplace add ykdojo/gh-star-history
/plugin install gh-star-history@gh-star-history

Then run /gh-star-region-breakdown <owner/repo> to fetch stargazer locations, classify them, and generate the chart.

Development

git clone https://github.com/ykdojo/gh-star-history.git
cd gh-star-history
node bin/cli.js ykdojo/claude-code-tips