Skip to content

CLI

Terminal window
# Single registry
registry-stats <package> -r <registry>
# All registries
registry-stats <package>
# With config file (all tracked packages)
registry-stats

registry-stats <package> includes GitHub Releases when the name is owner/repo. A plain name skips GitHub and is not reported as a GitHub error. An explicit registries list that names github still queries it, and a plain name is then an error from github only.

Flag Description
-r, --registry Registry to query: npm, pypi, nuget, vscode, docker, github (owner/repo). Repeat the flag, or pass a comma-separated list. --range takes one registry.
--mine <username> Discover all npm packages by a maintainer and show stats
--json Raw JSON output (shorthand for --format json)
--range <start>:<end> Time series (YYYY-MM-DD format)
--format json|csv|chart Output format (default: table)
--compare Compare across registries. With no -r, that is the registries the command already queries. With -r, only that list.
--init Create a config file
-V, --version Show version
-h, --help Show help
Terminal window
registry-stats express -r npm --range 2025-01-01:2025-06-30

Returns daily download counts. Available for npm (549 days history) and PyPI (180 days).

Terminal window
# CSV
registry-stats express -r npm --range 2025-01-01:2025-06-30 --format csv
# Chart.js-compatible JSON
registry-stats express -r npm --range 2025-01-01:2025-06-30 --format chart
Terminal window
registry-stats express --compare

Shows the same package across all registries side by side.

Find all npm packages published by a maintainer and see their stats:

Terminal window
# Table output (sorted by monthly downloads)
registry-stats --mine mikefrilot
# JSON output
registry-stats --mine mikefrilot --format json

The --mine flag uses the npm search API to discover packages, then fetches stats for each using the smart bulk API. Scoped packages are fetched sequentially with throttling; unscoped packages use a single bulk API call.

Start a local REST API:

Terminal window
registry-stats serve --port 3000
registry-stats serve --host 127.0.0.1 --port 3000 --cors https://example.com

Endpoints:

GET /stats/:package # all registries
GET /stats/:registry/:package # single registry
GET /compare/:package?registries=npm,pypi
GET /range/:registry/:package?start=YYYY-MM-DD&end=YYYY-MM-DD&format=json|csv|chart