Skip to main content
The Baseten CLI manages your Baseten workspace from the command line: models, deployments, environments, secrets, API keys, and raw API access. Every Baseten-native command supports --output json and --jq filtering, so anything you do interactively is scriptable. The CLI is open source on GitHub, where you can browse the code, watch for new releases, and file issues.
The Baseten CLI is in beta and under active development. Commands, flags, output schemas, and the install path may change before general availability.
For authoring Chains, Training jobs, and Loops, use the Truss CLI. The CLI overview explains when to reach for each.

Install

Install with Homebrew on macOS or Linux:
brew tap basetenlabs/baseten
brew trust basetenlabs/baseten
brew install baseten
Upgrade later with brew upgrade baseten.
Download and extract the baseten binary for your platform, then place it on your PATH.
Download and extract baseten into /usr/local/bin:
curl -sL https://github.com/basetenlabs/baseten-cli/releases/download/v0.2.0/baseten_0.2.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

Log in interactively:
baseten auth login
For automation, set BASETEN_API_KEY in the environment instead. See baseten auth for browser login, reading a key from stdin, switching accounts, and credential storage.

Output and filtering

Every Baseten-native command supports four output formats through --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
--profileUse a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile.
--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, watch, list, describe, predict against, and delete models.
baseten model deploymentActivate, configure, download, promote, delete, describe, list, stream logs from, and fetch metrics for deployments.
baseten model deployment replicaTerminate an individual deployment replica.
baseten model environmentActivate, deactivate, describe, and list model environments.
baseten model-apiList and inspect Baseten Model APIs.
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.