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

top-github-dependents-by-stars

v1.0.4

Published

CLI tool for sorting dependents repositories and packages by stars

Readme

top-github-dependents-by-stars

A CLI tool and API for sorting GitHub repository dependents by stars. Find out which popular projects depend on your repository!

Features

  • 📊 Sort repository dependents by star count
  • 📦 Support for both repositories and packages
  • 🔍 Query specific package dependencies by name
  • 📋 Table and JSON output modes
  • ⚡ Built-in caching for improved performance
  • 📈 Progress bar for large dependency lists
  • 🔧 Programmatic API for integration

Usage

CLI

Basic usage (requires GitHub token due to GitHub rate limit):

# Set your GitHub token (required)
export GITHUB_TOKEN=your_github_token

# Use owner/repo format
pnpm dlx top-github-dependents-by-stars facebook/react

# Show top 20 repositories with at least 10 stars
pnpm dlx top-github-dependents-by-stars facebook/react --rows 20 --minstar 10

# Output as JSON
pnpm dlx top-github-dependents-by-stars facebook/react --json

# Sort packages instead of repositories
pnpm dlx top-github-dependents-by-stars npm/cli --packages

# Query specific package dependencies
pnpm dlx top-github-dependents-by-stars oxc-project/oxc --package oxlint

Programmatic API

import { getDependents, createClient } from 'top-github-dependents-by-stars';

// Using getDependents directly (uses GITHUB_TOKEN env var)
const result = await getDependents('facebook/react', {
  type: 'repositories',
  rows: 50,
  minStars: 10
});

console.log(result.repositories); // Array of dependent repos
console.log(result.stats);        // Statistics about the fetch

// Or create a reusable client
const client = createClient({ token: 'your-github-token' });

const result1 = await client.getDependents('facebook/react');
const result2 = await client.getDependents('vuejs/vue');

Options

CLI Options

  • --repositories / --packages - Sort repositories or packages (default: repositories)
  • --table / --json - Output format (default: table)
  • --rows <number> - Number of repositories to show (default: 10)
  • --minstar <number> - Minimum number of stars (default: 5)
  • --package <name> - Query specific package dependencies
  • --token <token> - GitHub authentication token (can also use GITHUB_TOKEN env var)

API Options

interface ApiOptions {
  token?: string;        // GitHub token (defaults to GITHUB_TOKEN env var)
  type?: 'repositories' | 'packages';  // Type of dependents (default: 'repositories')
  rows?: number;         // Max results to return (default: 30)
  minStars?: number;     // Minimum stars filter (default: 0)
  packageName?: string;  // Specific package to query
}

Environment Variables

  • GITHUB_TOKEN - GitHub token for authentication

Authentication

A GitHub personal access token is required. You can create one at GitHub Settings > Developer settings > Personal access tokens.

The token needs the public_repo scope for public repositories.

Development

# Install dependencies
pnpm install

# Build TypeScript
pnpm run build

# Run locally
GITHUB_TOKEN=your_token node dist/cli.js facebook/react

Credits

  • https://github.com/andriyor/ghtopdep/

License

MIT