> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reactor.inc/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To build and serve your own model, start at /deploy/development/quickstart and /deploy/development/overview. Authenticate with reactor auth login, scaffold with reactor init, then run reactor deploy production from the workspace. Deploy builds remotely by default, creates a missing workspace project and its production environment, and waits for rollout. No local Docker or model.version bump is needed. Projects own images and weight sets; environments select the image, weights, GPU, instance count, and variables. Create staging explicitly with reactor environment create staging before deploying to it. Use reactor scale for capacity and reactor rollback for an earlier revision’s image and weights. See /deploy/platform/projects and /deploy/platform/deploy. Client SDK modelName remains account-qualified and selects production by default. Model code imports reactor_runtime; Python client code imports reactor_sdk. Local testing is optional; /deploy/development/local-testing covers reactor run, which needs Docker.
> Reactor hosts multiple models, each with its own connect slug (modelName) and command/event schema. The video model catalog — slug, typed SDK package, and links to its schema — is at /model-api-reference/overview. Robotics policy documentation starts at /robotics/overview; The launch policies are Cosmos Nano DROID (/robotics/cosmos/nano-policy-droid/), DreamZero DROID (/robotics/dreamzero/droid/), and FLUX Action DROID (/robotics/flux-action/droid/), organized by model family and embodiment. Some models expose one slug per experience (e.g. HappyOyster); always take the slug from the model's own pages, never guess it.
> Fastest path to a working app: `npx create-reactor-app my-app --model=<slug>` scaffolds a complete app with secure auth wired up. Typed TypeScript SDKs are published as @reactor-models/<model>; Python uses the base reactor-sdk package.
> Auth: exchange an API key (rk_...) for a JWT via POST https://api.reactor.inc/tokens from your server. Never put the API key in client-side code.
> Append .md to any docs URL for clean Markdown. Search these docs via the MCP server at https://docs.reactor.inc/mcp.

# reactor deploy

> Build the code in this folder and make it live in an environment

```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
reactor deploy [<environment>] [flags]
```

## Description

Build the code in this folder, push it, and make it live in an
environment. Run it after each change to the code. Deploy builds the image
from the folder of the nearest reactor.yaml, records it on the project, and
writes the next revision of the environment in one step. The build runs on
the Reactor platform, so no docker daemon is needed; `--build-local` builds
with the local docker daemon and pushes the image instead.

Deploy needs a reactor.yaml in this folder or a parent: it names the
project and the build context. To change an environment from any other
folder, or with no build, such as to an image that is already pushed,
other weights or one setting, use reactor environment update.

The settings flags apply in the same write. `--weights` takes a tag, a
digest in its short or full form, a local path such as ./weights, which
the deploy pushes first, or hf://\<org>/\<repo>\[@\<revision>]; "none" clears
the weights. A setting that the command does not name keeps its value. The
deploy waits for the rollout unless `--no-wait` is set. A deploy that changes
nothing returns at once: it does not wait for a rollout that is already in progress.

The first deploy of an environment takes the accelerator of the model, or
CPU for a CPU model, unless `--gpu` names one. It runs 1 instance unless
`--desired` names a count. `--prefer-regions` and `--require-regions` place that
total, as reactor scale does, in the same revision. A change to the image,
the weights, the GPU or a variable replaces the running instances.

**Examples:**

```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
reactor deploy staging
reactor deploy staging --build-local
reactor deploy staging --build-tag v1.2.0
reactor deploy staging --weights ./weights
reactor deploy staging --gpu NVIDIA_H100 --desired 2
reactor deploy production --desired 3 --require-regions us-east,us-west
```

## Options

| Flag | Description |
| - | - |
| `--build-env <name>[=<value>]` | Override a build.build\_env value for this build (repeatable; a bare \<name> takes its value from the environment) |
| `--build-local` | Build the image with the local docker daemon instead of the Reactor platform |
| `--build-secret <id>[=@<path>]` | Build secret for remote and local builds (repeatable): \<id> prompts with no echo, \<id>=@- reads stdin, \<id>=@\<path> reads a file, and id=\<id>,env=\<var> or id=\<id>,src=\<path> uses Docker form; @- and @\<path> drop one trailing line ending |
| `--build-tag <tag>` | Put this tag on the image that the deploy builds, before the deploy |
| `--desired <count>` | Desired instance count; the Reactor API places the instances |
| `--dry-run` | Print the plan and send no write |
| `--gpu <type>[x<count>]` | Accelerator type and count per instance, such as NVIDIA\_H100 or NVIDIA\_H100x2; repeat in preference order |
| `--immediate` | End live sessions and replace every instance at once; implies `--strategy` replace-all |
| `--no-wait` | Return when the write is accepted, and do not wait for the rollout |
| `-o, --output table\|json` | Output format: table, json (default "table") |
| `--prefer-regions <region>[,...]` | Regions to fill first, spilling elsewhere when full (comma-separated); "none" clears it |
| `-p, --project <org>/<name>\|<uuid>` | Project: \<org>/\<name> or a project UUID (default: REACTOR\_PROJECT, else the nearest reactor.yaml) |
| `--require-regions <region>[,...]` | The only regions the instances may use (comma-separated); "none" clears it |
| `--secret <name>` | Set a secret value (repeatable). \<name> reads the value from a hidden prompt, \<name>=@- reads stdin, and \<name>=@path reads a file. The @- and @path forms drop one trailing line ending. The value never goes in argv. A new value replaces the running instances. To remove a secret, use `--unset` \<name>. The running instances of an earlier revision keep an unset secret until they stop. |
| `--strategy rolling\|replace-all` | Deployment strategy (default: rolling) |
| `--timeout duration` | The longest time to wait for the rollout |
| `--unset <name>` | Remove a variable (repeatable) |
| `--var <name>=<value>` | Set a plain variable (repeatable) |
| `--weights <tag>\|<digest>\|<path>\|hf://<org>/<repo>[@<revision>]` | Weight set: a tag, a digest in its short or full form, a local path such as ./weights to push first, or hf://\<org>/\<repo>\[@\<revision>]; "none" clears the weights |

## Global options

| Flag | Description |
| - | - |
| `--server <url>` | Reactor API server URL (default "[https://api.reactor.inc](https://api.reactor.inc)") |
| `-v, --verbose` | Enable verbose output |

## See also

* [reactor](https://docs.reactor.inc/deploy/cli-reference/reactor.md) - The CLI for the Reactor platform


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.