Skip to main content
The Baseten CLI deploys and operates your models: baseten model push packages a model directory and deploys it, baseten model push --watch runs a live-patch development loop, and the rest of the command tree manages deployments, environments, autoscaling schedules, and replicas alongside organizations, API keys, and secrets. It also calls models and the raw Baseten API. All commands except the baseten truss passthrough support --output json and --jq filtering, so the same command works interactively and in a script or CI job. Install with Homebrew. The Truss CLI authors model code and runs the Chains, Training, and Loops workflows: config.yaml and model.py are Truss artifacts, and truss chains, truss train, and truss loops cover multi-step pipelines, training jobs, and Loops runs. Install with uvx truss or pip install truss. The Baseten Switch CLI Beta routes Claude Code and Codex CLI to Model APIs through a local gateway, and can install Pi’s direct Baseten provider. See Baseten Switch CLI. Truss and the Baseten CLI are open source and authenticate against the same Baseten backend. Switch authenticates with the current Baseten CLI profile.

Which one do I use?

Overlapping commands

A few commands exist in both CLIs:

Use both together

baseten truss runs truss through uv tool run and forwards this CLI’s credentials, so baseten truss push works as a synonym for truss push without a separate truss login. Truss commands that import your own Python code, such as chains push, need --truss-executable pointed at a truss installed in your project, because uv tool run uses an isolated environment that can’t see your dependencies. The baseten train and baseten loops command trees manage training jobs and Loops runs natively, and delegate to truss for the commands that need a Python config file (train push, train init, loops checkpoint deploy).

Next steps

Deploy a model

Build and deploy your first model with the Baseten CLI.

Manage your workspace

Use the Baseten CLI for orgs, deployments, and automation.

Build a Chain

Create multi-step inference pipelines with truss chains.

Wire CI/CD

Use baseten model push in GitHub Actions and other pipelines.

Baseten Switch CLI

Route Claude Code, Codex CLI, or Pi to Model APIs.