Quickstart Guide
Give your AI agent a wallet with spending controls in just a few commands. This guide takes you from zero to a working virtual card.
Prerequisites
Install the CLI
Install the SPEND CLI globally using npm:
npm install -g @spend/cliAlternatively, you can use npx to run commands without installing:
npx @spend/cli initAuthenticate
Log in with your SPEND.md account:
$ spend login
Opening browser for authentication...
✓ Logged in as you@example.com
✓ API key saved to ~/.spend/credentialsThis opens your browser for OAuth. Your credentials are stored securely in ~/.spend/credentials.
Initialize SPEND.md
Navigate to your agent project and run init:
$ cd my-agent-project
$ spend init
✓ Created SPEND.md
✓ Detected: Node.js project
✓ Agent name: my-agent-project
Edit SPEND.md to configure spending rules.This creates a starter SPEND.md file:
# SPEND.md
## Identity
agent_name: my-agent-project
owner: you@example.com
description: AI assistant agent
## Spending
spend:
monthly_limit: 100 USD
daily_limit: 25 USD
per_transaction: 10 USD
allowed_categories:
- software_services
- cloud_hosting
- api_services
allowlist:
- openai.com
- anthropic.com
## Approval
approval:
auto_approve_under: 5 USD
notify_on_all: trueApply Configuration
Validate and apply your SPEND.md configuration:
$ spend apply
Validating SPEND.md...
✓ Configuration valid
Applying changes...
✓ Agent wallet created
✓ Spending rules configured
✓ Notifications enabled
Agent "my-agent-project" is ready to transact.Create a Virtual Card
Issue a virtual Visa card for your agent:
$ spend card create
Creating virtual card...
✓ Card created successfully
┌─────────────────────────────────────┐
│ 💳 Virtual Card │
├─────────────────────────────────────┤
│ Number: 4242 8534 7693 1234 │
│ Exp: 01/28 │
│ CVV: *** │
│ Limit: $100.00/month │
└─────────────────────────────────────┘
Card details saved to SPEND.md (encrypted).
View full details: spend card showSecurity Note
The full card number and CVV are only shown once. They're encrypted and stored locally. Run spend card show to view them again.
Check Status
View your agent's wallet status anytime:
$ spend status
┌─────────────────────────────────────┐
│ 💳 SPEND.md Status │
├─────────────────────────────────────┤
│ Agent: my-agent-project │
│ Balance: $100.00 │
│ Spent today: $0.00 / $25.00 │
│ Spent month: $0.00 / $100.00 │
│ Cards: 1 active │
│ Health: ✓ Ready │
└─────────────────────────────────────┘You're all set!
Your agent now has a wallet with a virtual card. It can make purchases within your defined limits. Every transaction is logged and you'll get notifications.