npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pypi-axi

v0.1.1

Published

Inspect PyPI packages with token-efficient output — an AXI (Agent eXperience Interface).

Readme


pypi-axi wraps the public PyPI JSON API in an agent-ergonomic CLI. It returns TOON output (~40% fewer tokens than JSON), minimal default schemas, pre-computed aggregates, and structured errors — so an agent can answer "what's the latest version of X", "what does X depend on", or "how popular is X by downloads" in a single call. Read-only, no authentication required.

Install

npm install -g pypi-axi

Or run without installing:

npx -y pypi-axi <command>

Usage

The examples below are snapshots of live PyPI output; versions, dates, and counts will drift as packages change.

view

$ pypi-axi view requests
package:
  name: requests
  version: 2.34.2
  summary: Python HTTP for Humans.
  author: Kenneth Reitz
  license: Apache-2.0
  requiresPython: >=3.10
  projectUrls:
    Documentation: "https://requests.readthedocs.io"
    Source: "https://github.com/psf/requests"
  releaseCount: 163
  latestUpload: 2026-05-14
  dependencyCount: 6

Pass --version <X> to inspect a specific release, or --full to print the complete summary instead of the ~800 char preview.

versions

$ pypi-axi versions requests --limit 5
count: 5 of 160 total
versions[5]{version,uploadDate,yanked}:
  2.34.2,2026-05-14,no
  2.34.1,2026-05-13,no
  2.34.0,2026-05-11,no
  2.34.0.dev1,2026-05-03,no
  2.33.1,2026-03-30,no

deps

$ pypi-axi deps flask
package: Flask
version: 3.1.3
count: 9
deps[9]:
  - dep: blinker
    spec: >=1.9.0
  - dep: click
    spec: >=8.1.3
  - dep: importlib-metadata
    spec: >=3.6.0
    marker: "python_version < \"3.10\""
  ...

Packages with no dependencies return a definitive 0 dependencies for <pkg> <version> result instead of an empty list.

downloads

$ pypi-axi downloads requests
downloads:
  package: requests
  lastDay: 47943472
  lastWeek: 428064895
  lastMonth: 1715479760

Packages pypistats has no data for yet return { status: "no download data available yet" } instead of an error.

search

PyPI has no public search API (the old XML-RPC search endpoint was retired), so search always returns an honest error instead of scraping the HTML search page:

$ pypi-axi search foo
error: PyPI has no public search API
code: VALIDATION_ERROR
help[1]: Use `pypi-axi view <package>` to inspect a known package

No arguments

Running pypi-axi with no arguments prints the tool identity and command hints. Inside a Python project (a directory with requirements.txt, pyproject.toml, or setup.py), it also shows the declared dependencies alongside their latest available version on PyPI:

$ pypi-axi
bin: ~/.local/bin/pypi-axi
description: Inspect PyPI packages — versions, summaries, dependencies, downloads — with token-efficient output
project:
  source: requirements.txt
  dependencyCount: 3
  dependencies[3]{name,declaredSpec,latestAvailable}:
    requests,==2.31.0,2.34.2
    flask,>=2.0,3.1.3
    numpy,any,2.5.1

Agent integration

pypi-axi follows the AXI principle of offering an opt-in session integration first, and an on-demand skill second.

Session hooks (ambient context):

pypi-axi setup hooks

Installs idempotent SessionStart hooks for Claude Code, Codex, and OpenCode so agents see pypi-axi guidance at the start of each session.

Agent Skill (on-demand):

npx skills add mstuart/pypi-axi --skill pypi-axi

You only need one of these — they complement each other when both are installed.

How it maps to the 10 AXI principles

| # | Principle | In pypi-axi | | --- | --- | --- | | 1 | Token-efficient output | TOON on stdout via axi-sdk-js | | 2 | Minimal default schemas | versions returns version, uploadDate, yanked | | 3 | Content truncation | summary preview with ... (truncated, N chars total) + --full | | 4 | Pre-computed aggregates | release counts, dependency counts, "N of M total" | | 5 | Definitive empty states | 0 dependencies for <pkg> <version>, "no download data available yet" | | 6 | Structured errors & exit codes | TOON errors; 0/1/2 exit codes; no prompts | | 7 | Ambient context | setup hooks + installable skill | | 8 | Content first | no-args shows the local project's declared dependencies | | 9 | Contextual disclosure | next-step help lines on truncated/erroring output | | 10 | Consistent help | pypi-axi <command> --help; fast --version path |

Development

npm install
npm test              # vitest, fetch mocked against captured fixtures + one live check
npm run build          # tsc -> dist
npm run build:skill     # regenerate skills/pypi-axi/SKILL.md from the CLI's own help text
npm run dev -- view requests   # run from source

License

MIT