> ## 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 env pull

> Fill the local .env from a backend that is running. Over an existing file it lists what changes and confirms, then rewrites the whole file; a missing file is created without asking, and identical values write nothing.

## Usage

```bash theme={null}
xanosdk env pull [options]
```

## Backends

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

## Flags

| Flag | Description |
| - | - |
| `--from <source>` | Read the values from this backend instead of the one this project last deployed to: workspace, ephemeral, ephemeral:\<name>, local, local:\<name>, or tenant:\<name> |
| `--yes, -y` | Skip the confirmation before an existing .env is changed (required for that when there is no terminal) |
| `--backend-dir <path>` | The backend directory to act on, when this project does not keep it in xano/ and nothing on disk says so |
| `--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.