> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataerai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI overview

> The Dataerai command-line client authenticates with Dataerai and moves data — upload, download, and manage metadata — with high-throughput, resumable transfers.

The **`dataerai`** command-line client lets you authenticate and manage assets — **download**, **upload**, and **metadata** — from a terminal or a script. It's ideal for large or bulk transfers, pipelines, and browserless environments like HPC clusters. The same binary also powers the transfers behind the [desktop app](/data/desktop-and-cli).

## Install

Install with `pip` — this bundles the binary for your platform and puts the `dataerai` command on your `PATH`:

```bash theme={null}
pip install dataerai-cli
```

<Note>`dataerai-cli` targets production; the `dataerai-cli-beta` / `dataerai-cli-dev` variants default to those instances. Override any of them with `DATAERAI_SERVER`.</Note>

Or build the binary from source in the `cli/` directory:

```bash theme={null}
make build      # produces ./dataerai
make install    # installs to your Go bin directory ($GOPATH/bin)
```

Make sure the install location (or the built `./dataerai`) is on your `PATH`.

## Commands

```
dataerai <command> [flags]

Commands:
  auth      Manage authentication credentials
  download  Download asset files to a local directory
  upload    Upload a file and create/upsert an asset
  metadata  Get or update asset metadata fields
  agent     Run transfers routed to this machine from the web app
```

See [Authenticate](/cli/authenticate) and [Commands](/cli/commands). To run web-app transfers on your own machine, see [Run transfers on your own machine](/cli/agent).

## Point the CLI at your server

The CLI talks to a specific Dataerai deployment. Set it with the `--server` flag or the `DATAERAI_SERVER` environment variable, using your deployment's URL:

```bash theme={null}
export DATAERAI_SERVER="https://<your-server>"
```

The server URL saved at `dataerai auth login` takes precedence over `DATAERAI_SERVER`, so once you log in you usually don't need to pass `--server` again.

## Credentials

After you log in, your credentials (access and refresh tokens, expiry, email, and server URL) are stored securely in your operating system's keychain. On a machine with no keychain available — such as a headless server or CI runner — they fall back to a file at `~/.config/dataerai/credentials` with owner-only permissions.

<Warning>
  Whether in the keychain or the fallback file, these credentials grant access to your Dataerai account — treat them like any other secret.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Authenticate" icon="key-round" href="/cli/authenticate">
    Log in from a browser or with a device code.
  </Card>

  <Card title="Commands" icon="terminal" href="/cli/commands">
    Upload, download, and manage metadata.
  </Card>
</CardGroup>
