# CLI reference

[Open models](https://www.rightnowai.co/docs/open-models) / [CLI reference](https://www.rightnowai.co/docs/open-models/cli)

Updated 2026-11-11

Your [coding agent runs these for you](https://www.rightnowai.co/docs/open-models/guides/coding-agents). Run `runinfra help` for the exact options in your version.

**Connection**

| Connection | Value |
| --- | --- |
| Control site | `https://runinfra.ai` |
| Command | `runinfra` |
| Sign-in | Approve the device code in your browser. Keep your API key out of agent chat. |
| Billing | The existing funding rules of your open-model account. |

Use the model ID from your setup plan.

Replace `MODEL_ID` with an available id from [Open models](https://runinfra.ai/inference-api?utm_source=rightnowai.co&utm_medium=referral&utm_content=docs-open-models); read current capabilities, limits and prices from `GET /v1/models`.

> Coding plans are retired. New customers have been unable to buy them since 2026-11-03. Existing holders keep their current plan until its paid period ends, subject to the plan's payment and eligibility conditions. `runinfra plan buy` is unavailable. Workspaces without a current plan use credits. Installed CLIs still run `runinfra plan`, which shows your plan until it ends.

## Install

Node.js 22 or newer:

**Shell**

```shell
npm install -g @runinfra/cli@latest
```

Or Python 3.8 or newer:

**Shell**

```shell
python -m pip install --upgrade runinfra-cli
```

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

## Commands

**Reference 33**

| 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 [name]` |
| 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) |
| Check plan status | `runinfra plan` |
| 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

**Reference 61**

| Option | Meaning |
| --- | --- |
| `--funding plan` | Current coding plan first, then credits under your workspace policy. |
| `--funding credits` | Pay as you go; keeps paying from credits while a current plan remains active. |
| `--in-place` | Use the open-models service 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](https://www.rightnowai.co/docs/open-models/guides/coding-agents#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`.

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

**Reference 86**

| 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. Pick one you already set up to update its models, set it up again, or remove the open-models service. Sign in through your browser, read the short review, and press **Enter**. The open-models service then offers to start the agent. The same screens manage keys and sign-out.

[Source reference](https://runinfra.ai/docs/tools-sdks/connect?utm_source=rightnowai.co&utm_medium=referral&utm_content=docs-open-models)

## Next

[CLI troubleshooting](https://www.rightnowai.co/docs/open-models/cli/troubleshooting)
