> ## Documentation Index
> Fetch the complete documentation index at: https://docs.machines.cash/llms.txt
> Use this file to discover all available pages before exploring further.

# Machines CLI

> Install and run Machines from your terminal -- login, identity verification, cards, deposits, and agentic payments.

Machines CLI lets you manage your Machines account from the terminal. Use it for login, identity verification, balance checks, crypto deposits, card management, agentic payments, and connecting AI apps.

## Prerequisites

* Node.js 18+
* A Machines account

## Install

```bash theme={null}
npm i -g @machines-cash/cli
```

After installing, run `machines` to open the guided menu, or use commands directly.

<Tip>Don't want a global install? Use `npx machines-cash@latest <command>` for one-off commands.</Tip>

## Quick start

<Steps>
  <Step title="Log in">
    ```bash theme={null}
    machines login
    ```

    Opens your browser to authenticate. Your session is saved locally for future commands.
  </Step>

  <Step title="Verify your identity">
    ```bash theme={null}
    machines user create --browser
    ```

    Check your status anytime:

    ```bash theme={null}
    machines kyc status
    ```
  </Step>

  <Step title="Add money">
    ```bash theme={null}
    machines deposit create --token USDC --network base --amount 25
    ```

    Check your balance:

    ```bash theme={null}
    machines balance
    ```
  </Step>

  <Step title="Create a card">
    ```bash theme={null}
    machines card create --name "ads-bot" --limit 250 --frequency per30DayPeriod
    ```
  </Step>

  <Step title="Buy something">
    ```bash theme={null}
    machines buy "https://www.amazon.com/dp/B0DGHMNQ5Q" --wait
    ```

    If you already have an active Machines card and saved billing profile, you usually do not need to pass anything else.
  </Step>
</Steps>

## Commands

### Login

```bash theme={null}
machines login                              # browser login
machines login --no-launch-browser          # prints URL instead of opening browser
machines login --agent                      # CLI-only login for agents with wallets
machines logout                             # sign out
```

### Balance and deposits

```bash theme={null}
machines balance                            # check spending power
machines deposit assets                     # list supported tokens and networks
machines deposit create --token USDC --network base --amount 25
machines deposit show --id <deposit-id>     # check one deposit
machines deposit watch --id <deposit-id>    # poll until complete
```

<Note>
  Send only the exact token on the exact network shown. If a memo appears, include it exactly. CLI deposits are crypto only.
</Note>

### Identity verification

Browser-based (recommended):

```bash theme={null}
machines user create --browser
machines kyc status
```

CLI-based (for automation):

```bash theme={null}
machines user create --from-file ./kyc-user.json --open --wait
```

See <a href="/user-kyc">Identity Verification</a> for the full JSON format and field reference.

### Cards

```bash theme={null}
machines card create --name "ads-bot" --limit 250 --frequency per30DayPeriod
machines card list
machines card reveal --last4 4242
machines card update --last4 4242 --name "ads-bot-v2"
machines card limit set --last4 4242 --amount 500 --frequency per30DayPeriod
machines card lock --last4 4242
machines card unlock --last4 4242
machines card delete --last4 4242
```

Disposable cards:

```bash theme={null}
machines disposable create --amount-cents 5000 --auto-cancel-after-auth
```

### Agentic payments

```bash theme={null}
machines search "apple airpods pro"
machines search "kindle paperwhite"
machines search "ninja air fryer"
machines buy "https://www.amazon.com/dp/B0DGHMNQ5Q"
machines buy "https://www.amazon.com/dp/B0DGHMNQ5Q" --card "<card-label-or-last4>" --wait
machines agent status <action-id>
machines agent confirm <action-id>
machines agent 3ds <action-id> --code <code>
```

Notes:

* shopping defaults to Amazon right now
* `machines search` is the preferred command
* `machines browser` still works as a compatibility alias
* if `--card` is omitted, Machines uses your default active card and stored billing profile
* `--wait` and `--watch` keep polling until the action pauses or finishes
* use `--payment-card-file <path|->` only for direct testing; never pass raw card numbers in flags

More examples:

```bash theme={null}
machines search "lego botanical orchid"
machines search "anker usb c charger"
machines buy "https://www.amazon.com/dp/B0DGHMNQ5Q" --wait --json
```

See <a href="/agentic-payments">Agentic Payments</a> for the full purchase flow and API examples.

### Connect an AI app

```bash theme={null}
machines mcp install --host codex    # or: claude, copilot, chatgpt
machines mcp auth login
machines mcp doctor                  # check connection health
```

<Tip>For step-by-step AI setup, see <a href="/mcp-setup">MCP Setup</a> or <a href="/claude-plugin">Claude</a>.</Tip>

### Agent output

Add `--json` to any command for structured output:

```bash theme={null}
machines card list --json
```

This also works for commerce commands:

```bash theme={null}
machines buy "https://www.amazon.com/dp/B0DGHMNQ5Q" --wait --json
```

## Troubleshooting

| Problem                       | Fix                                                                 |
| ----------------------------- | ------------------------------------------------------------------- |
| Browser didn't open           | Use `--no-launch-browser` and open the URL manually                 |
| `user not found`              | Complete identity verification first                                |
| `machines: command not found` | Run `npm i -g @machines-cash/cli` or use `npx machines-cash@latest` |
| Need full command list        | Run `machines --help`                                               |

## Next steps

* <a href="/mcp-setup">MCP Setup</a> -- connect Machines to your AI app
* <a href="/agentic-payments">Agentic Payments</a> -- one shared search, buy, status, confirm, and 3DS flow
* <a href="/claude-plugin">Claude</a> -- recommended setup for Claude users
* <a href="/raw-knowledge-file">Raw Knowledge File</a> -- paste context into any AI for better responses
