CLI
Basic usage
Section titled “Basic usage”# Single registryregistry-stats <package> -r <registry>
# All registriesregistry-stats <package>
# With config file (all tracked packages)registry-statsregistry-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.
Options
Section titled “Options”| 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 |
Time series
Section titled “Time series”registry-stats express -r npm --range 2025-01-01:2025-06-30Returns daily download counts. Available for npm (549 days history) and PyPI (180 days).
Export formats
Section titled “Export formats”# CSVregistry-stats express -r npm --range 2025-01-01:2025-06-30 --format csv
# Chart.js-compatible JSONregistry-stats express -r npm --range 2025-01-01:2025-06-30 --format chartCompare
Section titled “Compare”registry-stats express --compareShows the same package across all registries side by side.
Maintainer discovery
Section titled “Maintainer discovery”Find all npm packages published by a maintainer and see their stats:
# Table output (sorted by monthly downloads)registry-stats --mine mikefrilot
# JSON outputregistry-stats --mine mikefrilot --format jsonThe --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.
REST server
Section titled “REST server”Start a local REST API:
registry-stats serve --port 3000registry-stats serve --host 127.0.0.1 --port 3000 --cors https://example.comEndpoints:
GET /stats/:package # all registriesGET /stats/:registry/:package # single registryGET /compare/:package?registries=npm,pypiGET /range/:registry/:package?start=YYYY-MM-DD&end=YYYY-MM-DD&format=json|csv|chart