> ## 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 workspace diff

> Compare it (or one of its branches) against a local compile — which objects differ, are missing, or are unexpected. Exits 2 when anything declared differs or is missing.

## Usage

```bash theme={null}
xanosdk workspace diff <file> [options]
```

## Flags

| Flag | Description |
| - | - |
| `--bundle <path>` | Use an already-exported bundle instead of an entry file |
| `--branch <label>` | Compare this branch instead of the live one |
| `--lock[=<path>]` | Name the xano.lock to use — default: beside the entry file |
| `--no-lock` | Build with no lock: identities derive from names, public URLs are left to the instance |
| `--frozen-lock` | CI guard: fail instead of changing the lock, or on a lock entry nothing matches |
| `--allow-lock-orphans` | With --frozen-lock: accept lock entries no exported object matches, for a workspace adopted with `lock import` and ported a piece at a time |
| `--strict` | Promote every export warning (data-losing shapes, unresolvable filters) to a hard failure |
| `--env-var KEY=VALUE` | Set one BACKEND workspace env var for this run (repeatable). Beats xano/.env and --backend-env-file; the value never touches disk |
| `--backend-env-file <path>` | Read backend env values from this dotenv-style file INSTEAD of the default xano/.env (for CI, which does not have the ignored default) |
| `--allow-empty-env=NAME[,NAME]` | Send these declared names EMPTY when no value is supplied, clearing them in whatever imports the bundle. Only `deploy` refuses without it; per-name on purpose, and a bare --allow-empty-env is refused |
| `--allow-empty-doc-token=<scope>` | Send this scope's documentation token EMPTY when none is supplied, clearing that doc site's gate in whatever imports the bundle — `workspace`, or an API group's name. Repeat for more than one. Without it `deploy` refuses any gate left with no token, and every build refuses one on a group that publishes its docs (`swagger` on); a bare --allow-empty-doc-token is refused |
| `--secrets-file <path>` | Read documentation tokens from this file INSTEAD of the default xano/.secrets.json (for CI, which does not have the ignored default) |
| `--doc-token <scope>=<value>` | Supply one documentation token inline — `workspace=…`, or an API group's name. Repeat for more than one. Prefer --secrets-file: a value here is visible in shell history, the process list, and any CI log that echoes the command |
| `--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.