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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.omni.co/feedback

```json
{
  "path": "/developers/cli/commands",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Commands

> Reference for all Omni CLI commands, including configuration, API operations, and global flags.

## Global flags

These flags are available on all commands:

| Flag             | Description                                                   |
| ---------------- | ------------------------------------------------------------- |
| `--help`, `-h`   | View help                                                     |
| `--token TOKEN`  | API token (overrides environment variable and config profile) |
| `--base-url URL` | API base URL (overrides config profile)                       |
| `--profile NAME` | Config profile to use                                         |
| `--compact`      | Non-indented JSON output (useful for piping to `jq`)          |

## omni config

Manage CLI profiles. These commands don't require authentication.

### omni config init

Interactively create a new configuration profile. Prompts for a profile name, API endpoint, and API key.

```bash theme={null}
omni config init
```

### omni config show

Display the current configuration. API keys are redacted in the output.

```bash theme={null}
omni config show
```

### omni config use {"\<profile\>"}

Switch the default profile.

```bash theme={null}
omni config use <profile>
```

## omni agent-help

Print a concise usage guide formatted for AI agents.

```bash theme={null}
omni agent-help
```

## API commands

<Tip>
  View the current OpenAPI spec using the [API Explorer](/api/api-explorer#openapi-specification) in your instance.
</Tip>

Most of the commands in this section are auto-generated from the Omni OpenAPI spec. For the Omni CLI, this means:

* **API tags become command groups**. For example, the `documents` API tag corresponds to the `omni documents` command group.

* **Path parameters become positional arguments**, such as `documentId` in the following example:

  ```bash wrap theme={null}
  # API endpoint
  POST /api/documents/<documentId>/duplicate

  # CLI
  omni documents duplicate <documentid>
  ```

* **Query parameters become flags**, such as `userId` in the following example:

  ```bash wrap theme={null}
  # API endpoint
  POST /api/documents/<documentId>/duplicate?userId=<userId>

  # CLI
  omni documents duplicate <documentid> --userid <userid>
  ```

* **Request bodies are passed via `--body` or stdin.**

  ```bash wrap theme={null}
  omni documents duplicate <documentid> --userid <userid> --body '{"name": "Blob Sales"}'
  ```

Run `omni <group> --help` to see all commands in a group or `omni <group> <command> --help` for command-specific argument and flag details.

### omni ai

AI-powered query generation, job management, and documentation search. See the [AI API documentation](/api/ai) for more information.

```bash theme={null}
omni ai <command> 
```

| Command             | Description                                                   |
| ------------------- | ------------------------------------------------------------- |
| `generate-query`    | Generate and optionally execute a query from natural language |
| `pick-topic`        | Pick the best topic for a prompt                              |
| `search-omni-docs`  | Search Omni documentation                                     |
| `job-submit`        | Submit an AI job                                              |
| `job-status`        | Get AI job status                                             |
| `job-cancel`        | Cancel an AI job                                              |
| `job-result`        | Get AI job result                                             |
| `job-visualization` | Render AI job visualization                                   |

```bash wrap theme={null}
# Answer a question about your data
omni ai generate-query --body '{"modelId":"MODEL_ID","prompt":"how many active users","executeQuery":true}'

# Search the Omni docs
omni ai search-omni-docs --body '{"query":"how do I..."}'

# View help for job-status command, including arguments and flag details
omni ai job-status --help
```

### omni connections

Manage [database connections](/api/connections), [dbt configurations](/api/dbt), [schema refresh schedules](/api/schema-refresh-schedules), and [connection environments](/api/connection-environments).

```bash theme={null}
omni connections <command>
```

| Command                   | Description                      |
| ------------------------- | -------------------------------- |
| `list`                    | List connections                 |
| `create`                  | Create a connection              |
| `update`                  | Update a connection              |
| `dbt-get`                 | Get dbt configuration            |
| `dbt-update`              | Update dbt configuration         |
| `dbt-delete`              | Delete dbt configuration         |
| `dbt-environments-create` | Create dbt environment           |
| `dbt-environments-update` | Update dbt environment           |
| `schedules-list`          | List schema refresh schedules    |
| `schedules-create`        | Create schema refresh schedule   |
| `schedules-get`           | Get a schema refresh schedule    |
| `schedules-update`        | Update a schema refresh schedule |
| `schedules-delete`        | Delete a schema refresh schedule |
| `environments-list`       | List connection environments     |
| `environments-create`     | Create connection environments   |
| `environments-update`     | Update a connection environment  |
| `environments-delete`     | Delete a connection environment  |

```bash wrap theme={null}
# View all connections
omni connections list

# Create a connection environment
omni connections environments-create --body '{"baseConnectionId": "<baseConnectionId>","environmentConnectionIds": "<environmentConnectionId>"}'

# View help for create command, including arguments and flag details
omni connections create --help
```

### omni content

List content in your organization. See the [Content API documentation](/api/content) for more information.

```bash theme={null}
omni content list
```

| Command | Description                                       |
| ------- | ------------------------------------------------- |
| `list`  | List all content (dashboards, workbooks, folders) |

### omni dashboards

[Download dashboards](/api/dashboard-downloads) and manage [dashboard filters](/api/dashboard-filters).

```bash theme={null}
omni dashboards <command>
```

| Command           | Description                   |
| ----------------- | ----------------------------- |
| `download`        | Initiate a dashboard download |
| `download-file`   | Get a download file           |
| `download-status` | Get download job status       |
| `get-filters`     | Get dashboard filters         |
| `update-filters`  | Update dashboard filters      |

```bash theme={null}
# Download dashboard
omni dashboards download <dashboardid>

# View help for update-filters command, including arguments and flag details
omni dashboards update-filters --help
```

### omni documents

Create, manage, and configure [documents](/api/documents), including [permissions](/api/document-permissions), drafts, [labels](/api/document-labels), and [favorites](/api/document-favorites).

```bash theme={null}
omni documents <command>
```

| Command                      | Description                         |
| ---------------------------- | ----------------------------------- |
| `list`                       | List documents                      |
| `create`                     | Create a document                   |
| `get`                        | Get a document                      |
| `update`                     | Rename a document                   |
| `delete`                     | Delete a document                   |
| `get-queries`                | List document queries               |
| `move`                       | Move a document                     |
| `get-permissions`            | Get document permissions            |
| `update-permission-settings` | Update document permission settings |
| `add-permits`                | Add document permits                |
| `update-permits`             | Update document permits             |
| `revoke-permits`             | Revoke document permits             |
| `create-draft`               | Create a document draft             |
| `discard-draft`              | Discard a document draft            |
| `duplicate`                  | Duplicate a document                |
| `add-favorite`               | Add document to favorites           |
| `remove-favorite`            | Remove document from favorites      |
| `bulk-update-labels`         | Bulk update document labels         |
| `add-label`                  | Add label to a document             |
| `remove-label`               | Remove label from a document        |
| `transfer-ownership`         | Transfer document ownership         |
| `access-list`                | List document access principals     |

```bash wrap theme={null}
# List documents
omni documents list

# Rename a document
omni documents update <document-id> --name "New Blob Sales"

# View help for transfer-ownership command, including arguments and flag details
omni documents transfer-ownership --help
```

### omni embed

Generate SSO sessions for [embedded Omni instances](/embed).

```bash wrap theme={null}
omni embed sso-generate-session
```

| Command                | Description                      |
| ---------------------- | -------------------------------- |
| `sso-generate-session` | Generate an embedded SSO session |

### omni folders

Manage [folders](/api/folders) and [folder permissions](/api/folder-permissions).

| Command              | Description               |
| -------------------- | ------------------------- |
| `list`               | List folders              |
| `create`             | Create a folder           |
| `delete`             | Delete a folder           |
| `update`             | Update a folder           |
| `get-permissions`    | Get folder permissions    |
| `add-permissions`    | Add folder permissions    |
| `update-permissions` | Update folder permissions |
| `revoke-permissions` | Revoke folder permissions |

```bash wrap theme={null}
# List folders
omni folders list

# Create a folder
omni folders create --body '{"name":"Blob Sales"}'

# View help for revoke-permissions command, including arguments and flag details
omni folders revoke-permissions --help
```

### omni labels

Create and manage [content labels](/api/labels).

```bash wrap theme={null}
omni labels <command>
```

| Command  | Description         |
| -------- | ------------------- |
| `list`   | List all labels     |
| `create` | Create a label      |
| `get`    | Get a label by name |
| `update` | Update a label      |
| `delete` | Delete a label      |

```bash wrap theme={null}
# Create a label
omni labels create --body '{"name":"important","color":"#0366d6"}'

# Get a label by name
omni labels get <name>

# View help for delete command, including arguments and flag details
omni labels delete --help
```

### omni models

Manage models, views, fields, topics, branches, [git configuration](/api/model-git-configuration), and YAML. See the [Model API documentation](/api/models) for more information.

```bash wrap theme={null}
omni models <command>
```

| Command                     | Description                 |
| --------------------------- | --------------------------- |
| `list`                      | List models                 |
| `create`                    | Create a model              |
| `create-branch`             | Create a branch of a model  |
| `get-views`                 | Get model views             |
| `update-view`               | Update a view               |
| `delete-view`               | Delete a view               |
| `create-field`              | Create a field              |
| `update-field`              | Update a field              |
| `delete-field`              | Delete a field              |
| `list-topics`               | List topics                 |
| `get-topic`                 | Get a topic                 |
| `update-topic`              | Update a topic              |
| `delete-topic`              | Delete a topic              |
| `refresh`                   | Refresh model schema        |
| `validate`                  | Validate a model            |
| `migrate`                   | Migrate a model             |
| `delete-branch`             | Delete a branch             |
| `branch-dbt`                | Set branch dbt environment  |
| `merge-branch`              | Merge a branch              |
| `cache-reset`               | Reset cache for policy      |
| `git-get`                   | Get git configuration       |
| `git-create`                | Create git configuration    |
| `git-update`                | Update git configuration    |
| `git-delete`                | Delete git configuration    |
| `git-sync`                  | Sync model with git         |
| `content-validator-get`     | Validate content references |
| `content-validator-replace` | Replace content references  |
| `yaml-get`                  | Get model YAML              |
| `yaml-create`               | Update model YAML           |
| `yaml-delete`               | Delete a model YAML file    |

```bash wrap theme={null}
# List models (including IDs)
omni models list --compact

# Create a branch of a model
omni models create-branch <model-id> --name "add-new-columns"

# View help for yaml-create command, including arguments and flag details
omni models yaml-create --help
```

### omni query

Run and monitor query execution. See the [Query API documentation](/api/queries) for more information.

```bash theme={null}
omni query <command>
```

| Command | Description                     |
| ------- | ------------------------------- |
| `run`   | Execute a semantic query        |
| `wait`  | Wait for query jobs to complete |

```bash wrap theme={null}
# Run a semantic query
omni query run --body '{"modelId":"MODEL_ID","query":{"fields":["view_name/field_name"],"limit":100}}'

# View help for wait command, including arguments and flag details
omni query wait --help
```

### omni scim

SCIM user and group provisioning, including embed users. See the [Users API](/api/users) and [User groups API documentation](/api/user-groups) for more information.

```bash wrap theme={null}
omni scim <command>
```

| Command              | Description          |
| -------------------- | -------------------- |
| `users-list`         | List SCIM users      |
| `users-create`       | Create a SCIM user   |
| `users-get`          | Get a SCIM user      |
| `users-replace`      | Replace a SCIM user  |
| `users-update`       | Update a SCIM user   |
| `users-delete`       | Delete a SCIM user   |
| `embed-users-list`   | List embed users     |
| `embed-users-get`    | Get an embed user    |
| `embed-users-delete` | Delete an embed user |
| `groups-list`        | List SCIM groups     |
| `groups-create`      | Create a SCIM group  |
| `groups-get`         | Get a SCIM group     |
| `groups-replace`     | Replace a SCIM group |
| `groups-update`      | Update a SCIM group  |
| `groups-delete`      | Delete a SCIM group  |

```bash wrap theme={null}
# List maximum of 10 groups
omni scim groups-list --count "10"

# View help for users-create command, including arguments and flag details
omni scim users-create --help
```

### omni schedules

Manage delivery [schedules](/api/schedules) and [recipients](/api/schedule-recipients).

```bash wrap theme={null}
omni schedules <command>
```

| Command              | Description                 |
| -------------------- | --------------------------- |
| `list`               | List schedules              |
| `create`             | Create a schedule           |
| `get`                | Get a schedule              |
| `update`             | Update a schedule           |
| `delete`             | Delete a schedule           |
| `recipients-get`     | Get schedule recipients     |
| `add-recipients`     | Add schedule recipients     |
| `remove-recipients`  | Remove schedule recipients  |
| `pause`              | Pause a schedule            |
| `resume`             | Resume a schedule           |
| `trigger`            | Trigger a schedule          |
| `transfer-ownership` | Transfer schedule ownership |

```bash wrap theme={null}
# Pause a schedule
omni schedules pause <schedule-id>

# View help for transfer-ownership command, including arguments and flag details
omni schedules transfer-ownership --help
```

### omni unstable

Preview commands that may change without notice.

```bash wrap theme={null}
omni unstable <command>
```

| Command            | Description       |
| ------------------ | ----------------- |
| `documents-export` | Export a document |
| `documents-import` | Import a document |

```bash wrap theme={null}
# View help for documents-export command, including arguments and flag details
omni unstable documents-export --help
```

### omni uploads

Manage CSV and Excel file uploads. See the [Uploads API documentation](/api/uploads) for more information.

```bash wrap theme={null}
omni uploads <command>
```

| Command  | Description       |
| -------- | ----------------- |
| `list`   | List uploads      |
| `create` | Upload a CSV file |
| `delete` | Delete an upload  |

```bash wrap theme={null}
# List uploads with 'country' in file name
omni uploads list --searchterm "country"

# View help for create command, including arguments and flag details
omni uploads create --help
```

### omni user-attributes

View user attribute definitions. See the [User attributes API documentation](/api/user-attributes) for more information.

```bash wrap theme={null}
omni user-attributes list
```

| Command | Description                         |
| ------- | ----------------------------------- |
| `list`  | List all user attribute definitions |

### omni users

Manage [user](/api/user-model-roles) and [group model roles](/api/user-group-model-roles), and [email-only users](/api/users/list-email-only-users).

```bash wrap theme={null}
omni users <command>
```

| Command                    | Description                         |
| -------------------------- | ----------------------------------- |
| `get-model-roles`          | Get user model roles                |
| `assign-model-role`        | Assign a model role to a user       |
| `list-email-only`          | List email-only users               |
| `create-email-only`        | Create or update an email-only user |
| `create-email-only-bulk`   | Create email-only users in bulk     |
| `groups-get-model-roles`   | Get user group model roles          |
| `groups-assign-model-role` | Assign a model role to a user group |

```bash wrap theme={null}
# Create an email-only user
omni users create-email-only --body '{"email":"blob.ross@blobsrus.com"}'

# View help for groups-assign-model-role command, including arguments and flag details
omni users groups-assign-model-role --help
```
