> ## 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.

# Codex

> Connect Machines to Codex for balances, cards, deposits, and agentic payments.

Connect Machines to Codex so your coding agent can check balances, create cards, handle crypto deposits, and place purchases.

## Prerequisites

* Node.js 18+
* Codex installed and running
* A Machines account with identity verification complete

## Setup

<Steps>
  <Step title="Install Machines for Codex">
    ```bash theme={null}
    npx @machines-cash/agent-skill install --host codex
    ```
  </Step>

  <Step title="Log in">
    ```bash theme={null}
    npx @machines-cash/agent-skill auth login
    ```

    Approve access in your browser.
  </Step>

  <Step title="Confirm in Codex">
    Open Codex and verify that the Machines skill is available.
  </Step>

  <Step title="Verify it works">
    Ask Codex: `show my balance`
  </Step>
</Steps>

## Example prompts

Try:

* `show my balance`
* `list my active cards`
* `search apple airpods pro on amazon`
* `buy these apple airpods pro on amazon using my default card`
* `check the status of my latest purchase`

## Useful commands

```bash theme={null}
npx @machines-cash/agent-skill install --host codex     # install
npx @machines-cash/agent-skill auth login                # login
npx @machines-cash/agent-skill auth login --manual-key   # manual login fallback
npx @machines-cash/agent-skill doctor                    # health check
```

## Troubleshooting

| Problem                       | Fix                                                                 |
| ----------------------------- | ------------------------------------------------------------------- |
| Machines not visible in Codex | Run the install command again, then reopen Codex                    |
| Login window didn't open      | Use `--manual-key` flag for manual login                            |
| Still not connected           | Run `doctor` to diagnose, or see <a href="/mcp-setup">MCP Setup</a> |

## Next steps

* <a href="/cli">Machines CLI</a> -- full terminal workflow
* <a href="/agentic-payments">Agentic Payments</a> -- one shared search, buy, status, confirm, and 3DS flow
* <a href="/mcp-setup">MCP Setup</a> -- generic troubleshooting and account safety
* <a href="/raw-knowledge-file">Raw Knowledge File</a> -- add context for better responses
