> 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/concepts/interfaces/command-line-interface.md).

# CLI

DataOS CLI (`dataos-ctl`) is a command-line tool for interacting with DataOS. Use it to create, manage, and delete DataOS resources directly from your terminal. It works on macOS, Linux, and Windows.

***

## Installation

Visit your DataOS instance home page, for example, `https://training-007.dataos.cloud/` . Then log in, and follow the **Setup DataOS CLI** instructions shown on the landing page.

{% @arcade/embed url="<https://app.arcade.software/share/4lD4oun5g7ChGaJtCBjH>" flowId="4lD4oun5g7ChGaJtCBjH" %}

***

## Verify Installation

Once installed, confirm it is working:

```bash
dataos-ctl version
```

Or see all available commands:

```bash
dataos-ctl --help
```

***

## Initialize the CLI

### Prerequisites

* Access to a DataOS tenant. If you don't have one, contact your DataOS administrator.

### Run the init command

```bash
dataos-ctl init
```

You will be prompted for three inputs:

* A **context name**: any label you choose to identify this DataOS instance locally
* The **Fully Qualified Domain Name** of your DataOS instance (e.g., `training-007.dataos.cloud`)
* Your **tenant identifier**

```bash
INFO[0000] The DataOS® is not initialized, do you want to proceed with initialization? (Y,n)
->Y
INFO[0005] Please enter a name for the current DataOS® Context?
->my-context
INFO[0012] Please enter the Fully Qualified Domain Name of the DataOS® instance?
->training-007.dataos.cloud
INFO[0037] Please enter the Tenant Identifier to use for the DataOS® instance?
->engineering
INFO[0041] 🚀 initialization...complete
```

{% hint style="warning" %}
Enter only the domain name, without `https://`. For example, use `training-007.dataos.cloud`, not `https://training-007.dataos.cloud`.
{% endhint %}

{% hint style="info" %}
Run `dataos-ctl init --help` to see all available options.
{% endhint %}

### Log in

After initialization, log in to your account:

```bash
dataos-ctl login
```

***

## Most Used Commands

| Command                                          | What it does                                     |
| ------------------------------------------------ | ------------------------------------------------ |
| `dataos-ctl resource apply -f <manifest.yaml>`   | Create or update a resource from a manifest file |
| `dataos-ctl resource get -t <type>`              | List resources of a given type                   |
| `dataos-ctl resource delete -t <type> -n <name>` | Delete a specific resource                       |
| `dataos-ctl user apikey create`                  | Generate a new API key                           |
| `dataos-ctl context list`                        | List all initialized DataOS contexts             |
| `dataos-ctl context select <name>`               | Switch to a different DataOS context             |

To explore the full CLI, run:

```bash
dataos-ctl --help
dataos-ctl <command> --help
```


---

# 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/concepts/interfaces/command-line-interface.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.
