--output json and --jq filtering, so anything you do interactively is also scriptable. (The baseten truss passthrough forwards to the truss binary and is the one exception.)
The Baseten CLI is in private beta and under active development. If you don’t already have access, ask your Baseten contact. Commands, flags, output schemas, and the install path may change before general availability.
model.py, iterating with truss watch, packaging Chains and Training jobs), use the Truss CLI. The two CLIs are designed to coexist; the CLI router page explains when to reach for each.
Install
Install the Baseten CLI for your platform with the one-liner below.- macOS (arm64)
- Linux (x64)
- Windows (x64)
Download and extract
baseten into /usr/local/bin:baseten onto your PATH.
Verify the install:
Authenticate
--with-api-key. Switch between accounts with baseten auth switch; check the active account with baseten auth status. See baseten auth login for the full options.
Credentials are stored in your OS keyring (macOS Keychain, GNOME Keyring, Windows Credential Manager). On systems with no keyring available (a headless Linux container, for example), the CLI falls back to plaintext storage and prints a warning.
Output and filtering
Every Baseten-native command supports four output formats via--output:
text(default): human-readable narrative.json: a single JSON document. Pair with--jq EXPRto extract one field.jsonl: one JSON record per line. Used by commands that stream results.none: suppress stdout entirely.
--jq implies --output json (or jsonl for streamed commands), so a single flag turns any command into a clean value for the next stage of your pipeline.
Global flags
These flags work on every Baseten-native command:| Flag | Description |
|---|---|
--remote-url | Baseten remote URL. Overrides the BASETEN_REMOTE_URL environment variable. Defaults to https://app.baseten.co. |
--output, -o | Output format: text, json, jsonl, or none. See Output and filtering. |
--jq, -q | Filter JSON output with a jq expression. See Output and filtering. |
--verbose, -v | Enable verbose logging. |
Command groups
Thebaseten CLI organizes commands by resource:
| Command group | Use it to |
|---|---|
baseten api | Make raw management or inference API requests. |
baseten auth | Log in, log out, switch accounts, and inspect the active account. |
baseten model | Push, list, fetch, predict against, and delete models. |
baseten model deployment | Activate, configure, download, promote, delete, fetch, list, and stream deployment logs. |
baseten model deployment replica | Terminate an individual deployment replica. |
baseten model environment | Activate, deactivate, fetch, and list model environments. |
baseten org api-key | List, create, and delete organization API keys. |
baseten org billing | Inspect organization billing usage. |
baseten org secret | List, set, and delete organization secrets. |
baseten truss | Forward commands to the truss binary on your PATH. |
baseten version | Print Baseten CLI version information. |
Next steps
Deploy from CI
Use
baseten model push from GitHub Actions and other CI runners.Compare with Truss
See when to reach for
baseten vs truss for each task.