Command reference
deployments env
Project environments
| Command | Summary |
|---|---|
deployments env create | Create an environment |
deployments env list | List environments |
deployments env show | Show an environment |
deployments env update | Update an environment |
deployments env archive | Archive an environment |
deployments env create
Create an environment.
deployments env create --name <name> --type <type>- Calls
POST /v1/environments(SDKcreateEnvironment). - Needs a project:
--projector the saved context. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--name | string | yes | Resource name | |
--slug | string | URL-safe environment slug | ||
--type | string | yes | development, staging, production, or custom |
Also accepts the global flags.
deployments env list
List environments.
deployments env list- Calls
GET /v1/environments(SDKlistEnvironments). - Needs a project:
--projector the saved context. - Paginated.
--page-sizesets the page size; pass the returned cursor as--cursorfor the next page.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--cursor | string (cursor) | Pagination cursor | ||
--page-size | string (number) | Page size |
Also accepts the global flags.
deployments env show
Show an environment.
deployments env show <id>- Calls
GET /v1/environments/{id}(SDKgetEnvironment). - Needs an environment:
--envor the saved context.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID |
Also accepts the global flags.
deployments env update
Update an environment.
deployments env update <id>- Calls
PATCH /v1/environments/{id}(SDKupdateEnvironment). - Needs an environment:
--envor the saved context. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID | |
--name | string | New environment name | ||
--slug | string | New environment slug |
Also accepts the global flags.
deployments env archive
Archive an environment.
deployments env archive <id>- Calls
DELETE /v1/environments/{id}(SDKarchiveEnvironment). - Needs an environment:
--envor the saved context. - Destructive. Live runs ask for confirmation; pass
--yesin scripts or with--json. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID | |
--reason | string | Reason for this operation |
Also accepts the global flags.