CLI
Basic usage
Section titled “Basic usage”# Single registryregistry-stats <package> -r <registry>
# All registriesregistry-stats <package>
# With config file (all tracked packages)registry-statsOptions
Section titled “Options”| Flag | Description |
|---|---|
-r, --registry | Registry to query: npm, pypi, nuget, vscode, docker |
--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 all registries |
--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 3000Endpoints:
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