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

# xanosdk publish

> Publish an already-built frontend to a static host — no compile, no backend import.

## Usage

```bash theme={null}
xanosdk publish <dir> [options]
```

## Backends

| Slot | Accepts | When omitted |
| - | - | - |
| `--to` | workspace, ephemeral, ephemeral:\<name>, local, local:\<name>, or tenant:\<name> | The backend this project last deployed to |

## Flags

| Flag | Description |
| - | - |
| `--to <destination>` | Where to publish, instead of the backend this project last deployed to: workspace, ephemeral, ephemeral:\<name>, local, local:\<name>, or tenant:\<name> |
| `--release <name>` | The release this frontend belongs to — checked to exist and reported with the publish |
| `--branch <label>` | Refuse unless this branch is live on your workspace — the check that the frontend lands in front of the backend it was built for (--to workspace only) |
| `--static-env KEY=VALUE` | Public config baked in as window.\<KEY> (repeatable; never secrets) |
| `--static-host <name>` | Static-host name to deploy to (default: default) |
| `--static-routing spa\|multipage` | Override URL resolution (inferred from the bundle; rarely needed) |
| `--skip-liveness` | Do not wait to confirm the deploy came up (static host, microservices) |
| `--yes, -y` | Skip the confirmation before replacing a workspace's or tenant's frontend |
| `--origin <origin>` | Xano OAuth host for `login` and a XANO\_REFRESH\_TOKEN exchange (default: \$XANO\_ORIGIN) |
| `--config <path>` | Explicit credential file (default: \$XANO\_CONFIG) |
| `--local-auth` | Use the project-local ./.xano/auth.json instead of the shared cache |

Global flags are listed in the [CLI overview](/reference/cli).

***

*Generated from @xano/sdk 1.0.9.*


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