> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/operate/v1/cli.md).

# CLI command references

The **DataOS CLI (`dataos-ctl`)** is the primary tool for Instance- and Tenant-level administration. This page covers the commands used by the two administrative roles:

* **Operator**: provisions the Instance and creates and manages Tenants.
* **Tenant Admin**: manages a Tenant day to day.

Use this page to find the commands for each role, then see the full command reference for flags, output, and examples.

{% hint style="info" %}
This is a role-scoped map, not the complete command set. For every flag, alias, and sample output, follow the reference links to the [CLI reference](https://v2.dataos.info/references/interfaces/command-line-interface) in References.
{% endhint %}

## Before you begin

Both roles need the CLI installed and pointed at the Instance before running anything below.

* **Install and verify**: see [CLI setup](https://v2.dataos.info/build/get-started/prerequisites/cli-setup), or the [Installation](https://v2.dataos.info/references/interfaces/command-line-interface#installation) section of the reference.
* **Create a context and log in**: `dataos-ctl init` creates a local context (Instance FQDN + Tenant), and `dataos-ctl login` authenticates against it.

| Command                                     | What it does                                                       |
| ------------------------------------------- | ------------------------------------------------------------------ |
| `dataos-ctl init`                           | Create a local context pointing at an Instance and Tenant          |
| `dataos-ctl login`                          | Authenticate the CLI against the active context                    |
| `dataos-ctl tenant list`                    | List the contexts configured locally and show the active one       |
| `dataos-ctl tenant select --name <context>` | Switch the active context                                          |
| `dataos-ctl health`                         | Check that the CLI can reach and authenticate against the Instance |
| `dataos-ctl version --all`                  | Print CLI and Instance versions                                    |

→ [Full reference: init, login, tenant, health, version](https://v2.dataos.info/references/interfaces/command-line-interface)

***

## Operator commands

An Operator works at the Instance level: provisioning the Data Plane, standing up Tenants, and deploying the mandatory Stacks and Secrets. The provisioning runbooks below are the authoritative, step-by-step source; the tables here are the command shorthand.

### Provision the Data Plane

Data Plane provisioning uses the `domain` command group against the `system` Tenant. These commands are Operator-only and are documented in the per-cloud runbooks rather than the general CLI reference.

| Command                                           | What it does                                        |
| ------------------------------------------------- | --------------------------------------------------- |
| `dataos-ctl domain apply -f <dataplane.yaml>`     | Install the Data Plane on the target cluster        |
| `dataos-ctl domain get`                           | List the Domains (Data Planes) you created          |
| `dataos-ctl domain get -a`                        | List all Domains, including those created by others |
| `dataos-ctl domain get -t dataplane -n <name> -d` | Show detailed status of one Data Plane              |
| `dataos-ctl domain task run`                      | Run a provisioning task against a Data Plane        |

→ Runbooks: [Provision Data Plane](/operate/v1/dataos-operator/provision-data-plane.md) · [AWS](/operate/v1/dataos-operator/provision-data-plane/aws.md) · [Azure](/operate/v1/dataos-operator/provision-data-plane/azure.md)

### Deploy Stacks and mandatory Secrets

A Stack is a Resource type — there is no separate `stack` command group. Stacks and mandatory Secrets are applied and inspected with the ordinary `resource apply` / `resource get` commands, the same as any other Resource. The one Stack-specific detail is `--disable-interpolation`, which stops Instance-level placeholders in the artifact from being expanded at apply time.

| Command                                                             | What it does                             |
| ------------------------------------------------------------------- | ---------------------------------------- |
| `dataos-ctl resource apply -f <stack.yaml> --disable-interpolation` | Deploy a Stack manifest                  |
| `dataos-ctl resource apply -f <secret.yaml>`                        | Create a mandatory Secret                |
| `dataos-ctl resource get -t stack -a`                               | List Stacks and confirm they are healthy |
| `dataos-ctl resource get -t secret`                                 | Verify the Secrets exist                 |

{% hint style="info" %}
Use `--disable-interpolation` when the manifest contains Instance-level `$ENV` / `${ENV}` placeholders that must not be resolved at apply time. Pass runtime values (Tenant, Compute, keys) as environment variables on the same command instead — see [Deploy Stacks](/operate/v1/dataos-operator/design-tenants/deploy-stacks.md).
{% endhint %}

→ Runbooks: [Deploy Stacks](/operate/v1/dataos-operator/design-tenants/deploy-stacks.md) · [Create mandatory Secrets](/operate/v1/dataos-operator/design-tenants/create-mandatory-secrets.md) → [Full reference: resource commands](https://v2.dataos.info/references/interfaces/command-line-interface/resource)

***

## Tenant Admin commands

A Tenant Admin runs a single Tenant: provisioning Compute, connecting data sources, managing users and roles, and watching Tenant health. All of this is `dataos-ctl` work.

### Compute, Depots, and Secrets

Compute, Depots, and Secrets are all Resources, so they share the `resource apply` / `resource get` pattern.

| Command                                       | What it does             |
| --------------------------------------------- | ------------------------ |
| `dataos-ctl resource apply -f <compute.yaml>` | Create or update Compute |
| `dataos-ctl resource apply -f <secret.yaml>`  | Create a                 |

| Command                                                              | What it does                  |
| -------------------------------------------------------------------- | ----------------------------- |
| `dataos-ctl user get --all`                                          | List every user in the Tenant |
| `dataos-ctl user create --name <name> --email <email> --type person` | Create a user                 |
| `dataos-ctl user tag add --id <user-id> --tags roles:id:<role>`      | Assign a role to a user       |
| `dataos-ctl user tag delete --id <user-id> --tags roles:id:<role>`   | Remove a role from a user     |
| `dataos-ctl user apikey create --id <user-id> --name <key-name>`     | Issue an API key for a user   |
| `dataos-ctl user changes get --id <user-id>`                         | Review a user's audit history |

→ Runbook: [Manage access](/operate/v1/tenant-admin/governance.md) → [Full reference: user commands](https://v2.dataos.info/references/interfaces/command-line-interface/user)

### Monitor Tenant health

| Command                                           | What it does                           |
| ------------------------------------------------- | -------------------------------------- |
| `dataos-ctl resource get -t compute`              | Check Compute health across the Tenant |
| `dataos-ctl resource get -t compute -n <name> -d` | Detailed status of one Compute         |
| `dataos-ctl resource get -t workflow -a`          | List Workflows across the Tenant       |

→ Runbook: [Monitoring](/operate/v1/tenant-admin/monitoring.md)

***

## Full command reference

The tables above are role shorthand. The complete command set — every flag, alias, and sample output — lives in References:

* [CLI overview](https://v2.dataos.info/references/interfaces/command-line-interface): install, connect, `version`, `init`, `login`, `tenant`, `health`, `depot`, `doc`, `tui`.
* [Resource commands](https://v2.dataos.info/references/interfaces/command-line-interface/resource): apply, inspect, run, and delete any Resource type.
* [User commands](https://v2.dataos.info/references/interfaces/command-line-interface/user): users, API keys, and role tags.
* [Lakehouse commands](https://v2.dataos.info/references/interfaces/command-line-interface/lakehouse): Iceberg tables, branches, schema, and snapshots (Data Admin territory).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/operate/v1/cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
