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
FlagDescription
-r, --registryRegistry to query: npm, pypi, nuget, vscode, docker
--mine <username>Discover all npm packages by a maintainer and show stats
--jsonRaw JSON output (shorthand for --format json)
--range <start>:<end>Time series (YYYY-MM-DD format)
--format json|csv|chartOutput format (default: table)
--compareCompare across all registries
--initCreate a config file
-V, --versionShow version
-h, --helpShow 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

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