# models deploy

```sh
rai models deploy [OPTIONS]
```

Deploy a model into a schema and wait for its initial refresh.

## Options

| Option            | Type          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| :---------------- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--path`          | path          | Path to the model file or package directory to deploy. If omitted, will use model.path from the config file.                                                                                                                                                                                                                                                                                                                                      |
| `--name`          | text          | Name of the model to deploy. May be omitted when the target defines exactly one model; required to disambiguate when it defines several.                                                                                                                                                                                                                                                                                                          |
| `--schema`        | text          | Target schema to deploy the model to (defaults to schema from the config file). This is a Snowflake identifier: unquoted parts are converted to uppercase, while a double-quoted part is matched exactly (double-quote a lowercase or mixed-case name).                                                                                                                                                                                           |
| `--force`         | Boolean       | Accept recorded model-configuration changes. In stateful mode, also deploy even if shared\_model.py has been edited locally since the last pull or deploy. Your changes are pushed to the shared model and shared\_model.py is regenerated in the canonical namespace format; the existing file is backed up to a timestamped `shared_model.py.&lt;timestamp&gt;.bak`. Stateless mode does not regenerate or back up that file. Default: `False`. |
| `--redeploy-all`  | Boolean       | Redeploy all managed objects, including unchanged ones. May rebuild materialized data. Default: `False`.                                                                                                                                                                                                                                                                                                                                          |
| `--wait`          | Boolean       | Deprecated: deployment now waits for the initial refresh by default. Default: `False`.                                                                                                                                                                                                                                                                                                                                                            |
| `--no-wait`       | Boolean       | Return without waiting for the initial refresh to complete. Default: `False`.                                                                                                                                                                                                                                                                                                                                                                     |
| `--plan`          | Boolean       | Prepare deployment setup and write a deployment plan report without executing the model deployment. Default: `False`.                                                                                                                                                                                                                                                                                                                             |
| `--reviewed-plan` | path          | Deploy only if the current deployment plan report exactly matches this reviewed file.                                                                                                                                                                                                                                                                                                                                                             |
| `--plan-output`   | path          | Report file path (requires --plan). Defaults to ./deploy-plan.md or ./deploy-plan.json according to --plan-format. The path must end in .md or .json and match --plan-format (default: markdown).                                                                                                                                                                                                                                                 |
| `--plan-format`   | choice        | Report file format (default: markdown; requires --plan). Independent of global --json.                                                                                                                                                                                                                                                                                                                                                            |
| `--wait-timeout`  | integer range | Limit the initial-refresh wait to this many seconds. No timeout by default; ignored with --plan.                                                                                                                                                                                                                                                                                                                                                  |

## See Also

- [`models init`](/api/cli/v2.2/models/init/index.md)
- [`models list`](/api/cli/v2.2/models/list/index.md)
- [`models pull`](/api/cli/v2.2/models/pull/index.md)
- [`models teardown`](/api/cli/v2.2/models/teardown/index.md)
