aibank
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 --help

Or install globally:

bun add -g aibank

Configuration

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_ID

Transfer tokens

npx aibank transfer \
  --wallet WALLET_ID \
  --chain base \
  --to 0xRecipient \
  --amount 10.00 \
  --currency USDC

List wallets

npx aibank wallets

View transaction history

npx aibank transactions --wallet WALLET_ID --limit 10

Using 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

VariableDescriptionDefault
AIBANK_API_KEYAPI key for authentication--
AIBANK_BASE_URLBase URL of the aibank APIhttp://localhost:4000
AIBANK_WALLET_IDDefault wallet ID--

On this page