
Security News
pnpm 12’s Rust Rewrite Cuts Install Times by Up to 90%
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.
Official CLI for the P402 AI Payment Router.
# Use without installing (recommended for quick start)
npx p402 --help
# Or install globally
npm install -g @p402/cli
# 1. Authenticate (saves key to ~/.p402/config.json)
npx p402 login
# 2. Chat via the cheapest provider
npx p402 chat "Explain EIP-3009 in one sentence" --mode cost
# 3. Check facilitator status
npx p402 health
p402 loginp402 login [--key <apiKey>] [--url <routerUrl>]
Stores your API key in ~/.p402/config.json. Get your key at p402.io/dashboard/settings.
p402 configp402 config [--json]
Show current CLI configuration (API key masked).
p402 chat <message>p402 chat <message> [--mode cost|quality|speed|balanced] [--model <id>]
[--session <id>] [--stream] [--json]
Send a chat message through the P402 router.
| Flag | Default | Description |
|---|---|---|
--mode | balanced | Routing mode |
--model | (auto) | Override model (e.g. gpt-4o, claude-3-5-sonnet) |
--session | — | Attach to an existing session ID |
--stream | false | Stream tokens as they arrive |
--json | false | Print full API response as JSON |
p402 healthp402 health [--json]
Check P402 facilitator health (status, network, gas price, block number).
p402 models listp402 models list [--json]
List all available models across providers.
p402 providers listp402 providers list [--json]
List all AI providers with status and latency.
p402 providers comparep402 providers compare [--prompt <text>] [--json]
Compare providers for a given prompt.
p402 session listp402 session list [--json]
List active sessions and their budgets.
p402 session get <id>p402 session get <id> [--json]
Get session details including budget breakdown.
p402 session createp402 session create --budget <usd> [--agent <id>] [--wallet <address>]
[--expires <hours>] [--json]
Create a new budget-capped session.
| Flag | Default | Description |
|---|---|---|
--budget | required | Budget in USD (e.g. 5.00) |
--agent | — | Agent ID to associate |
--wallet | — | Wallet address |
--expires | 24 | Expire after N hours |
p402 session fund <id> <amount>p402 session fund <id> <amount> [--tx <hash>] [--json]
Add budget to an existing session. Provide --tx if topping up via on-chain transfer.
p402 mandate listp402 mandate list [--status active|exhausted|expired|revoked] [--json]
List AP2 spending mandates.
p402 mandate createp402 mandate create --user <did> --agent <did> --max <usd>
[--categories <list>] [--until <iso>] [--type <type>] [--json]
Create a new AP2 spending mandate.
| Flag | Default | Description |
|---|---|---|
--user | required | User DID (e.g. did:pkh:eip155:8453:0x...) |
--agent | required | Agent DID |
--max | required | Maximum spend in USD |
--categories | — | Comma-separated allowed categories |
--until | never | Expiry in ISO 8601 (e.g. 2026-12-31T00:00:00Z) |
--type | payment | intent | cart | payment |
p402 analytics spendp402 analytics spend [--period 1d|7d|30d] [--json]
View spend analytics (total, per-request average, top providers).
p402 agent register <address>p402 agent register <walletAddress> [--json]
Check if a wallet address is registered in the World AgentKit AgentBook contract on Base mainnet. Returns registration status, human_verified flag, and free-trial usage remaining.
p402 agent statusp402 agent status [--json]
Show World AgentKit status for the agent configured via P402_AGENT_ADDRESS. Returns registration, reputation score, and current credit balance.
p402 credits balancep402 credits balance [--json]
Show current credit balance (1 credit = $0.01 USD). World ID-verified users receive 500 free credits on first verification.
p402 credits buyp402 credits buy <amount_usd> [--mode test|paid] [--json]
Purchase additional credits.
| Flag | Default | Description |
|---|---|---|
amount_usd | required | Amount in USD (e.g. 5) |
--mode | paid | test for sandbox credits, paid for real USDC |
The CLI reads config from (in priority order):
P402_API_KEY, P402_ROUTER_URL~/.p402/config.json{
"apiKey": "p402_live_...",
"routerUrl": "https://p402.io"
}
FAQs
Official CLI for the P402 AI Payment Router
The npm package @p402/cli receives a total of 4 weekly downloads. As such, @p402/cli popularity was classified as not popular.
We found that @p402/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.

Research
/Security News
Thirteen malicious Packagist themes expose visitors on unpatched iPhones to a WebKit-to-kernel exploit chain that steals device data and wallet seeds.