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

ajiro-api

v0.2.5

Published

Let Claude Code and Codex test the APIs they write: scan Next.js, Hono, FastAPI, Express and Go routes into one YAML file per endpoint, run them as regression tests, serve them as mocks.

Readme

ajiro-api

Let your coding agent test the APIs it writes.

Ajiro API is a CLI that statically scans your backend routes into one YAML file per endpoint, runs those files as regression tests against your dev server, and serves them as mocks. It is built so that Claude Code and Codex can run "implement -> scan -> test -> fix -> re-test" with no human in the loop.

Demo: scan and test pass, a moved route makes GET /todos/stats return 404, the fix makes all 34 tests pass again

  • Built for agents: test --json returns the failing check, expected and actual values, the request, the response body and the handler's file:line.
  • Your tests are safe: scan only rewrites the source: block; tests, mocks, comments and key order are never touched.
  • Plain YAML, one file per endpoint: fewer Git conflicts, a narrow surface for AI to edit, convertible to and from OpenAPI.
  • Local-first: API definitions and test results never leave your machine. Telemetry is off by default.
  • Single native binary: no Node or Python needed at runtime. MIT licensed.

Supports Next.js Route Handlers, Hono, FastAPI, Express and Go (net/http, chi, Echo).

Quick start

cd your-backend-project
npx -y ajiro-api init     # detect the framework, create ajiro-api.yaml and api/
npx -y ajiro-api scan     # one YAML file per endpoint under api/
# start your app, then
npx -y ajiro-api test     # run every endpoint and check the responses

npx -y ajiro-api fetches the latest release on every run. In CI and other automated runs, pin the version: npx -y [email protected] test, or npm i -D [email protected] and let the lockfile pin it.

Endpoints without tests get a safe smoke check (GET, HEAD and OPTIONS only). Add tests: yourself, or ask your agent to.

What a test looks like

# api/users/post-users.yaml
version: 1
id: users.create
request:
  method: POST
  path: /users
  headers:
    Authorization: Bearer {{ token }}
  body: { name: Taro, email: [email protected] }
source:            # written by `ajiro-api scan`
  framework: hono
  file: src/routes/users.ts
  line: 42
tests:             # written by you or your agent
  - name: creates a user
    expect:
      status: 201
      body:
        match:
          $.email: [email protected]
    capture:
      userId: $.id
  - name: duplicate email returns 409
    request:
      body: { email: [email protected] }
    expect:
      status: 409
mock:              # served by `ajiro-api mock`
  default: { status: 201, body: { id: usr_001, name: Taro } }

Use it from Claude Code, Codex or any MCP client

Claude Code plugin (a skill for the scan -> test -> fix loop, plus the MCP server):

/plugin marketplace add niti-lab/ajiro-api
/plugin install ajiro-api@ajiro-api

MCP server only: it is listed in the official MCP Registry as io.github.NITI-Lab/ajiro-api and on Glama. Add it to .mcp.json or your client's MCP settings:

{
  "mcpServers": {
    "ajiro-api": { "command": "npx", "args": ["-y", "ajiro-api", "mcp"] }
  }
}

Codex: paste AGENTS.snippet.md into your AGENTS.md.

Commands

| Command | What it does | | --- | --- | | init | Create ajiro-api.yaml and api/, detect the framework | | scan | Write or update one YAML file per route. --check fails CI when files are out of date | | test | Run the YAML against a server. --json, --junit <file>, --env, -u (update snapshots) | | mock | Serve the mock: responses, with scenarios and delays | | docs | Generate a single-file HTML API reference to send to clients | | openapi import/export | Convert from/to OpenAPI 3.x | | import postman/bruno | Migrate Postman collections or Bruno folders | | mcp | Run the MCP server over stdio |

Exit codes: 0 success, 1 tests failed / drift / validation errors, 2 the tool could not run.

Install options

  • npx -y ajiro-api (this package)
  • brew install niti-lab/tap/ajiro-api
  • cargo install ajiro-api
  • Binaries for macOS, Linux and Windows on GitHub Releases

This npm package is a small launcher. The native binary comes from a platform package (@niti-lab/ajiro-api-<platform>-<arch>) installed automatically as an optional dependency, for Linux x64/arm64, macOS x64/arm64 and Windows x64.

Links

MIT License.