agentpay-cli
v0.2.0
Published
Lean CLI for AgentPay: init, fund, balance, spend, cards, and expiration
Maintainers
Readme
AgentPay CLI
agentpay is the only supported CLI for this repo.
It wraps the lean AgentPay V1 API:
POST /initGET /balancePOST /fundPOST /spendGET /cardsGET /expirationPOST /expirationGET /start
Install
npm install -g agentpayOr from this repo:
cd cli
npm install
npm linkConfig
Config is stored at:
~/.agentpay/config.jsonExample:
{
"api_key": "ap_...",
"base_url": "https://agent-pay.sh"
}Environment variable overrides:
AGENTPAY_API_KEYAGENTPAY_API_URL
Commands
Bootstrap:
agentpay init
agentpay login <apiKey>Core flow:
agentpay balance
agentpay fund <amount>
agentpay spend <amount> [--memo <memo>]
agentpay cards
agentpay expiration
agentpay expiration <minutes>
agentpay startConfig:
agentpay config set-key <apiKey>
agentpay config set-url <url>Quickstart
agentpay init
agentpay fund 25
agentpay balance
agentpay spend 10 --memo "buy api credits"
agentpay cards
agentpay expiration 15JSON mode
Every command supports --json.
Examples:
agentpay balance --json
agentpay fund 25 --json
agentpay spend 10 --memo "buy api credits" --json
agentpay cards --jsonAuthentication failures
If no valid API key is available, the CLI tells the user to either:
- run
agentpay init - or run
agentpay login <key>
