Guide
CLI
The registries command, its four lookups, the cache subcommands, and the flags.
Run it
pnpm add -g @agntn/registries
registries info npm/lodash
or without installing:
npx @agntn/registries info cargo/serde
The pkg: scheme is optional on the command line. npm/lodash, npm/@vue/core, composer/laravel/framework@v13.30.1 and alpm/aur/paru all work.
Commands
| Command | What it prints |
|---|---|
registries info <purl> | Name, latest version, description, license, repository, homepage, docs, registry link, keywords, namespace, ecosystem |
registries versions <purl> | Versions newest first, with status and publish date, twenty by default (--limit) |
registries deps <purl> | Dependencies of the given version, grouped by scope; without a version the latest is resolved first |
registries maintainers <purl> | Maintainers with login, email and role where the registry has them |
registries cache status | Entry counts and freshness, grouped by ecosystem |
registries cache path | The cache directory |
registries cache prune | Remove stale entries |
registries cache clear | Remove every entry |
Flags
| Flag | Effect |
|---|---|
--json | Print the normalized object as JSON and nothing else |
--no-cache | Skip the cache for this call, read and write |
--limit, -l | versions only: how many to show |
--json prints exactly what the library returns, so a script that reads it gets the Package, Version[], Dependency[] or Maintainer[] shape documented under Lookups.
Exit codes and errors
The command exits with 1 and one line of reason for the errors the library types:
✖ Package not found: npm/does-not-exist
✖ Unknown ecosystem: maven
ℹ Supported: npm, cargo, pypi, gem, composer, alpm
✖ Invalid PURL: pkg:npm
ℹ Examples: pkg:npm/lodash, npm/lodash@4.17.21, pkg:cargo/serde
✖ Rate limited by registry. Retry after 60s
✖ Registry request failed: HTTP 503 (https://registry.npmjs.org/lodash)
Anything else is rethrown with its stack, on purpose: an unexpected error is a bug report.
Examples
registries info alpm/aur/paru
registries versions gem/rails --limit 5
registries deps pypi/flask@3.1.3 --json | jq '.[] | select(.scope == "runtime") | .name'
registries maintainers composer/laravel/framework --no-cache
The Lookup explorer shows the equivalent command for every query it runs.