Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.baseten.co/llms.txt

Use this file to discover all available pages before exploring further.

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.) 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

The Baseten CLI is a single Go binary.
brew install basetenlabs/tap/baseten
Or download a release archive from GitHub releases. 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.

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.