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

@agentpi/cli

v0.2.2

Published

Scan any API for agent compatibility. Connect agents. Verify AgentPI integrations.

Downloads

697

Readme

AgentPI CLI

Scan any API for agent compatibility. Connect agents. Verify AgentPI integrations.

The CLI is mainly for local/dev workflows. Production agents should call the HTTP protocol directly from their runtime.

Install

npm i -g @agentpi/cli

Or run without installing:

npx @agentpi/cli audit ./src
npx @agentpi/cli scan https://your-api.com

If you see No matching version found or ETARGET, use the latest (omit the version) or ensure your registry is https://registry.npmjs.org/.

Commands

audit

Scans a local TypeScript/JavaScript codebase for exported functions that agents could call, and classifies each one by risk level. Works on any codebase — no AgentPI installation required.

agentpi audit              # scan current directory
agentpi audit ./src        # scan a specific path
agentpi audit --json       # machine-readable JSON output (for CI)
agentpi audit --path ./src # explicit path flag

Risk levels: Safe = read-only; fine for agents. Review = medium risk; a human should decide if agents are allowed to use it. Needs approval = higher risk; agents shouldn’t call it unless a human has explicitly approved that action. Destructive = high risk; irreversible or dangerous operations.

Protecting risky tools: Use AgentPI to issue agents scoped credentials (e.g. read, write, deploy). Gate high-risk operations behind scopes and only grant those scopes after human approval or policy checks.

Note: Detection is heuristic, based on function names and body patterns. It is a fast discovery tool, not a complete static analyser. Expect some false positives in v1.

scan

Probes any API cold, no AgentPI required, and reports which agent auth capabilities are present or missing.

agentpi scan <toolBaseUrl>

verify

Deep protocol conformance check, use this after installing AgentPI to validate your integration. Requires the AgentPI service to be running.

agentpi verify <toolBaseUrl>

Checks discovery shape, connect flow, response shape, replay protection, and idempotency conflict behaviour across 17 points.

connect

Runs the full connect flow: discover → grant → connect.

agentpi connect <toolBaseUrl> [options]

| Option | Default | Description | | --- | --- | --- | | --name | "My Workspace" | Workspace name | | --scopes | read,deploy | Comma-separated scopes | | --rpm | 60 | Requests per minute | | --daily | 500 | Daily quota | | --concurrency | 1 | Concurrency limit | | --grant | - | Reuse a specific grant JWT (replay testing) |

The CLI saves credentials to ~/.agentpi/credentials.json, keyed by tool base URL.

demo

Runs the connect flow and prints resulting credentials. In http_signature mode it shows key_id and algorithm and does not auto-call a signed tool endpoint.

agentpi demo <toolBaseUrl>

Vestauth auto-init

connect and verify automatically initialize Vestauth identity on first run (equivalent to vestauth agent init) if signing keys are missing.

Environment variables

| Variable | Default | Description | | --- | --- | --- | | AGENTPI_SERVICE_URL | http://localhost:4010 | AgentPI service URL for grant requests | | AGENT_UID | agent-... | Agent UID used for HTTP signature identity | | AGENT_PRIVATE_JWK | none | Ed25519 private JWK used to sign grant requests |