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

# RunInfra CLI

> Read the commands your coding agent uses to set up RunInfra's open models, review changes, and verify the connection.

Your [coding agent runs these for you](/docs/tools-sdks/agent-setup). Run `runinfra help` for the exact options in your version.

## Install

Node.js 22 or newer:

```bash theme={"dark"}
npm install -g @runinfra/cli@latest
```

Or Python 3.8 or newer:

```bash theme={"dark"}
python -m pip install --upgrade runinfra-cli
```

Check with `runinfra update --check`, then update with `runinfra update`.

## Commands

| Task | Command |
| - | - |
| Sign in | `runinfra login` |
| Check sign-in | `runinfra whoami` |
| Find agents | `runinfra agents` |
| Review a connection | `runinfra connect <agent> --json` |
| Apply the approved connection | Repeat with `--yes` |
| Undo setup | `runinfra disconnect <name>` |
| Diagnose connections | `runinfra doctor` |
| List models | `runinfra models --harness <agent>` |
| Change the starting model | `runinfra models set <name> MODEL_ID` |
| Refresh models | `runinfra models sync` |
| List key prefixes | `runinfra keys` |
| Rotate a key | `runinfra keys rotate <name>` |
| Revoke a key | `runinfra keys revoke --id <keyId>` |
| Set a \$10 monthly cap | `runinfra keys cap <name> 10` (use `none` to remove) |
| Read your plan | `runinfra plan` |
| Buy a plan | `runinfra plan buy starter` (or `pro`, `team`) |
| Open plan settings | `runinfra plan settings` |
| Read your account | `runinfra account` |
| Sign out | `runinfra logout` |
| Update | `runinfra update` |
| Read help | `runinfra help` |

Use the separate command's name for model, key and disconnect commands.
Disconnect does not sign this computer out.

## Connect options

| Option | Meaning |
| - | - |
| `--funding plan` | Coding plan first, then credits under your workspace policy. |
| `--funding credits` | Pay as you go; keeps paying from credits after a plan is added. |
| `--in-place` | Use RunInfra inside Claude Code or Codex until you disconnect. |
| `--name <name>` | Name a separate command. |
| `--model MODEL_ID` | Choose a starting model. |
| `--key-source file\|env` | Choose where the key lives. |
| `--preview` | Allow preview setup, including saved settings and a paid check. |
| `--yes` | Approve the same unused review. |

Omit `--funding` when no Coding plan can pay. See [Choose how to pay](/docs/tools-sdks/agent-setup#choose-how-to-pay).

## Good to know

`--json` prints one document on stdout.

File and key changes need a reviewed plan and approval. Scripts exit `8` until you repeat with `--yes`; plan purchases use browser approval.

Only `connect`, `keys rotate`, `doctor --verify` and `models sync --verify` send paid checks.

Files live in `~/.config/runinfra` (`$XDG_CONFIG_HOME/runinfra` when set; `%LOCALAPPDATA%\runinfra` on Windows). `RUNINFRA_CONFIG_DIR` changes that path. Only step-by-step terminal setup adds a separate command's folder to PATH, after your yes.

## Exit codes

| Code | Meaning |
| - | - |
| `0` | Success. |
| `1` | Unexpected internal error. |
| `2` | Bad usage, unsupported runtime, or local precheck. |
| `3` | Not signed in, denied, expired, revoked, or `auth_pending` (awaiting approval). |
| `4` | Entitlement or plan refused, or the requested agent, key or resource was not found. |
| `5` | Network, server, readiness, or requested measurement unavailable. |
| `6` | Integrity or configuration verification failure. |
| `7` | Local preparation failed or storage is unavailable. |
| `8` | Consent required before the command may continue. |
| `9` | Consent was refused. |
| `130` | Interrupted. |

## Terminal app

Run `runinfra` in your terminal. Pick an agent it found, then a separate command you can rename or **Inside** Claude Code or Codex.
Sign in through your browser, read the short review, and press **Enter**. The same screens manage keys and sign-out.
