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

# env

> Create, list and delete environments.

## envctl env create

```bash theme={null}
envctl env create <template> [flags]
```

Leases an environment from a template, waits until it's ready, and wires it to your sandbox. It prints the environment's name, services and shares.

| Flag | Description |
| - | - |
| `--share name=path` | Sync a local folder to one of the template's in shares, like `src=.`. Paths are relative to the sandbox's folder. Repeatable |
| `--label key=value` | Tag the environment. Repeatable |
| `--idle 30m` | Stop it after this long unused; the template's default otherwise |
| `--hard 2h` | Stop it after this long regardless, at most 24h |
| `--project name` | Whose key seals its files; by default the folder's git remote and path, like `github.com/acme/app/tools` |
| `--snapshot key` | Save its synced files under this key when it ends, and start from the newest snapshot saved under it |
| `--restore keys` | Comma-separated snapshot keys to start from, in order; each matches exactly, then as a prefix |
| `--include pattern` | Send a path even if `.gitignore` or the defaults leave it out, like `dist/**`. Repeatable |
| `--no-ignore` | Don't apply `.gitignore` files or the defaults; secret files still stay back |
| `--file source=destination` | Send an extra file from outside the folder, sealed, mode 0600, never stored. Repeatable |
| `--no-wait` | Return once it's queued, without waiting for it to be ready |
| `--json` | Print the environment as JSON |

```bash theme={null}
envctl env create linux-build --share src=. --label task=fix-login --snapshot main --idle 30m
```

## envctl env list

```bash theme={null}
envctl env list [--label key=value] [--all] [--json]
```

Lists your organization's live environments, or every one with `--all`, with their template, state and time left.

## envctl env delete

```bash theme={null}
envctl env delete <name or id>
```

Stops the environment and removes its container and data. With `--snapshot`, its files are saved first. Your sandbox is rewired to drop it.


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