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

# OPERATIONS

> Track, wait on, and cancel long-running operations

| Command         | Description                                                    |
| --------------- | -------------------------------------------------------------- |
| [`get`](#get)   | Show full details and current status for a single operation.   |
| [`list`](#list) | List operations in a project, optionally filtered and sorted.  |
| [`stop`](#stop) | Request cancellation of a running operation.                   |
| [`wait`](#wait) | Block until an operation finishes, then print its final state. |

***

## GET

Show full details and current status for a single operation.

```bash theme={null}
oumi-cli operations get [OPTIONS] {operation_id}
```

**Arguments**

| Argument       | Type | Required | Description                                             |
| -------------- | ---- | -------- | ------------------------------------------------------- |
| `OPERATION_ID` | int  | ✓        | ID of the operation to inspect (see `operations list`). |

**Options**

| Option      | Type | Required | Description                                                                             |
| ----------- | ---- | -------- | --------------------------------------------------------------------------------------- |
| `--project` | str  |          | Project that owns the operation; falls back to OUMI\_PROJECT\_ID or the active profile. |

***

## LIST

List operations in a project, optionally filtered and sorted.

```bash theme={null}
oumi-cli operations list [OPTIONS]
```

**Options**

| Option             | Type      | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------ | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--project`        | str       |          | Project to list operations for; falls back to OUMI\_PROJECT\_ID or the active profile.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `--limit`          | int range |          | Return at most N operations (default 100). The CLI fetches and loops over pages internally; you never pass a page token.                                                                                                                                                                                                                                                                                                                                                                                 |
| `--all`            | flag      |          | Return every operation, looping until the cursor is exhausted (bounded by `--max-items`). Mutually exclusive with `--limit`.                                                                                                                                                                                                                                                                                                                                                                             |
| `--max-items`      | int range |          | Hard safety cap for `--all` (default 10000).                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `--resource`       | str       |          | Only show operations tied to this resource. Format: projects/\{project\_id}/\{resource\_type}/\{resource\_id} (optionally with /versions/\{version\_id}). Resource types: datasets, models, evaluators, recipes.                                                                                                                                                                                                                                                                                         |
| `--search`         | str       |          | Only show operations whose display name matches this search text.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `--sort-by`        | choice    |          | Field to sort by. One of: `created_at`, `status`, `type`, `updated_at`.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `--sort-direction` | choice    |          | Sort direction (asc or desc).                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--status`         | choice    |          | Only show operations in this status. One of: `cancelled`, `cancelling`, `completed`, `failed`, `pending`, `running`, `unknown`.                                                                                                                                                                                                                                                                                                                                                                          |
| `--type`           | choice    |          | Only show operations of this type. One of: `analysis`, `analysis_query`, `dataset_derive`, `dataset_download`, `dataset_merge`, `dataset_upload`, `datasource_upload`, `data_smart_upload`, `deployment_create`, `deployment_delete`, `distillation`, `evaluation`, `failure_mode_generation`, `import_external_logs`, `judge_config_generation`, `log_export`, `model_export`, `model_import`, `model_training`, `synthesis`, `synthesis_config_generation`, `synthesis_config_improvement`, `unknown`. |

***

## STOP

Request cancellation of a running operation.

```bash theme={null}
oumi-cli operations stop [OPTIONS] {operation_id}
```

**Arguments**

| Argument       | Type | Required | Description                                            |
| -------------- | ---- | -------- | ------------------------------------------------------ |
| `OPERATION_ID` | int  | ✓        | ID of the operation to cancel (see `operations list`). |

**Options**

| Option      | Type | Required | Description                                                                             |
| ----------- | ---- | -------- | --------------------------------------------------------------------------------------- |
| `--project` | str  |          | Project that owns the operation; falls back to OUMI\_PROJECT\_ID or the active profile. |

***

## WAIT

Block until an operation finishes, then print its final state.

```bash theme={null}
oumi-cli operations wait [OPTIONS] {operation_id}
```

**Arguments**

| Argument       | Type | Required | Description                                              |
| -------------- | ---- | -------- | -------------------------------------------------------- |
| `OPERATION_ID` | int  | ✓        | ID of the operation to wait for (see `operations list`). |

**Options**

| Option       | Type | Required | Description                                                                             |
| ------------ | ---- | -------- | --------------------------------------------------------------------------------------- |
| `--project`  | str  |          | Project that owns the operation; falls back to OUMI\_PROJECT\_ID or the active profile. |
| `--timeout`  | int  |          | Give up after this many seconds (default: 600).                                         |
| `--interval` | int  |          | Seconds to sleep between status checks (default: 5).                                    |

***
