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

> Download the Truss for a deployed model.

```sh theme={"system"}
truss download [OPTIONS]
```

Downloads the Truss for a deployed model as a tar file or extracts it into a directory. Use this to inspect the exact configuration and code that is running for a deployment, or to recover a Truss when the original source is unavailable.

You must pass exactly one of `--out-file` or `--out-dir`.

### Options

{/* autogenerated by bin/generate_cli_docs.py for truss==0.18.2; do not edit */}}

<ParamField body="--remote" type="TEXT">
  Name of the remote in `.trussrc`. If omitted, Truss prompts to select one.
</ParamField>

<ParamField body="--model-id" type="TEXT">
  ID of the model.
</ParamField>

<ParamField body="--deployment-id" type="TEXT">
  ID of the deployment.
</ParamField>

<ParamField body="--out-file" type="FILE">
  Save the Truss as a tar file at this path. Mutually exclusive with `--out-dir`.
</ParamField>

<ParamField body="--out-dir" type="DIRECTORY">
  Extract the Truss into this directory. Mutually exclusive with `--out-file`.
</ParamField>

<ParamField body="--overwrite">
  Allow overwriting an existing file or non-empty directory. Without this flag, the command fails if the target file exists or the target directory is non-empty.
</ParamField>

<ParamField body="--log" type="humanfriendly | W | WARNING | I | INFO | D | DEBUG" default="humanfriendly">
  Logging verbosity. `humanfriendly` (default) is pretty-printed; `INFO`, `DEBUG`, `WARNING` produce structured logs.
</ParamField>

<ParamField body="--non-interactive">
  Disable interactive prompts. Use in CI/automated contexts where stdin isn't a TTY.
</ParamField>

**Examples:**

Download a Truss as a tar file:

```sh theme={"system"}
truss download --model-id YOUR_MODEL_ID --deployment-id YOUR_DEPLOYMENT_ID --out-file my-truss.tar
```

Extract a Truss into a directory:

```sh theme={"system"}
truss download --model-id YOUR_MODEL_ID --deployment-id YOUR_DEPLOYMENT_ID --out-dir ./my-truss
```

Overwrite an existing tar file:

```sh theme={"system"}
truss download --model-id YOUR_MODEL_ID --deployment-id YOUR_DEPLOYMENT_ID --out-file my-truss.tar --overwrite
```
