Deployments.ai Docs
Command reference

deployments env

Project environments

CommandSummary
deployments env createCreate an environment
deployments env listList environments
deployments env showShow an environment
deployments env updateUpdate an environment
deployments env archiveArchive an environment

deployments env create

Create an environment.

deployments env create --name <name> --type <type>
  • Calls POST /v1/environments (SDK createEnvironment).
  • Needs a project: --project or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
--namestringyesResource name
--slugstringURL-safe environment slug
--typestringyesdevelopment, staging, production, or custom

Also accepts the global flags.

deployments env list

List environments.

deployments env list
  • Calls GET /v1/environments (SDK listEnvironments).
  • Needs a project: --project or the saved context.
  • Paginated. --page-size sets the page size; pass the returned cursor as --cursor for the next page.
FlagTypeRequiredDefaultDescription
--cursorstring (cursor)Pagination cursor
--page-sizestring (number)Page size

Also accepts the global flags.

deployments env show

Show an environment.

deployments env show <id>
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID

Also accepts the global flags.

deployments env update

Update an environment.

deployments env update <id>
  • Calls PATCH /v1/environments/{id} (SDK updateEnvironment).
  • Needs an environment: --env or the saved context.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID
--namestringNew environment name
--slugstringNew environment slug

Also accepts the global flags.

deployments env archive

Archive an environment.

deployments env archive <id>
  • Calls DELETE /v1/environments/{id} (SDK archiveEnvironment).
  • Needs an environment: --env or the saved context.
  • Destructive. Live runs ask for confirmation; pass --yes in scripts or with --json.
  • Sends an idempotency key. The CLI generates one per run; pass --idempotency-key to retry safely.
FlagTypeRequiredDefaultDescription
<id>positionalyesResource ID
--reasonstringReason for this operation

Also accepts the global flags.

On this page