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

agent-manifest

v4.0.0

Published

Universal agent manifest compiler — generates agent.json for any web app so AI agents can discover and interact with it

Readme

agentjson

A universal CLI compiler that scans any web app codebase and generates a public/agent.json manifest — so AI agents can discover and interact with your app without custom integration work.

Works with Next.js (App Router + Pages Router), Express, Hono, Fastify, and any TypeScript/JavaScript project with smart contracts.

Installation

# Run once, no install
npx agent-manifest

# Or install globally
npm install -g agent-manifest

Usage

# Scan current directory, output to public/agent.json
agentjson

# Specify project path and output
agentjson -p ./my-app -o ./public/agent.json

# With auth metadata
agentjson --auth-type bearer --auth-header Authorization --auth-docs https://myapp.xyz/docs/auth

# Add author / URL to manifest
agentjson --author "0xDev" --url https://myapp.xyz

# Validate an existing agent.json
agentjson validate ./public/agent.json

What gets generated

{
  "name": "FlipIt",
  "description": "On-chain coin flip game",
  "version": "1.0.0",
  "author": "0xDev",
  "url": "https://flipit.xyz",
  "auth": { "type": "farcaster-frame" },
  "capabilities": ["wallet", "payments"],
  "actions": [
    {
      "name": "flip",
      "description": "Flip a coin and bet ETH",
      "intent": "game.play",
      "type": "contract",
      "location": "./src/abis/FlipABI.json",
      "abiFunction": "flip",
      "chainId": 8453,
      "contractAddress": { "$env": "NEXT_PUBLIC_FLIP_ADDRESS" },
      "safety": "financial",
      "agentSafe": false,
      "requiredAuth": { "required": "farcaster-signed" },
      "inputs": {
        "choice": { "type": "string", "enum": ["heads", "tails"], "required": true },
        "amount":  { "type": "number", "required": true }
      },
      "outputs": { "type": "void" }
    }
  ],
  "metadata": {}
}

Automatic detection

API routes

  • Next.js App Routerapp/api/**/route.ts (GET, POST, PUT, DELETE, PATCH)
  • Next.js Pages Routerpages/api/**/*.ts
  • Express / Hono / Fastifyapp.get('/path', handler) and router.post(...) patterns
  • Server Actions'use server' files

Smart contracts

  • ABI JSON files (*ABI.json, abi/*.json, abis/*.json)
  • Wagmi hooks — useWriteContract, useContractWrite, writeContract
  • Contract addresses extracted as { "$env": "VAR_NAME" } — secrets never embedded

Zod schemas

  • Inline z.object(...) schemas in the same file as .parse() / .safeParse()
  • Cross-file — schemas imported from centralised files (e.g. src/lib/schemas.ts) are resolved via the import graph

Auth

  • Detected from source code and package.json dependencies: bearer · api-key · oauth2 · basic · farcaster-frame · cookie
  • Override with --auth-type if detection misses

Capabilities

wallet · payments · ai · database · realtime · storage · farcaster


Safety levels

Every action is classified automatically:

| Level | Meaning | agentSafe | |---|---|---| | read | Read-only, no side effects | true | | write | Mutates state, no money movement | true | | financial | Moves tokens or value | false | | destructive | Deletes or burns irreversibly | false | | confidential | Handles PII, passwords, credentials, KYC | false |

agentSafe: false means the agent must ask for human confirmation before executing.


Intent taxonomy

Actions get a domain.verb intent so agents understand what they do:

| Domain | Examples | |---|---| | game.* | game.play, game.join, game.score | | finance.* | finance.transfer, finance.swap, finance.stake, finance.approve | | nft.* | nft.mint, nft.burn, nft.list | | social.* | social.cast, social.follow, social.react, social.share | | governance.* | governance.vote, governance.propose, governance.delegate | | auth.* | auth.session, auth.register, auth.verify | | data.* | data.read, data.create, data.update, data.delete | | media.* | media.upload |

Override with a JSDoc tag: @agent-action intent=custom.thing


Explicit annotation (optional)

The compiler discovers actions automatically, but you can annotate for precision:

/**
 * @agent-action intent=game.play
 * @description Flip a coin and bet ETH on the outcome.
 * @param choice The side to bet on — "heads" or "tails".
 * @param amount The amount of ETH to wager in wei.
 */
export async function flip(choice: string, amount: bigint) {
  // ...
}

Auth scopes

Per-action auth is inferred automatically:

| Condition | requiredAuth | |---|---| | Contract view/pure function | public | | GET endpoint on public app | public | | Farcaster frame app + write action | farcaster-signed | | Financial action | required + scope payments:write | | Confidential action (POST) | required + scope pii:write | | Confidential action (GET) | required + scope pii:read | | Everything else | required |


CLI options

agentjson [options]

Options:
  -p, --path <path>         Project root (default: ".")
  -o, --output <output>     Output path (default: "./public/agent.json")
  --author <author>         Author name or organization
  --url <url>               App homepage URL
  --auth-type <type>        Override detected auth type
                            none | bearer | api-key | oauth2 | basic | farcaster-frame | cookie
  --auth-header <header>    Auth header name (default: Authorization)
  --auth-docs <url>         URL where agents can obtain credentials
  -V, --version             Show version
  -h, --help                Show help

Commands:
  validate <file>           Validate an existing agent.json against the schema

JSON Schema

A full JSON Schema is bundled at node_modules/@0xdeve/agentjson/schema/agent.schema.json for editor autocomplete and CI validation.


Performance

On large repos the compiler skips unchanged files using SHA-1 content hashing. Cache is stored in .agentjson-cache.json at the project root (add to .gitignore).


License

ISC