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

CLI

Use the CLI to manage DataOS Resources.

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.

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.

Installation

Visit your DataOS instance home page, for example https://dataossanbox.instance.dataos.cloud/. Log in, then follow the Setup DataOS CLI instructions shown 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

A successful run downloads the CLI package for your OS and architecture, verifies its checksum, and prints the line you need to add to your PATH:

Downloading dataos-ctl-darwin-amd64.tar.gz ...
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 so the change takes effect.

In Setup DataOS CLI, download the pre-built Windows package. Its name follows this pattern:

dataos-cli--aa.bb.cc-windows-amd64.tar.gz

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

1. Set the destination and archive paths

Replace the archive path with the actual location of your downloaded .tar.gz file:

$dest = "$env:LOCALAPPDATA\Programs\dataos-cli\bin"
$archive = "<path-to-downloaded-file>\dataos-cli--aa.bb.cc-windows-amd64.tar.gz"

2. Create the installation directory

New-Item -ItemType Directory -Path $dest -Force | Out-Null

3. Extract dataos-ctl.exe

Windows versions that include tar can run:

tar -xzf $archive -C $dest --strip-components=1 "windows-amd64/dataos-ctl.exe"

Then verify that the executable was extracted:

Get-ChildItem $dest

You should see dataos-ctl.exe listed.

4. Add the CLI directory to the user PATH

$dir = "$env:LOCALAPPDATA\Programs\dataos-cli\bin"
$old = [Environment]::GetEnvironmentVariable('Path', 'User')

if ($old -split ';' -contains $dir) {
    "Already added."
} else {
    [Environment]::SetEnvironmentVariable('Path', ($old.TrimEnd(';') + ';' + $dir), 'User')
    "Added: $dir"
}

The command prints Added: ... the first time, and Already added. on later runs.

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

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

The PATH change applies only to newly opened terminals. Close and reopen your terminal (PowerShell or Command Prompt), and fully restart VS Code, Cursor, or any other IDE, before using its integrated terminal.

Prefer the Windows interface over the command line? Add the same path manually:

  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.

Verify the installation

Confirm the binary is installed and on your PATH:

A successful installation prints the list of available commands:

Initialize the CLI

dataos-ctl init

Running init creates a local tenant context: a named profile, stored on your machine, that records the DataOS instance domain and tenant identifier the CLI should talk to. Run it once per DataOS instance, before using any other command.

Flag
Description
Type
Required

--flag-init

Initialize a new tenant context from flags instead of interactive prompts.

boolean

No

--context-name

Local name to identify this DataOS® context.

string

With --flag-init

--fully-qualified-domain-name

Fully qualified domain name of the DataOS® instance, without https://.

string

With --flag-init

--tenant-identifier

Tenant identifier in the DataOS® instance to associate with this context.

string

With --flag-init

--setup-config

Set up the config file and other static files in the home directory, without creating a tenant context.

boolean

No

-h, --help

Display help for this command.

boolean

No

Without --flag-init, the command walks you through the same three values interactively:

Adding another tenant context. Run dataos-ctl init again any time you need to connect the same CLI to another instance, for example my-tenant2 alongside my-tenant. Because a tenant context already exists, the CLI first asks whether to add a new one, then reuses the standard initialization prompt to collect the name, domain, and tenant identifier for it:

That second prompt is not an error. It reuses the same initialization message shown during first-time setup. Answer Y again, and the CLI continues asking for the new tenant's name, domain, and tenant identifier.

dataos-ctl tenant

Manage the tenant contexts stored locally on your machine: list which ones are configured, and switch the active one.

tenant accepts the aliases context, tnt, tent, tents, tt, and tenants, so dataos-ctl tenant list and dataos-ctl context list are equivalent.

dataos-ctl tenant list: list every tenant context configured locally, and show which one is active.

The * marks the active context. The 🔗 line shows the active context's instance FQDN, and the ⛺️ line shows its tenant identifier. list accepts the alias ls.

dataos-ctl tenant select: switch the active tenant context to a different, already-configured context.

Flag
Description
Type
Required

-n, --name

Name of the tenant context to select.

string

Yes

-h, --help

Display help for this command.

boolean

No

Every command that follows in this page (login, health, version, resource, and so on) acts on whichever tenant context is currently active. Run tenant select first if you need to act on a different context.

Log in

dataos-ctl login

Authenticate the CLI against the currently active tenant context.

Flag
Description
Type
Required

-h, --help

Display help for this command.

boolean

No

Running it opens a browser window for authentication. Complete the sign-in flow there, then return to your terminal.

Check CLI and instance health

dataos-ctl health

Check whether the CLI can reach and authenticate against the currently selected DataOS® instance. Use it as the first step when diagnosing connection or authentication issues.

Flag
Description
Type
Required

-h, --help

Display help for this command.

boolean

No

DataOS® CLI...OK confirms the CLI binary is functioning. DataOS® CK...OK confirms the CLI reached the instance's control kernel.

dataos-ctl version

Print the version of the CLI and, optionally, of the DataOS® instance it is connected to.

Flag
Description
Type
Required

-a, --all

Show both the CLI version and the server (instance) version.

boolean

No

-s, --serverVersion

Show only the server (instance) version.

boolean

No

-d, --disableLogo

Suppress the ASCII logo banner.

boolean

No

-o, --ogLogo

Show the original logo variant.

boolean

No

-h, --help

Display help for this command.

boolean

No

Once the CLI is initialized, plain dataos-ctl version (without --all or --serverVersion) prints only the CLI's own version and needs no live connection to the instance. Add --all or --serverVersion to also query the instance for its version.


Quick reference

Command
Description

dataos-ctl --help

List available commands, and confirm the CLI is installed

dataos-ctl init

Initializes the DataOS® CLI

dataos-ctl version

Print the version number of DataOS®

dataos-ctl login

Login to the DataOS®

dataos-ctl tenant list

List DataOS® tenants

dataos-ctl tenant select

Select DataOS® Tenant

dataos-ctl health

Health of DataOS®

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 (full reference)

dataos-ctl depot types get

Get DataOS® depot type definitions

dataos-ctl lakehouse table list --name <lakehouse> --namespace <ns>

List tables in a Lakehouse namespace (full reference)

dataos-ctl user apikey create

Generate a new API key (full reference)

dataos-ctl doc

Generate markdown documentation for every command

dataos-ctl tui

Open the DataOS® terminal UI

The sections above cover --help, init, tenant, login, health, and version in full, in the order you would typically run them when setting up the CLI for the first time. What follows covers depot, doc, and tui in full. The resource, lakehouse, and user command groups are large enough to have their own reference pages, linked from the sections below.


Manage resources

The resource command group is the command you'll use most: applying manifests, listing Resources, checking runtime status and logs, and controlling runnable Resources. See the Resource commands reference for the full command set.

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 resource log -t <type> -n <name>

Get logs for a Resource

dataos-ctl resource runtime run -t <type> -n <name>

Trigger a run of a runnable Resource

dataos-ctl depot types get

A Depot defines how DataOS® connects to an external data source. Use depot types get to see which Depot types the instance supports, and what configuration each type requires.

Flag
Description
Type
Required

-n, --name

Name of the Depot type to get.

string

No

-d, --details

Return the full type definition, including secret and spec schemas.

boolean

No

-f, --manifestFile

Path to a manifest file to resolve the query from.

string

No

-h, --help

Display help for this command.

boolean

No

get accepts the aliases ls and list. Once a Depot manifest is created, apply it with dataos-ctl resource apply -f <depot.yaml>.

Lakehouse tables

A lakehouse-type Depot backs a Lakehouse Resource, which stores Iceberg tables. Managing namespaces, tables, branches, schema, partitions, properties, and snapshots involves 38 commands. See the dedicated Lakehouse commands reference.


Manage users

Creating users, issuing API keys, and assigning role tags involves 12 commands. See the dedicated User commands reference.

Command
What it does

dataos-ctl user get --all

List every user in the tenant

dataos-ctl user apikey create

Generate a new API key

dataos-ctl user tag add --id <user-id> --tags <role-tag>

Assign a role to a user


Utilities

dataos-ctl doc

Generate Markdown documentation for every command in the dataos-ctl CLI, based on the version currently installed.

Flag
Description
Type
Required

-h, --help

Display help for this command.

boolean

No

dataos-ctl tui

Launch an interactive, full-screen terminal UI for browsing DataOS® resources, as an alternative to issuing individual dataos-ctl commands.

Flag
Description
Type
Required

-h, --help

Display help for this command.

boolean

No

tui requires an interactive terminal (TTY). Running it in a non-interactive shell or CI pipeline produces no usable output.


Troubleshooting

Checksum mismatch

The download is corrupted. Re-download the package for your OS and architecture, then 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, without the https:// prefix.


Last updated

Was this helpful?