For the complete documentation index, see llms.txt. This page is also available as Markdown.

CLI setup

Set up the DataOS CLI

The DataOS CLI is a command-line tool for interacting with DataOS. It provides a consistent experience on macOS, Linux, and Windows.

Prerequisites

  • curl (macOS and Linux). Check with curl --version. If it is missing, get it from curl.se or your package manager.

  • tar (Windows). Windows 10 version 1803 or later, and Windows 11, include tar.exe by default. Check with tar --version in PowerShell or Command Prompt. If it is missing, install a tar-compatible tool such as 7-Zip and use it to extract the archive instead, or upgrade Windows.

  • Access to a DataOS instance. If you do not have it, ask your DataOS administrator to invite you.

1. Install the CLI

Open your DataOS instance home page, for example https://dataossanbox.instance.dataos.cloud/, log in, and follow the Setup DataOS CLI instructions on the landing page.

Copy the install command from the Setup DataOS CLI section. It pipes the installer through your bearer token:

curl --request GET 'https://<instance-url>/home/dataos/cli-dev-v2/install.sh' \
  --header 'Authorization: Bearer <your-token>' | sh

Output: A successful installation prints output similar to the following:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4326  100  4326    0     0   2801      0  0:00:01  0:00:01 --:--:--  2800
Downloading dataos-ctl-darwin-amd64.tar.gz ... 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 45.5M  100 45.5M    0     0  4780k      0  0:00:09  0:00:09 --:--:-- 9770k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    97  100    97    0     0     70      0  0:00:01  0:00:01 --:--:--    70
dataos-ctl-darwin-amd64.tar.gz download complete!
Checksum dataos-ctl-darwin-amd64.tar.gz: OK

Add the dataos-ctl to your path with:
export PATH=$PATH:$HOME/.dataos/v2/bin 

Add that export line to your shell startup file (~/.zshrc for Zsh, ~/.bash_profile for Bash), then open a new terminal and verify the installation:

The command prints the available DataOS CLI commands:

Use this method on Windows.

First, open your DataOS instance home page and sign in. In Setup DataOS CLI, download the pre-built Windows package. Its name follows this pattern (sample file name):

Use either PowerShell or Command Prompt to extract the package and add it to your PATH.

Open Windows PowerShell, then run the following commands. Replace the $archive value with the complete path to your downloaded file. For example: $archive = "C:\Users\John Doe\Downloads\dataos-cli--01.23.45-windows-amd64.tar.gz".

Then run the following commands. Windows versions that include tar can run:

The command lists dataos-ctl.exe after extraction.

Now, to add the CLI to PATH, run the following command in the same PowerShell window:

The command prints Added: ... or Already added..

Open Command Prompt, then use this sequence.

1. Set the destination and archive paths. Replace the archive path with the actual location of your downloaded .tar.gz file:

2. Create the installation directory:

If the folder already exists, mkdir prints an error you can ignore.

3. Extract dataos-ctl.exe. Windows versions that include tar can run:

Then verify that the executable was extracted:

You should see dataos-ctl.exe listed.

4. Add the CLI directory to the user PATH. For Command Prompt, use:

You should get a message similar to SUCCESS: Specified value was saved.

Once it's done, close your terminal completely. Open a new PowerShell or Command Prompt window, then run:

The command prints the available DataOS CLI commands:

The PATH change applies only to newly opened terminals. Restart VS Code, Cursor, or any other IDE completely before using its integrated terminal.

If you prefer the Windows interface, use the following steps to add PATH using Windows settings:

  1. Press Win + R, enter sysdm.cpl, then press Enter.

  2. Select Advanced → Environment Variables.

  3. Under User variables, select Path → Edit → New.

  4. Add C:\Users\<your-username>\AppData\Local\Programs\dataos-cli\bin.

  5. Select OK in each window, then open a new terminal.

2. Initialize the DataOS Tenant

Connect the CLI to your instance:

The CLI runs a short interactive prompt. You give it a tenant context name, the instance domain, and your tenant identifier:

Run dataos-ctl init again anytime to add another tenant context (for example, staging and production). When you do, the CLI first asks whether to add a new context, then walks you through the same name/domain/tenant-identifier prompts shown below:

The second prompt reuses the standard initialization message. Answer Y again to continue adding the new context.

To switch between tenant contexts, use:

To list all configured tenant contexts, run dataos-ctl tenant list. The active context is marked with *:

To explore tenant-related commands, run dataos-ctl tenant --help.

tenant accepts the following aliases, so dataos-ctl context list, dataos-ctl tnt list, and dataos-ctl tenant list are equivalent:

3. Log in

This opens a browser for authentication. Complete the flow and return to your terminal.

4. Check CLI and instance health

health confirms the CLI can reach your tenant:

To browse commands, run dataos-ctl --help. For help on a specific command, run dataos-ctl [command] --help.

Troubleshooting

Checksum mismatch

The download is corrupted. Re-download the package for your OS and architecture and retry.

command not found after installing

Confirm the CLI's install directory is on your PATH. On macOS and Linux, that is $HOME/.dataos/v2/bin. On Windows, that is $env:LOCALAPPDATA\Programs\dataos-cli\bin.

If the directory is missing from the output, add the matching export PATH=... line to your shell startup file (~/.zshrc for Zsh, ~/.bash_profile for Bash), then open a new terminal.

Login error: duplicate https:// in the URL

You included https:// when entering the domain during init. Re-run dataos-ctl init and enter the domain only.

Last updated

Was this helpful?