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

# Setup

> Sign-in, configuration, clouds, secrets, instances, and MCP

These commands prepare an account before the first run. [Conventions](#conventions) covers addresses, shared flags, and exit codes.

| Command | Description |
| - | - |
| [`monte login`](#monte-login) | Sign in |
| [`monte logout`](#monte-logout) | Remove the sign-in token from this machine |
| [`monte config`](#monte-config) | Print the resolved configuration |
| [`monte --version`](#monte-version) | Print the installed version |
| [`monte cloud connect`](#monte-cloud-connect) | Connect a cloud account for BYOC |
| [`monte cloud list`](#monte-cloud-list) | List connected clouds |
| [`monte cloud show`](#monte-cloud-show) | Show one connected cloud |
| [`monte cloud disconnect`](#monte-cloud-disconnect) | Remove a connected cloud |
| [`monte secret set`](#monte-secret-set) | Store a secret that jobs read |
| [`monte secret list`](#monte-secret-list) | List secret names |
| [`monte secret delete`](#monte-secret-delete) | Remove a secret |
| [`monte instance up`](#monte-instance-up) | Start a GPU instance |
| [`monte instance status`](#monte-instance-status) | List GPU instances |
| [`monte instance down`](#monte-instance-down) | Stop a GPU instance |
| [`monte mcp`](#monte-mcp) | Print the MCP server setup |

## monte login

```text theme={null}
monte login [--no-browser]
```

Open a browser to sign in, and store a token on this machine. The same account signs in to the [Console](https://docs.trymonte.ai/platform.md#console) and the [MCP server](https://docs.trymonte.ai/mcp/overview.md).

| Flag | Type | Default | Description |
| - | - | - | - |
| `--no-browser` | flag | off | Print a URL and a one-time code to open on any device |

```bash theme={null}
monte login
```

```text theme={null}
Signed in as lee@example.com (team helpdesk).
```

## monte logout

```text theme={null}
monte logout
```

Remove the sign-in token from this machine. Running jobs and [inference API keys](https://docs.trymonte.ai/commands/serving.md#monte-key-revoke) do not change.

```bash theme={null}
monte logout
```

```text theme={null}
Signed out lee@example.com. Removed ~/.config/monte/token.
```

## monte config

```text theme={null}
monte config [--json]
```

Print the resolved configuration: the account, the data root, the artifact bucket, the connected clouds, and the [training configs](https://docs.trymonte.ai/training/configs.md).

| Flag | Type | Default | Description |
| - | - | - | - |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte config
```

```text theme={null}
account        lee@example.com (team helpdesk)
data root      ~/monte-data
artifacts      gs://helpdesk-monte-artifacts
clouds         gcp (us-central1)
configs        triage-sft, triage-dpo, triage-grpo, triage-distill
```

`MONTE_CONFIGS` adds a directory of training configs. `MONTE_GYM_ROOTS` sets where `monte env create` writes and where `monte env add` reads.

## monte --version

```text theme={null}
monte --version
```

Print the installed version.

```bash theme={null}
monte --version
```

```text theme={null}
monte 0.14.2
```

## monte cloud connect

```text theme={null}
monte cloud connect <azure|aws|gcp> --region <region> [--name <name>]
  [--cluster <name> --namespace <namespace>]
  [--subscription <id>] [--resource-group <name>]   # Azure
  [--account <id>]                                  # AWS
  [--project <id>]                                  # GCP
```

Connect a cloud account for BYOC: jobs, artifact storage, and deployments then run in it. The command creates the resources that [Connect a Cloud for BYOC](https://docs.trymonte.ai/deployment.md#connect-a-cloud-for-byoc) lists, and installs the Monte operator with one identity scoped to its namespace and the artifact bucket. It uses the signed-in `gcloud`, `az`, or `aws` session, and that account needs the cloud roles listed there.

| Flag | Type | Default | Description |
| - | - | - | - |
| `<azure\|aws\|gcp>` | argument | required | The cloud provider |
| `--region` | string | required | The one region for jobs, storage, and endpoints in this cloud |
| `--name` | string | the provider name | The name that `--cloud` flags and `monte cloud show` use |
| `--cluster` | string | none | An existing Kubernetes cluster. The command installs the operator in it and creates no cluster or node pool. It still creates artifact storage, the registry, and the secret store. |
| `--namespace` | string | required with `--cluster` | The namespace for the operator and its jobs |
| `--subscription` | string | required on Azure | The Azure subscription ID |
| `--resource-group` | string | `monte` | The Azure resource group that holds the resources |
| `--account` | string | required on AWS | The AWS account ID |
| `--project` | string | required on GCP | The GCP project ID |
| `--yes` | flag | off | Skip the prompt that lists the resources to create |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte cloud connect gcp --project <project-id> --region us-central1
```

```text theme={null}
This creates in project <project-id> (us-central1):
  GKE cluster monte-gke, GPU node pool gpu-h100 (0 nodes)
  bucket helpdesk-monte-artifacts
  operator in namespace monte, identity monte-operator
  ...
create? [y/N] y
Connected cloud 'gcp' (us-central1). The operator connected outbound. Check the GPU quota of the node pool before the first job.
```

In an existing cluster:

```bash theme={null}
monte cloud connect azure --subscription <subscription-id> --resource-group monte \
  --region eastus --cluster <name> --namespace monte
```

| Error | Cause |
| - | - |
| `E_STORAGE` | The account cannot create the bucket |
| `E_REFUSAL` | A cloud with that name is already connected |

## monte cloud list

```text theme={null}
monte cloud list [--json]
```

List the connected clouds of the team.

| Flag | Type | Default | Description |
| - | - | - | - |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte cloud list
```

```text theme={null}
NAME    PROVIDER  REGION         DEPLOYMENTS
gcp     gcp       us-central1   3
```

## monte cloud show

```text theme={null}
monte cloud show <name> [--json]
```

Show one connected cloud: each resource, its region, and the scope of the operator's identity.

| Flag | Type | Default | Description |
| - | - | - | - |
| `<name>` | argument | required | The cloud name |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte cloud show gcp
```

```text theme={null}
cloud      gcp (us-central1)
operator   monte-operator in namespace monte, connected outbound
identity   monte-operator  scope: namespace monte on monte-gke, bucket helpdesk-monte-artifacts, registry, secret store
compute    monte-gke  node pool gpu-h100  0/8 nodes
storage    helpdesk-monte-artifacts
```

## monte cloud disconnect

```text theme={null}
monte cloud disconnect <name> [--yes] [--json]
```

Remove the operator and its identity. The resources and the data stay in the team's account.

| Flag | Type | Default | Description |
| - | - | - | - |
| `<name>` | argument | required | The cloud name |
| `--yes` | flag | off | Skip the prompt |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte cloud disconnect gcp --yes
```

```text theme={null}
Disconnected cloud 'gcp'. The resources stay in project <project-id>.
```

| Error | Cause |
| - | - |
| `E_IN_USE` | A deployment runs in the cloud. Delete it with `monte deployment delete` first. |

## monte secret set

```text theme={null}
monte secret set <NAME> [--cloud <name>] [--json]
```

Store a secret for the team. Every job of the team reads it as an environment variable with the same name. A [grader](https://docs.trymonte.ai/environments/graders.md#give-the-grader-a-secret) reads the API key of a judge model this way.

The value comes from a hidden prompt, or from stdin. No flag takes the value, so it never goes into shell history. A second `set` of the same name replaces the value.

| Flag | Type | Default | Description |
| - | - | - | - |
| `<NAME>` | argument | required | Uppercase letters, digits, and `_` |
| `--cloud` | string | the only connected cloud | Store the secret in the secret store of that cloud. On Monte Cloud, Monte stores it. |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte secret set JUDGE_API_KEY
```

```text theme={null}
value for JUDGE_API_KEY: ********
Stored JUDGE_API_KEY in gcp (Secret Manager).
```

## monte secret list

```text theme={null}
monte secret list [--json]
```

List the secret names of the team, with the store and the time of the last change. Values never print.

| Flag | Type | Default | Description |
| - | - | - | - |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte secret list
```

```text theme={null}
NAME            STORE   UPDATED                BY
HF_TOKEN        gcp     2026-10-02 09:14 UTC   lee@example.com
JUDGE_API_KEY   gcp     2026-10-27 16:40 UTC   lee@example.com
```

## monte secret delete

```text theme={null}
monte secret delete <NAME> [--yes] [--json]
```

Remove a secret. Jobs that start after the delete do not get the variable. Running jobs keep the value.

| Flag | Type | Default | Description |
| - | - | - | - |
| `<NAME>` | argument | required | The secret name |
| `--yes` | flag | off | Skip the prompt |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte secret delete HF_TOKEN --yes
```

```text theme={null}
Deleted HF_TOKEN from gcp.
```

## monte instance up

```text theme={null}
monte instance up [--type <gpu>x<n>] [--cold] [--keep-alive] [--json]
```

Start a GPU instance that stays up across several jobs. `--remote` starts an instance on its own when none is free. The 24-hour maximum lifetime applies only to instances that `monte instance up` starts. A `--remote` job runs until it finishes.

| Flag | Type | Default | Description |
| - | - | - | - |
| `--type` | string | `h100x1` | The GPU type and the GPU count: `l4`, `l40s`, `a100-80gb`, `h100`, or `h200`, then `x1`, `x2`, `x4`, or `x8` |
| `--cold` | flag | off | Start with an empty cache, and fetch environments, datasets, and weights from artifact storage |
| `--keep-alive` | flag | off | Turn off the idle shutdown. The 24-hour maximum lifetime still applies. |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte instance up --type h100x1
```

```text theme={null}
Started gpu-4f2a (h100x1, us-central1). Ready in 3m12s.
Idle shutdown after 30m. Maximum lifetime 24h.
```

| Error | Cause |
| - | - |
| `E_INSTANCE` | No instance of that type is available, or the GPU quota is full |

## monte instance status

```text theme={null}
monte instance status [--json]
```

List the GPU instances of the account, with the age, the job, and the time to shutdown.

| Flag | Type | Default | Description |
| - | - | - | - |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte instance status
```

```text theme={null}
ID         TYPE          AGE     JOB                       SHUTDOWN
gpu-4f2a   h100x1        1h05m   support-triage/train-07   30m after the job
gpu-91c0   h100x1        12m     none                      in 18m
```

## monte instance down

```text theme={null}
monte instance down <id|name> [--yes] [--json]
```

Stop one GPU instance. A job on it stops, and its run reads as abandoned.

| Flag | Type | Default | Description |
| - | - | - | - |
| `<id\|name>` | argument | required | The instance ID or name |
| `--yes` | flag | off | Skip the prompt when a job runs on the instance |
| `--json` | flag | off | Print JSON on stdout |

```bash theme={null}
monte instance down gpu-91c0
```

```text theme={null}
Stopped gpu-91c0 after 12m.
```

## monte mcp

```text theme={null}
monte mcp [--agent claude|cursor|codex]
```

Print the MCP server URL and a setup snippet for each supported coding agent.

| Flag | Type | Default | Description |
| - | - | - | - |
| `--agent` | string | all three | Print only the snippet for one agent |

```bash theme={null}
monte mcp --agent claude
```

```text theme={null}
MCP server  https://mcp.trymonte.ai/mcp

Claude Code:
  claude mcp add --transport http monte https://mcp.trymonte.ai/mcp
```

## Conventions

### Address a Run or a Checkpoint

* Run IDs count up separately for each kind: `train-NN` and `eval-NN`.
* A run is `<experiment>/<run>`, for example `support-triage/train-07`. The run half is the run ID or an alias: `eval@N` or `train@N`, the succeeded run at absolute step N.
* In a command that already names the experiment, a checkpoint is `<run>/<step>`: `monte eval --checkpoint train-07/200` and `monte train --parent train-07/200`. `<step>` is absolute, counted from the base model. Aliases do not resolve here.
* In a command that names no experiment, a checkpoint is `<experiment>/<run>/<step>`, for example `support-triage/train-07/200`. The short form `<experiment>/<run>` names the checkpoint that the run saved at its last step.
* An environment or a dataset is `<name>` or `<name>@<version>`, for example `support-escalation@2`. A bare name means the newest version.
* Two baselines share the alias `eval@0`. `monte compare` takes the one on the same eval as the other run. Other commands refuse the alias and list the IDs.

### Shared Flags

| Flag | Commands | Effect |
| - | - | - |
| `--json` | Every command except `login`, `logout`, `mcp`, and `run logs` | Print one JSON document on stdout. Notes go to stderr. `monte run logs` prints JSON lines already. |
| `--yes` | Every command that asks before it acts | Skip the prompt. Without a terminal and without `--yes`, the command refuses with `E_CONFIRM`. |
| `--dry-run` | `eval`, `train`, `train resume`, `grade` | Resolve the settings, print them, and start nothing |
| `--remote` | `eval`, `train`, `train resume`, `grade`, `dataset generate` | Submit the job to a GPU instance and return. On `experiment list`, read artifact storage. |
| `--push` | `eval`, `train`, `train resume`, `grade` | Upload results after each state change. On a training run, also push the checkpoint at the end. |
| `--smoke` | `eval`, `train` | A 3-step training run or a 3-task eval that never counts as a result |

`--confirm <experiment>` replaces `--yes` on `experiment delete`. Its value is the experiment name, typed out.

### Exit Codes

Every refusal or failure prints `CODE: cause (fix)` on stderr. Codes 3 and higher are refusals or failures.

| Code | Name | When |
| - | - | - |
| 0 | success | |
| 1 | aborted | Ctrl+C at the prompt, or a broken pipe |
| 2 | usage | A bad flag, a missing argument, or two flags that exclude each other |
| 3 | `E_REFUSAL`, `E_NO_BASELINE` | A refusal with no more specific code, or a training run before each eval has a baseline |
| 5 | `E_NOT_COMPARABLE` | A comparison or a regrade across runs whose tasks, eval settings, or base model differ |
| 6 | `E_PREFLIGHT` | A preflight check failed: the run lock, a changed eval environment, disk space, or the GPU |
| 7 | `E_CONFIRM` | The prompt was declined or could not show, or a `--confirm` value does not match |
| 8 | `E_EXPERIMENT_EXISTS` | `experiment create` on a name that exists |
| 9 | `E_NOT_FOUND` | No such object |
| 10 | `E_NOT_RUNNING` | `run stop` on a run that is not running |
| 11 | `E_CORRUPT_STATE` | Stored state fails validation, or a stored version fails its hash |
| 12 | `E_SERVING` | The model server produced no score |
| 13 | `E_VERIFICATION` | A finished run or a checkpoint file failed its check |
| 14 | `E_STORAGE` | A bucket is unreachable |
| 15 | `E_INSTANCE` | The CLI could not get or operate a GPU instance |
| 16 | `E_REMOTE` | A `--remote` job could not be submitted |
| 18 | `E_NOT_SIGNED_IN` | No sign-in token, or a token that is not valid |
| 19 | `E_NOT_A_MEMBER` | Signed in, but not a member of the team that owns the records |
| 20 | `E_IN_USE` | A delete or disconnect of an object that another record still uses |


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