> ## 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
> Reactor hosts multiple models, each with its own connect slug (modelName) and command/event schema. The catalog of every model — slug, typed SDK package, and links to its schema — is at /model-api-reference/overview. 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 init

> Initialize a new Reactor model workspace

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

## Description

Scaffold a new Reactor model workspace.

With \<name>, init creates a new directory called \<name> in the current
folder and scaffolds into it. Without a name, init scaffolds into the
current folder, which must be empty (modulo dotfiles).

The generated workspace contains model.py, config.yaml,
requirements.txt, README.md, .dockerignore, and a reactor.yaml that
combines the model registration spec (model:), the runtime entry point
(runtime:), and the image definition (build:). There is no Dockerfile:
'reactor build' / 'run' / 'publish' generate one in memory from the build:
block and hand it straight to BuildKit.

reactor.yaml's build.runtime\_version pins the reactor-runtime release the
image installs; bump it there to upgrade. That version must be 3.0.0 or
newer: it is the runtime published as a package, and the authoring API the
scaffolded model.py is written against.

`--dockerfile` also writes the generated Dockerfile into the workspace. An
on-disk Dockerfile takes the build over, so it is the way to hand-edit the
image beyond what reactor.yaml can express; the build: fields the generator
would have consumed are then ignored, with a stderr note naming them when any
are set. On an existing workspace, use 'reactor init `--force` `--dockerfile`';
without `--force`, init refuses a non-empty directory, and it overwrites the
scaffold's own files.

**Examples:**

```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
reactor init my-model                       # scaffold into ./my-model/
reactor init                                # scaffold into the current (empty) folder
reactor init my-model -r 3.0.2              # pin to a specific runtime version
reactor init my-model --dockerfile          # also write a Dockerfile to hand-edit
reactor init my-model --force               # overwrite an existing ./my-model/
```

## Options

| Flag                           | Description                                                                                                             |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `--dockerfile`                 | Also write the generated Dockerfile into the workspace, taking the build over by hand                                   |
| `--force`                      | Overwrite existing scaffold files if the target directory already exists or is not empty                                |
| `-r, --runtime-version string` | reactor-runtime version recorded in the generated reactor.yaml, 3.0.0 or newer (default: the version the scaffold pins) |

## Global options

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

## See also

* [reactor](/deploy/cli-reference/reactor) - The CLI for the Reactor platform
