Skip to content

overlane deploy env create

Create an environment on a target

Updated View as MarkdownOpen in ChatGPTOpen in Claude

Creates an environment such as staging or production. production and prod are protected by default: a deploy waits for the approval its rule demands, and verified work does not grant it. Pass –protected to protect another one. Creating one is a policy change: under supervised autonomy it waits for approval.

Usage

overlane deploy env create name --target TARGET [--protected] [--dry-run]

Arguments

Argument Required Description
name yes The environment name

Flags

Flag Type Required Default Description
--target string yes The target it deploys to (name or ID)
--protected boolean no Require an approval for every deploy
--dry-run boolean no Print the requests and file changes this command would make, then stop. Needs no credentials.

Examples

overlane deploy env create staging --target site
overlane deploy env create canary --target site --protected --dry-run

Behavior

  • Effect: write (changes local or hosted state).
  • Needs credentials: yes. Uses the network: yes.
  • Supports --dry-run: yes. Accepts --force: no.
  • Machine-readable description: overlane schema deploy env create.

Result

With --json (the default when stdout is not a terminal) the command prints this JSON Schema’s shape on stdout.

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
          "description": "tenant identifier"
        },
        "environment": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "type": "string",
              "const": "1"
            },
            "tenantId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
              "description": "tenant identifier"
            },
            "projectId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
              "description": "project identifier"
            },
            "name": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,40}$"
            },
            "targetId": {
              "type": "string"
            },
            "protected": {
              "type": "boolean"
            },
            "kind": {
              "type": "string",
              "enum": [
                "permanent",
                "preview"
              ]
            },
            "branch": {
              "type": [
                "string",
                "null"
              ]
            },
            "secretNames": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
              }
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          "required": [
            "schemaVersion",
            "tenantId",
            "projectId",
            "name",
            "targetId",
            "protected",
            "kind",
            "branch",
            "secretNames",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "tenantId",
        "environment"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "dryRun": {
          "type": "boolean",
          "const": true
        },
        "service": {
          "type": "string"
        },
        "requests": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "body": {},
              "note": {
                "type": "string"
              }
            },
            "required": [
              "method",
              "path"
            ],
            "additionalProperties": false
          }
        },
        "commands": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "writes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "action": {
                "type": "string",
                "enum": [
                  "write",
                  "append",
                  "delete"
                ]
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "path",
              "action",
              "description"
            ],
            "additionalProperties": false
          }
        },
        "notes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "dryRun",
        "requests",
        "commands",
        "writes",
        "notes"
      ],
      "additionalProperties": false
    }
  ]
}

See exit codes for the status the process returns.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close

Overlane Agent

Ask about the docs. Answers are quoted from the pages, with links. This panel cannot change anything.

    Questions are answered in your browser from the docs index. Nothing you type here is stored or sent anywhere.