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 withcurl --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, includetar.exeby default. Check withtar --versionin 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>' | shOutput: 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:
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:
If you prefer the Windows interface, use the following steps to add PATH using Windows settings:
Press
Win + R, entersysdm.cpl, then press Enter.Select Advanced → Environment Variables.
Under User variables, select Path → Edit → New.
Add
C:\Users\<your-username>\AppData\Local\Programs\dataos-cli\bin.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:
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.
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.
For the full CLI reference, see References → Interfaces → Command Line Interface.
Troubleshooting
Last updated
Was this helpful?