# `npx @sanity/cli blueprints deploy`

Apply the local Blueprint to a remote Stack. This command can create, update, and remove remote resources.

## Preflight

1. Locate and inspect the Blueprint manifest.
2. Resolve the target from local configuration, or pass an explicit scope and `--stack`.
3. Run `npx @sanity/cli blueprints plan --json`.
4. Review all planned changes, especially replacements and removals.

Do not deploy when the target or plan is ambiguous.

## Deploy

Include a message that records the reason for the change:

```sh
npx @sanity/cli blueprints deploy --message "Deploy order processing changes" --json
```

To target another Stack, pass `--stack NAME_OR_ID`, adding `--project-id PROJECT_ID` or `--organization-id ORGANIZATION_ID` when the scope also differs.

Use `--no-wait` only when the caller does not need a confirmed result. Follow an asynchronous deployment with:

```sh
npx @sanity/cli blueprints info --json
```

Exit code `0` means the deployment completed, or was accepted when `--no-wait` is set. Exit code `2` means it failed. Exit code `75` means the request was accepted but completion could not be confirmed; inspect `blueprints info` and `blueprints logs` before retrying.

The command refuses to start while the Stack has a `QUEUED` or `IN_PROGRESS` operation, so a retry during one fails with that message rather than deploying twice. Once the earlier operation settles, a retry does deploy again.

Use `--new-stack-name NAME` only when the deployment should also rename the Stack.

Set `SANITY_ASSET_TIMEOUT` in seconds to raise the 180-second per-asset limit on processing resource assets when large Functions time out during preparation. Set `SANITY_ASSET_CONCURRENCY` to change how many assets are processed at once (default 4).
