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

# environments

> DevHelm CLI environments commands — list, get, create, update, and delete environments

Manage environments from the command line. Create and configure deployment stages for your monitors.

## Commands

| Command | Description |
| - | - |
| `devhelm environments list` | List all environments |
| `devhelm environments get <slug>` | Get environment details |
| `devhelm environments create` | Create an environment |
| `devhelm environments update <slug>` | Update an environment |
| `devhelm environments delete <slug>` | Delete an environment |

<Note>
  Environments are identified by **slug** (e.g., `production`, `staging`), not numeric ID.
</Note>

## environments list

```bash theme={null}
devhelm environments list
```

| Flag | Type | Default | Description |
| - | - | - | - |
| `--page-size` | integer | `200` | Number of items per API request (1–200) |

## environments get

```bash theme={null}
devhelm environments get production
```

## environments create

```bash theme={null}
devhelm environments create --name "Production" --slug production --default
```

| Flag | Type | Required | Description |
| - | - | - | - |
| `--name` | string | Yes | Human-readable environment name |
| `--slug` | string | Yes | URL-safe identifier (lowercase, hyphens) |
| `--default` / `--no-default` | boolean | `false` | Mark this environment as the workspace default (exactly one allowed) |

## environments update

```bash theme={null}
devhelm environments update staging --name "Staging (US)" --no-default
```

| Flag | Type | Description |
| - | - | - |
| `--name` | string | New environment name |
| `--default` / `--no-default` | boolean | Promote/demote default environment status |

## environments delete

Prompts for confirmation; pass `--yes` (`-y`) in scripts and CI.

```bash theme={null}
devhelm environments delete staging
```

## Next steps

<CardGroup cols={2}>
  <Card title="Secrets" icon="lock" href="/cli/commands/secrets">
    Scope secrets to specific environments.
  </Card>

  <Card title="Multi-environment config" icon="layers" href="/guides/multi-environment-config">
    Manage per-environment YAML files.
  </Card>
</CardGroup>


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