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

# Truss CLI overview

> Install and configure the Truss CLI for deploying models, chains, and training jobs.

The `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, training jobs, and Loops deployments:

* **Models**: Package and deploy individual model servers.
* **Chains**: Build and deploy multi-step inference pipelines.
* **Training**: Launch and manage training jobs.
* **Loops**: Deploy and manage Loops sessions, runs, samplers, and checkpoints.

<Accordion title="Install the Truss CLI">
  You need [uv](https://docs.astral.sh/uv/) installed and a [Baseten account](https://app.baseten.co/signup) with an [API key](https://app.baseten.co/settings/account/api_keys).
</Accordion>

## CLI structure

The `truss` CLI organizes commands by workflow:

```
truss [OPTIONS] COMMAND [ARGS]...
```

### Model commands

Use these commands to package, deploy, and iterate on individual models.

| Command                                               | Description                                              |
| ----------------------------------------------------- | -------------------------------------------------------- |
| [`truss auth`](/reference/cli/truss/auth)             | Manage authentication (login, logout, status)            |
| [`truss login`](/reference/cli/truss/login)           | Authenticate with Baseten (alias for `truss auth login`) |
| [`truss init`](/reference/cli/truss/init)             | Create a new Truss project                               |
| [`truss push`](/reference/cli/truss/push)             | Deploy a model to Baseten                                |
| [`truss watch`](/reference/cli/truss/watch)           | Live reload during development                           |
| [`truss predict`](/reference/cli/truss/predict)       | Call the packaged model                                  |
| [`truss model-logs`](/reference/cli/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`](/reference/cli/chains/chains-cli#init)   | Initialize a new Chain project |
| [`truss chains push`](/reference/cli/chains/chains-cli#push)   | Deploy a Chain to Baseten      |
| [`truss chains watch`](/reference/cli/chains/chains-cli#watch) | Live reload Chain development  |

### Training commands

Use these commands to launch, monitor, and manage training jobs.

| Command                                                         | Description                     |
| --------------------------------------------------------------- | ------------------------------- |
| [`truss train init`](/reference/cli/training/training-cli#init) | Initialize a training project   |
| [`truss train push`](/reference/cli/training/training-cli#push) | Deploy and run a training job   |
| [`truss train logs`](/reference/cli/training/training-cli#logs) | Stream logs from a training job |
| [`truss train view`](/reference/cli/training/training-cli#view) | List and inspect training jobs  |

See the [Training CLI reference](/reference/cli/training/training-cli) for all `truss train` subcommands.

### Loops commands

Use these commands for the [Loops](/loops/concepts) deployment lifecycle.

| Command                                                               | Description                                            |
| --------------------------------------------------------------------- | ------------------------------------------------------ |
| [`truss loops push`](/reference/cli/loops/loops-cli#push)             | Provision a session, run, and sampler for a base model |
| [`truss loops view`](/reference/cli/loops/loops-cli#view)             | List active Loops deployments                          |
| [`truss loops deactivate`](/reference/cli/loops/loops-cli#deactivate) | Shut down the active deployment for a base model       |

See the [Loops CLI reference](/reference/cli/loops/loops-cli) for all `truss loops` subcommands.

## Authentication

After installing Truss, authenticate with Baseten using one of these methods:

**Option 1: Environment variable (recommended for CI/CD)**

```sh theme={"system"}
export BASETEN_API_KEY="EMPTY"
```

**Option 2: Interactive login**

```sh theme={"system"}
truss login
```

The CLI prompts you to choose between pasting an [API key](/organization/api-keys) and logging in via browser (OAuth device flow). Credentials are stored in your OS keyring when available and otherwise in `~/.trussrc`. See [`truss auth`](/reference/cli/truss/auth) for details on credential storage and managing multiple remotes.

## Next steps

<CardGroup cols={2}>
  <Card title="Deploy your first model" icon="rocket" href="/examples/deploy-your-first-model">
    Package and deploy a model in minutes.
  </Card>

  <Card title="Build a Chain" icon="link" href="/development/chain/getting-started">
    Create multi-step inference pipelines.
  </Card>

  <Card title="Launch a training job" icon="dumbbell" href="/training/getting-started">
    Fine-tune models on Baseten infrastructure.
  </Card>

  <Card title="Truss configuration" icon="gear" href="/reference/truss-configuration">
    Configure dependencies, resources, and more.
  </Card>
</CardGroup>
