Skip to main content
The Baseten CLI manages your Baseten workspace from the command line: organizations, API keys, secrets, deployment lifecycle (promote, activate, terminate replicas), and raw API access. Every Baseten-native command supports --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.
For model authoring workflows (writing 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.
Download and extract baseten into /usr/local/bin:
curl -sL https://github.com/basetenlabs/baseten-cli/releases/download/v0.1.0/baseten_0.1.0_darwin_arm64.tar.gz \
  | sudo tar xz -C /usr/local/bin baseten
For other platforms or a specific version, download an archive from GitHub releases and move baseten onto your PATH. Verify the install:
baseten version

Authenticate

baseten auth login --web
This opens a browser for the OAuth device flow. To paste an API key from stdin instead, use --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 EXPR to extract one field.
  • jsonl: one JSON record per line. Used by commands that stream results.
  • none: suppress stdout entirely.
baseten model push --jq '.predict_url'
--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:
FlagDescription
--remote-urlBaseten remote URL. Overrides the BASETEN_REMOTE_URL environment variable. Defaults to https://app.baseten.co.
--output, -oOutput format: text, json, jsonl, or none. See Output and filtering.
--jq, -qFilter JSON output with a jq expression. See Output and filtering.
--verbose, -vEnable verbose logging.

Command groups

The baseten CLI organizes commands by resource:
baseten [OPTIONS] COMMAND [SUBCOMMAND] [ARGS]...
Start from the resource you need to manage.
Command groupUse it to
baseten apiMake raw management or inference API requests.
baseten authLog in, log out, switch accounts, and inspect the active account.
baseten modelPush, list, fetch, predict against, and delete models.
baseten model deploymentActivate, configure, download, promote, delete, fetch, list, and stream deployment logs.
baseten model deployment replicaTerminate an individual deployment replica.
baseten model environmentActivate, deactivate, fetch, and list model environments.
baseten org api-keyList, create, and delete organization API keys.
baseten org billingInspect organization billing usage.
baseten org secretList, set, and delete organization secrets.
baseten trussForward commands to the truss binary on your PATH.
baseten versionPrint 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.