Command reference
deployments workspace
Environment workspaces
| Command | Summary |
|---|---|
deployments workspace create | Create a workspace |
deployments workspace list | List workspaces |
deployments workspace show | Show a workspace |
deployments workspace update | Update a workspace |
deployments workspace archive | Archive a workspace |
deployments workspace spend | Show a workspace's spend for a month, split into operator-funded and organization-funded |
deployments workspace create
Create a workspace.
deployments workspace create --name <name>- Calls
POST /v1/workspaces(SDKcreateWorkspace). - 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 |
|---|---|---|---|---|
--name | string | yes | Resource name | |
--description | string | Resource description | ||
--slug | string | URL-safe workspace slug |
Also accepts the global flags.
deployments workspace list
List workspaces.
deployments workspace list- Calls
GET /v1/workspaces(SDKlistWorkspaces). - Needs an environment:
--envor 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 workspace show
Show a workspace.
deployments workspace show <id>- Calls
GET /v1/workspaces/{id}(SDKgetWorkspace). - Needs an environment:
--envor the saved context.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID |
Also accepts the global flags.
deployments workspace update
Update a workspace.
deployments workspace update <id>- Calls
PATCH /v1/workspaces/{id}(SDKupdateWorkspace). - 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 workspace name | ||
--description | string | New workspace description | ||
--slug | string | New workspace slug |
Also accepts the global flags.
deployments workspace archive
Archive a workspace.
deployments workspace archive <id>- Calls
DELETE /v1/workspaces/{id}(SDKarchiveWorkspace). - 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.
deployments workspace spend
Show a workspace's spend for a month, split into operator-funded and organization-funded.
deployments workspace spend <id>- Calls
GET /v1/workspaces/{id}/spend(SDKgetWorkspaceSpend). - Needs an environment:
--envor the saved context.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID | |
--month | string | UTC month as YYYY-MM; defaults to the current month |
Also accepts the global flags.