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. For a task-oriented guide to the deployment commands (scale, pause, promote, clean up, logs), see Manage deployments.

Install

Install with Homebrew on macOS or Linux:
Upgrade later with brew update && brew upgrade baseten.
Optionally run brew trust basetenlabs/baseten before installing to limit how much unofficial tap code Homebrew evaluates by default. See tap trust in the Homebrew docs.
Download and extract the baseten binary for your platform, then place it on your PATH.
Download and extract baseten into /usr/local/bin:
For other platforms or a specific version, download an archive from GitHub releases and move baseten onto your PATH.
Verify the install:

Authenticate

Log in interactively:
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.
--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:

Command groups

The baseten CLI organizes commands by resource:
Start from the resource you need to manage.

Use with AI agents

If you drive the Baseten CLI through a coding agent (Claude Code, Cursor, Codex), add this snippet to your project’s AGENTS.md or CLAUDE.md. The CLI documents itself through --help, so the snippet only covers what an agent can’t discover on its own: how to install, how to authenticate, and how to ask for machine-readable output.
AGENTS.md
The CLI is one piece of the agent toolkit: for the Baseten skill and the MCP servers that let your agent operate a workspace and search these docs, see AI tools.

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.