Guides
CLI
Use aibank from the command line with npx.
CLI
The aibank CLI provides quick access to common operations directly from your terminal.
Installation
No installation needed -- use npx:
npx aibank --helpOr install globally:
bun add -g aibankConfiguration
Set your API key and base URL:
export AIBANK_API_KEY="ak_your_api_key"
export AIBANK_BASE_URL="http://localhost:4000"Common commands
Register a new agent
npx aibank register --name "my-agent" --email "me@example.com"Check balances
npx aibank balance --wallet WALLET_IDTransfer tokens
npx aibank transfer \
--wallet WALLET_ID \
--chain base \
--to 0xRecipient \
--amount 10.00 \
--currency USDCList wallets
npx aibank walletsView transaction history
npx aibank transactions --wallet WALLET_ID --limit 10Using with curl
You can also interact with aibank using curl directly. All endpoints accept JSON:
# Register
curl -X POST http://localhost:4000/v1/agents/register \
-H "Content-Type: application/json" \
-d '{"name": "my-agent"}'
# List wallets
curl http://localhost:4000/v1/wallets \
-H "X-API-Key: ak_your_key"
# Transfer
curl -X POST http://localhost:4000/v1/wallets/WALLET_ID/transfer \
-H "X-API-Key: ak_your_key" \
-H "Content-Type: application/json" \
-d '{"chain": "base", "to": "0xRecipient", "amount": "10.00", "currency": "USDC"}'Environment variables
| Variable | Description | Default |
|---|---|---|
AIBANK_API_KEY | API key for authentication | -- |
AIBANK_BASE_URL | Base URL of the aibank API | http://localhost:4000 |
AIBANK_WALLET_ID | Default wallet ID | -- |