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

> Live reload during development.

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

Watches for source code changes and applies live patches to a development deployment. This enables rapid iteration without redeploying.

<Tip>
  You can create a development deployment and start watching in one step with `truss push --watch`.
</Tip>

### Options

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

<ParamField body="--config" type="PATH">
  Path to a custom config file. Defaults to `config.yaml` in the Truss directory.
</ParamField>

<ParamField body="--remote" type="TEXT">
  Name of the remote in `.trussrc` to patch changes to.
</ParamField>

<ParamField body="--team" type="TEXT">
  Name of the team to deploy to. If not specified, Truss infers the team based on your team membership and existing models, or prompts for selection when ambiguous.

  <Note>
    The `--team` flag is only available if your organization has teams enabled. [Contact us](mailto:support@baseten.co) to enable teams, or see [Teams](/organization/teams) for more information.
  </Note>
</ParamField>

<ParamField body="--no-sleep" type="BOOLEAN" default="true">
  Keep the development model warm by preventing scale-to-zero while watching. Default is `true`. Pass `--no-sleep=false` to disable.
</ParamField>

<ParamField body="--hot-reload">
  Apply model code changes by swapping the model class in-process without restarting the inference server. Preserves in-memory state like loaded weights and caches, but does not re-run `__init__()` or `load()`. If your changes add new instance state that `predict()` depends on, do a full reload instead. When creating a new deployment with `truss push --watch`, use [`--watch-hot-reload`](/reference/cli/truss/push) instead.
</ParamField>

<ParamField body="--model-name" type="TEXT">
  Temporarily overrides the model name for this session without updating `config.yaml`.
</ParamField>

<ParamField body="--tail">
  Stream deployment logs while watching.
</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>

### Arguments

<ParamField body="TARGET_DIRECTORY" type="TEXT">
  A Truss directory. Defaults to current directory.
</ParamField>

**Examples:**

Watch for changes in the current directory:

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

You should see:

```
🪵  View logs for your development model at https://app.baseten.co/models/.../logs
👀 Watching for changes to truss at '/path/to/my-model'...
```

When you edit a file, Truss detects the change and applies a live patch to the running deployment.

Watch a specific Truss directory:

```sh theme={"system"}
truss watch /path/to/my-truss
```

Watch with a custom config file:

```sh theme={"system"}
truss watch --config my-config.yaml
```
