Guide

CLI

The registries command, its lookups, the cache actions, and the flags.

Run it

shell
pnpm add -g @agntn/registries
registries info npm/lodash

or without installing:

shell
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

CommandWhat 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 bulk <purl...>Up to fifty packages at once, as the compact JSON agents get; a package that fails is left out
registries ecosystemsThe PURL types this build knows
registries cache statusEntry counts and freshness, grouped by ecosystem
registries cache pathThe cache directory
registries cache pruneRemove stale entries
registries cache clearRemove every entry

Flags

FlagEffect
--jsonPrint the normalized data as JSON and nothing else
--no-cacheSkip the cache for this call, read and write. The four lookups only
--limit, -lversions only: how many to show, or all
--concurrencybulk only: how many lookups run at once, fifteen by default

--json prints what the library returns, so a script that reads it gets the Package, Version[], Dependency[] or Maintainer[] shape documented under Lookups. versions is the one exception: its JSON is the twenty newest, or as many as --limit says, not the whole list fetchVersions hands back.

Exit codes and errors

Something went wrong? Exit code 1, and the reason on stderr. A hint comes along where one helps:

text
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)

Typos never reach a registry. registries info without a PURL says Invalid arguments: missing <PURL>. registries info -x lists the flags info takes. And every command has its own --help.

Anything else is rethrown with its stack, on purpose: an unexpected error is a bug report.

Examples

shell
registries info alpm/aur/paru
registries versions gem/rails --limit 5
registries bulk npm/defu cargo/serde --json | jq 'keys'
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.