# Visa CLI Your AI agent gets a Visa card. It can buy images, music, data — anything behind a paywall. Every purchase requires your authorization before money moves. **Your card stays safe.** Your card number is not stored on your machine — it goes straight to an encrypted vault. Default spending limits ($10/transaction, $100/day) are enforced server-side, not on your computer. You can raise or lower these limits at any time. No authorization, no charge. > **Restricted Beta.** Invite-only. Join the waitlist at https://visacli.sh to get access. > > **Starting with Claude Code.** Visa CLI works with Claude Code today. Support for other MCP-enabled AI clients is rolling out. > > **macOS only for now.** Requires macOS with biometric or password authorization, Node.js 18+, and an MCP-compatible AI client. Linux and Windows are not yet supported. ## Set up in 60 seconds You need Node.js 18+ and an MCP-compatible AI client (such as Claude Code) installed. ### 1. Install ```bash npm install -g @visa/cli ``` ### 2. Run setup ```bash visa-cli setup ``` A browser window will open. Sign in with GitHub and enter your card on a secure page. Your card number is sent directly to an encrypted vault — it does not touch your machine and your agent does not see it. ### 3. Open Claude Code If you ran install and setup in Terminal, just open Claude Code — Visa CLI is ready to use. ## Try it Once you're set up, just ask your AI agent: ``` Generate me an image of a sunset over the mountains ``` An authorization prompt pops up: "pay $0.06 to fal.ai". Approve and the image opens in your browser. Cancel and nothing happens — no charge. ``` Make me a lofi jazz track for studying ``` ``` What is the price of Ethereum? ``` Everything costs pennies. | What | Cost | Example | |------|------|---------| | AI image generation | $0.04 – $0.06 | "Generate a logo for my coffee shop" | | AI video generation | ~$0.30 | "Make a video of waves on a beach" | | Music generation | ~$0.10 | "Make me a chill beats track" | | Token price queries | ~$0.02 | "What's the price of SOL?" | | Batch operations | Per-item x count | "Generate 5 logo variations" | Card management, tool use history, and spending controls are always free. --- # How It Works Your machine handles identity. The Visa CLI server handles money. Your card number does not leave the encrypted vault. ## What lives where | Your machine | Visa CLI server | |--------------|------------| | Session token (stored in Keychain) | Card tokens (encrypted vault, via VGS) | | Signing key (stored in Keychain) | Spending limits and enforcement | | Authorization prompt | Payment processing | | CLI tools | Tool use history | ## What happens when you buy something 1. Your AI agent calls a payment tool (like `generate_image_card`) 2. Visa CLI asks the server "What will this cost?" 3. The server replies with the amount and merchant name 4. Authorization prompt appears: "pay $0.06 to fal.ai" 5. You approve (or cancel) 6. Visa CLI sends your signed approval to the server 7. The server verifies everything — checks the signature, checks your limits, runs the payment 8. You get the result — the image opens in your browser, receipt shows in your agent Cancel at step 4 and nothing happens. No charge. ## Payment methods | Method | What happens | |--------|-------------| | Card | Your tokenized card is charged through the card network | The merchant says "this costs X," you approve via the authorization prompt, payment executes. --- # Tools Reference Every tool available in Visa CLI and what it costs. ## Payment tools | Tool | What it does | Cost | |------|-------------|------| | pay | Pay any merchant URL | Varies | | generate_image_card | Generate an AI image (Ultra quality) | ~$0.06 | | generate_image_fast_card | Generate an AI image (Pro quality) | ~$0.04 | | generate_video_tempo_card | Generate an AI video (~6s clip) | ~$0.30 | | generate_music_tempo_card | Generate a music track | ~$0.10 | | check_music_status_tempo_card | Check music generation progress | ~$0.01 | | query_onchain_prices_card | Get real-time token prices from 150+ chains | ~$0.02 | | batch | Run any paid tool multiple times, one approval | Per-item x count | ## Card management (free) | Tool | What it does | |------|-------------| | get_status | See your cards, limits, and daily spending | | add_card | Add a payment card (opens browser) | | get_cards | List your cards (last 4 digits only) | ## Account (free) | Tool | What it does | |------|-------------| | login | Sign in with GitHub (opens browser) | | transaction_history | See tool use history | | feedback | Submit feedback about Visa CLI | | reset | Clear all credentials and start over | ## Settings (free) | Tool | What it does | |------|-------------| | update_spending_controls | Set per-purchase and daily limits (requires authorization) | --- # Security Model Visa CLI is designed so that even a fully compromised machine cannot drain your card. The server enforces all spending limits, your card number does not leave the encrypted vault, and every payment requires a cryptographic signature tied to your authorization. Maximum exposure is bounded by limits you control: $10/purchase and $100/day by default. ## How payments are authorized During setup, Visa CLI creates a P-256 signing key and stores it in your macOS Keychain. The matching public key is registered with the server. For every payment: 1. Visa CLI requests a one-time token from the server 2. A challenge is built from the token, amount, merchant, and context 3. The authorization prompt appears with the amount and merchant name 4. If you approve, the key signs the challenge 5. The signature is sent to the server, which checks it against your registered key If you cancel, no signature is produced and the payment stops immediately. ## What's stored on your machine | What | Where | Purpose | |------|-------|---------| | Session token | macOS Keychain | Identifies your account to the server | | Signing key | macOS Keychain | Signs payment approvals | Nothing else. No card numbers, no API keys, no wallet keys. ## Server-side enforcement | Protection | What it does | |------------|-------------| | Spending limits | $10/purchase, $100/day (you can change these) | | Rate limiting | 1 payment per 3 seconds, throttled reads and auth requests | | Signature verification | Every payment must have a valid cryptographic signature | | Single-use tokens | Each approval uses a one-time nonce that expires in 60 seconds | | Amount verification | Charged amount must be within 10% of the approved amount | ## What a compromised machine cannot do - Spend without a valid signature - Exceed your limits - Access your card number - Replay a previous payment --- # Recipes Copy any of these prompts straight into your AI agent. ## Generate a batch of images ``` Generate 5 logo concepts for a coffee shop called "Terminal Brew" ``` Cost: ~$0.30 for Ultra, ~$0.20 for Pro. One authorization prompt for the whole batch. ## Create a song with album art ``` Make me a lofi jazz track for studying, then generate album art for it ``` Cost: ~$0.10 for the track + ~$0.06 for the image. Two authorization prompts. ## Generate a video ``` Make a 6-second video of a cat knocking things off a desk ``` Cost: ~$0.30. One prompt. ## Multi-step creative project ``` Design a brand for a surf shop called "Salt & Sand": generate a logo, a banner image, and a 6-second promo video ``` Cost: ~$0.42 (two images + one video). Three prompts. ## Check token prices ``` What are the current prices of ETH, SOL, and MATIC? ``` Cost: ~$0.02 per lookup. --- > No access yet? Join the waitlist at https://visacli.sh > Full docs: https://visacli.sh/docs > Source: https://github.com/Visa-Crypto-Labs/Visa-CLI