npm-axi
npm-axi is an AXI for the public npm registry. It
returns token-efficient TOON output designed for agents. Read-only, no authentication.
Run without a global install:
npx -y npm-axi <command> [args] [flags]
Commands
search — find packages
npx -y npm-axi search "react router" --limit 20
Returns a minimal name,version,description table plus the total match count:
count: 20 of 1240 total
packages[20]{name,version,description}:
react-router,7.1.1,Declarative routing for React
...
view — package details
npx -y npm-axi view zod # preview README
npx -y npm-axi view zod --full # complete README
Includes pre-computed aggregates (dependency count, weekly downloads) and a truncated README with a size hint:
package:
name: zod
version: 3.24.1
license: MIT
description: TypeScript-first schema declaration and validation library
dependencies: 0
weeklyDownloads: 24500000
homepage: https://zod.dev
repository: https://github.com/colinhacks/zod
published: 2024-12-30
readme: First 800 chars...
readmeChars: 5421
help[1]: Run `npm-axi view zod --full` to see complete README
versions — recent versions
npx -y npm-axi versions typescript --limit 15
Newest-first, with the latest dist-tag and total version count.
downloads — download stats
npx -y npm-axi downloads express
downloads:
package: express
lastWeek: 30000000
lastMonth: 120000000
Notes
- Errors are returned as structured TOON on stdout with an actionable
helpline. - Exit codes:
0success,1error (e.g. package not found),2usage error. - Unknown packages return a
NOT_FOUNDerror suggesting asearch.