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

# proxycli

> Set up the fleet CLIProxyAPI quota collector, read provider pools and the model list, and toggle accounts.

The family belongs to the `proxycli` extension. It is visible and usable only while the extension is enabled at the Gateway:

```bash theme={"dark"}
orbit extension:enable proxycli
```

Enabling the extension deploys nothing, and disabling it removes nothing. `proxycli:setup` and `proxycli:teardown` own the collector. See [proxycli](/docs/reference/proxycli).

## Commands

| Command | Result |
| - | - |
| [`proxycli:setup`](#orbit-proxyclisetup) | Deploy the collector and publish `collector.cli-proxy-api.orbit`. |
| [`proxycli:teardown`](#orbit-proxycliteardown) | Stop the collector and withdraw `collector.cli-proxy-api.orbit`. |
| [`proxycli:status`](#orbit-proxyclistatus) | Show whether the collector is set up. |
| [`proxycli:list`](#orbit-proxyclilist) | List provider pools from the Valkey snapshot. |
| [`proxycli:show`](#orbit-proxyclishow) | Show one provider and its accounts. |
| [`proxycli:update`](#orbit-proxycliupdate) | Enable or disable one CLIProxyAPI account. |
| [`proxycli:models`](#orbit-proxyclimodels) | List models from the collector snapshot. |

Every command accepts `--json`.

## orbit proxycli:setup

Deploy the collector Process on one Node and publish `https://collector.cli-proxy-api.orbit`.

```bash theme={"dark"}
orbit proxycli:setup --node=<node> --cache-connection=<slug> --cliproxy-url=<url> --cliproxy-management-key-file=<path> [--json]
```

| Option | Required | Meaning |
| - | - | - |
| `--node` | yes | Node ID or name that runs CLIProxyAPI. |
| `--cache-connection` | yes | Redis Database connection slug for shared Valkey. |
| `--cliproxy-url` | yes | CLIProxyAPI Management API origin. When task VMs are enabled, it must equal `ORBIT_TASK_VMS_MODEL_PROXY_ORIGIN`; otherwise a collector-local origin such as `http://127.0.0.1:8317` is allowed. |
| `--cliproxy-management-key-file` | yes | File that contains only the management key. The CLI never accepts the key as an argument. |

The output shows `enabled`, `hostname`, `node_id`, `cache_connection`, and `collected_at`. It never includes a token or the management key. Setup can run again with the same options. That run rewrites the collector script when needed and reconverges the same Process in place, keeping its ID. An unchanged, completed collector stays running without a restart. When task VMs are enabled, the Gateway refuses a URL that differs from their configured model proxy origin before saving settings or changing the collector. See [Set up](/docs/reference/proxycli#set-up) for the shared-origin constraint. The management key is the only CLIProxyAPI credential. The script uses it for `/v0/management`, including auth-file models. A collector set up before that read stores no models until setup runs again and the next poll finishes.

## orbit proxycli:teardown

Stop the collector for the whole fleet, remove its Process, and withdraw `collector.cli-proxy-api.orbit` and its certificate. The Gateway also deletes the stored management key and the read and control tokens.

```bash theme={"dark"}
orbit proxycli:teardown [--yes] [--json]
```

| Option | Required | Meaning |
| - | - | - |
| `--yes` | in noninteractive and JSON modes | Confirm the teardown without a prompt. |

In a terminal the command asks a default-No question that names the fleet effect. Without `--yes`, a noninteractive or JSON call fails with `input.confirmation_required` before any Gateway request. Declining fails with `input.cancelled` and changes nothing. To collect again, run `proxycli:setup` with the key file.

## orbit proxycli:status

Show the collector state.

```bash theme={"dark"}
orbit proxycli:status [--json]
```

The output shows `enabled`, `hostname`, `node_id`, `cache_connection`, and `collected_at`. `collected_at` is null until the collector writes a snapshot.

## orbit proxycli:list

List provider pools from the snapshot.

```bash theme={"dark"}
orbit proxycli:list [--json]
```

The command reads Valkey and never calls CLIProxyAPI.

## orbit proxycli:show

Show one provider's pool and accounts.

```bash theme={"dark"}
orbit proxycli:show <provider> [--json]
```

| Argument | Required | Meaning |
| - | - | - |
| `provider` | yes | Provider slug, such as `codex` or `claude`. |

A provider that is not in the snapshot fails with `resource.not_found`.

## orbit proxycli:update

Enable or disable one CLIProxyAPI account.

```bash theme={"dark"}
orbit proxycli:update <account> --disabled|--enabled [--json]
```

| Argument or option | Required | Meaning |
| - | - | - |
| `account` | yes | Account ID from `proxycli:show`: the auth file's `auth_index`, or its name when it has none. Only letters, digits, `.`, `_`, and `-` are accepted. |
| `--disabled` or `--enabled` | exactly one | The new account state. |

The command changes the account in CLIProxyAPI and rewrites the snapshot from cache. It fetches no quota.

## orbit proxycli:models

List the models CLIProxyAPI offers, from the collector snapshot.

```bash theme={"dark"}
orbit proxycli:models [--json]
```

Each item is `{id, provider}`. The command does not call CLIProxyAPI. `provider` follows the [owned\_by mapping](/docs/reference/proxycli#models), including `anthropic` to `claude`. `google` and `meta` keep those names, and no ProxyCli provider serves them. While the collector is not set up, the command fails with `proxycli.disabled`. A snapshot with no models returns an empty list. Run `proxycli:setup` again, then wait for the next poll, before expecting models from a collector that was deployed earlier. When a later poll cannot read one auth file, the snapshot keeps that file's models from the previous poll.

When a model has no `owned_by`, `provider` comes from that model's auth file, using the same mapping. A model with neither is absent from the list.

## Errors

| Code | Meaning |
| - | - |
| `extension.disabled` | The `proxycli` extension is disabled at the Gateway. |
| `extension.state_unknown` | The CLI could not read the extension state from the Gateway. |
| `input.confirmation_required` | `proxycli:teardown` ran without `--yes` where it cannot ask. |
| `input.cancelled` | The operator declined the `proxycli:teardown` question. |
| `proxycli.key_required` | `proxycli:setup` has no `--cliproxy-management-key-file`. |
| `proxycli.key_invalid` | The key file is unreadable or empty. |
| `proxycli.url_invalid` | `--cliproxy-url` is not a URL. |
| `validation.failed` | The Gateway refuses setup input, including a `cliproxy_url` that differs from the configured task VM model proxy origin while task VMs are enabled. |
| `proxycli.state_required` | `proxycli:update` needs exactly one of `--disabled` and `--enabled`. |
| `proxycli.disabled` | The collector is not set up. |

[proxycli errors](/docs/reference/proxycli#errors) lists the Gateway errors of setup and toggles.

## Related

* [proxycli](/docs/reference/proxycli) describes placement, publication, the cache, and the model list.
* [`extension`](/docs/cli/extension) controls the Gateway switch.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.