run402
v1.20.0
Published
CLI for Run402 — provision Postgres databases, deploy static sites, generate images, and manage wallets via x402 and MPP micropayments.
Downloads
4,156
Maintainers
Readme
run402 CLI
Command-line interface for Run402 — provision Postgres databases, deploy static sites, generate images, and manage agent allowances via x402 micropayments.
Installation
npm install -g run402Or run without installing:
npx run402 <command>Getting Started
# 1. Create a local agent allowance
run402 allowance create
# 2. Fund it with test USDC (Base Sepolia faucet)
run402 allowance fund
# 3. Deploy your app
run402 deploy --tier prototype --manifest app.jsonCommands
run402 allowance
Manage your local agent allowance.
run402 allowance create # Generate a new allowance
run402 allowance status # Show address, network, funding status
run402 allowance fund # Request test USDC from the faucet
run402 allowance export # Print allowance address (for scripting)run402 deploy
Deploy a full-stack app or static site.
run402 deploy --tier prototype --manifest app.json
run402 deploy --tier hobby --manifest app.json
cat app.json | run402 deploy --tier teamTiers: prototype | hobby | team
Manifest format:
{
"name": "my-app",
"files": {
"index.html": "<html>...</html>",
"style.css": "body { margin: 0; }"
},
"env": {
"MY_VAR": "value"
}
}run402 projects
Manage your deployed projects.
run402 projects list # List all projects
run402 projects sql <id> "SELECT * FROM users" # Run SQL query
run402 projects rest <id> users "limit=10" # REST API query
run402 projects usage <id> # Compute/storage usage
run402 projects schema <id> # Database schema
run402 projects renew <id> # Extend lease (pays via x402)
run402 projects delete <id> # Delete projectrun402 image
Generate AI images via x402 micropayments.
run402 image generate "a startup mascot, pixel art"
run402 image generate "futuristic city at night" --aspect landscape
run402 image generate "portrait of a cat CEO" --aspect portrait --output cat.pngOptions: --aspect square|landscape|portrait · --output <file>
Help
Every command supports --help / -h:
run402 --help
run402 allowance --help
run402 deploy --help
run402 projects --help
run402 image --helpNotes
- Agent allowance stored at
~/.run402/allowance.json - Project credentials stored at
~/.run402/projects.json - Network: Base Sepolia (testnet) for prototype tier (free). Base mainnet or Stripe for paid tiers (hobby/team).
- Payments are handled automatically — no manual signing required
License
MIT
