# environment Command - Nitro

> Manage workspace environments with the `nitro environment` commands: create, list, show, and delete variable groups reused across documents in the Nitro UI.

Canonical source: https://chillicream.com/docs/nitro/cli/environment

The `nitro environment` commands manage environments. An environment is a workspace-level grouping that holds a list of variables that can be reused across documents in the Nitro UI.

All `environment` commands require authentication. Run `nitro login` first or pass `--api-key` (see [Global Options](https://chillicream.com/docs/nitro/cli/global-options)).

## `nitro environment create`

Create a new environment in a workspace.

```
nitro environment create --name "<name>"
```

### Options

| Option                         | Env                  | Description                                                                                             |
| ------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------- |
| \-n, --name <name>             |                      | Display name of the environment (for example dev, staging, production). Required.                       |
| \--workspace-id <workspace-id> | NITRO\_WORKSPACE\_ID | ID of the workspace to create the environment in. Falls back to the workspace from the current session. |

When run interactively without `--name`, the CLI prompts for it.

### Examples

Create an environment in the current workspace:

```
nitro environment create --name "<name>"
```

Create an environment in a specific workspace:

```
nitro environment create \
  --name "<name>" \
  --workspace-id "<workspace-id>"
```

## `nitro environment list`

List all environments in a workspace. Results are paginated, use the returned cursor to fetch the next page.

```
nitro environment list
```

### Options

| Option                         | Env                  | Description                                                                |
| ------------------------------ | -------------------- | -------------------------------------------------------------------------- |
| \--workspace-id <workspace-id> | NITRO\_WORKSPACE\_ID | ID of the workspace. Falls back to the workspace from the current session. |
| \--cursor <cursor>             | NITRO\_CURSOR        | Pagination cursor to resume from. Useful for non-interactive paging.       |

## `nitro environment show`

Show the details of an environment by its ID.

```
nitro environment show "<environment-id>"
```

### Arguments

| Argument | Description                              |
| -------- | ---------------------------------------- |
| <id>     | ID of the environment to show. Required. |

[Edit this page on GitHub](https://github.com/ChilliCream/graphql-platform/edit/main/website/content/docs/nitro/cli/environment.md)

Last updated on **June 30, 2026** by **Tobias Tengler**
