> ## 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 generate

> Decode a backend or a bundle .json into a Xano SDK source tree, with no project around it.

## Usage

```bash theme={null}
xanosdk generate <source> [options]
```

## Backends

| Slot | Accepts | When omitted |
| - | - | - |
| `<source>` | workspace, ephemeral, ephemeral:\<name>, local, local:\<name>, tenant:\<name>, release:\<name>, or a path to a bundle .json | Nothing: name one |

## Flags

| Flag | Description |
| - | - |
| `--out, -o <dir>` | Directory to write the tree into (default: ./xano) |
| `--force` | Replace a backend tree a decode wrote in --out (keeps .env and .secrets.json; reconciles xano.lock against the source) |
| `--yes, -y` | With --force, replace files you edited since the last decode without asking (required when there is no terminal) |
| `--branch <label>` | Read this branch of the workspace instead of the live one (`workspace` only) |
| `--no-secrets` | Find the documentation tokens and write none — for a machine where a secret on disk is not wanted. The tree still declares the gates, so a later deploy refuses rather than clearing one |
| `--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.