truss CLI is your primary interface for everything from packaging and
deploying AI models to building and orchestrating multi-step chains to launching and
managing training jobs.
Use the following commands to manage your models, chains, and training jobs:
- Models: Package and deploy individual model servers.
- Chains: Build and deploy multi-step inference pipelines.
- Training: Launch and manage training jobs.
Install the Truss CLI
Install the Truss CLI
To use Truss, install a recent Truss version and ensure pydantic is v2:
To deploy Truss remotely, you also need a
Baseten account.
It is handy to export your API key to the current shell session or permanently in your
Help for setting up a clean development environment
Help for setting up a clean development environment
Truss requires python
>=3.8,<3.13. To set up a fresh development environment,
you can use the following commands, creating a environment named truss_env
using pyenv:.bashrc:~/.bashrc
CLI structure
Thetruss CLI organizes commands by workflow:
Model commands
Use these commands to package, deploy, and iterate on individual models.| Command | Description |
|---|---|
truss login | Authenticate with Baseten |
truss init | Create a new Truss project |
truss push | Deploy a model to Baseten |
truss watch | Live reload during development |
truss predict | Call the packaged model |
truss model-logs | Fetch logs for the packaged model |
Chain commands
Use these commands to build multi-model pipelines with shared dependencies.| Command | Description |
|---|---|
truss chains init | Initialize a new Chain project |
truss chains push | Deploy a Chain to Baseten |
truss chains watch | Live reload Chain development |
Training commands
Use these commands to launch, monitor, and manage training jobs.| Command | Description |
|---|---|
truss train init | Initialize a training project |
truss train push | Deploy and run a training job |
truss train logs | Stream logs from a training job |
truss train view | List and inspect training jobs |