> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cli/reference/env.md).

# norbix env

Manage project environments (PROD, TEST, ...).

Manage project environments (PROD, TEST, ...).

3 commands (`@norbix.ai/cli` 1.16.0):

* [`norbix env delete`](#norbix-env-delete) — Delete a non-PROD environment (cascades its integrations)
* [`norbix env list`](#norbix-env-list) — List the project's environments (PROD is always first)
* [`norbix env use`](#norbix-env-use) — Set the default environment for future commands.

## `norbix env delete`

Delete a non-PROD environment (cascades its integrations)

```sh
norbix env delete NAME [flags]
```

| Argument | Required | Description                               |
| -------- | -------- | ----------------------------------------- |
| `NAME`   | yes      | Environment name (PROD cannot be deleted) |

| Flag          | Description                                                            |
| ------------- | ---------------------------------------------------------------------- |
| `-y`, `--yes` | Skip the confirmation prompt (required in non-interactive shells)      |
| `--dry-run`   | Resolve context and print the request that would be sent; send nothing |

Also takes the [global flags](/codemash/cli/reference.md#global-flags): `--json`, `--project`, `--env`, `--region`, `--api-key`, `--account`, `--profile`.

Examples:

```sh
norbix env delete STAGING --yes
norbix env delete STAGING --dry-run
```

## `norbix env list`

List the project's environments (PROD is always first)

```sh
norbix env list
```

Also takes the [global flags](/codemash/cli/reference.md#global-flags): `--json`, `--project`, `--env`, `--region`, `--api-key`, `--account`, `--profile`.

Examples:

```sh
norbix env list
```

## `norbix env use`

Set the default environment for future commands.

```
Written to the active session when you are logged in; with --profile it is
written into that profile in ~/.norbix/config; otherwise to the [default]
profile. Override per command with --env.
```

```sh
norbix env use NAME [flags]
```

| Argument | Required | Description                        |
| -------- | -------- | ---------------------------------- |
| `NAME`   | yes      | Environment name (e.g. PROD, TEST) |

| Flag        | Description                                                            |
| ----------- | ---------------------------------------------------------------------- |
| `--dry-run` | Resolve context and print the request that would be sent; send nothing |

Also takes the [global flags](/codemash/cli/reference.md#global-flags): `--json`, `--project`, `--env`, `--region`, `--api-key`, `--account`, `--profile`.

Examples:

```sh
norbix env use TEST
norbix env use PROD
norbix env use STAGING --profile fitskin-prod
norbix env use TEST --dry-run
```
