Environment commands
The CLI provides commands for validating and managing E2Engine Environments.
e2engine validate environmente2engine create environmente2engine get environmente2engine get environmentse2engine delete environmentFor the Environment resource model and specification format, see Environments.
Validate an Environment
Section titled “Validate an Environment”Validate an Environment specification before creating it:
e2engine validate environment <spec-path>For example:
e2engine validate environment environment.yamlIf the specification is valid, the command prints:
Environment spec is validValidation checks the specification against the Environment model and its validation rules without creating a persistent Environment resource.
Verbose output
Section titled “Verbose output”Use --verbose or -v to display the validated Environment:
e2engine validate environment environment.yaml --verboseTable output provides a compact representation of the resource. Use JSON or YAML to inspect the complete validated model:
e2engine validate environment environment.yaml -o yaml -ve2engine validate environment environment.yaml -o json -vQuiet validation
Section titled “Quiet validation”Use --quiet or -q when only the command result is needed:
e2engine validate environment environment.yaml --quietA successful validation produces no output. An invalid specification returns an error.
This form is useful in scripts and CI/CD pipelines.
Create an Environment
Section titled “Create an Environment”Create an Environment from a specification:
e2engine create environment <spec-path>For example:
e2engine create environment environment.yamlOn success, the default output identifies the created resource:
created environment, name: payment-demo id: <environment-id> version: 1.0.0Verbose output
Section titled “Verbose output”Use --verbose to display the created Environment instead of the compact confirmation:
e2engine create environment environment.yaml --verboseThe default table format shows the resource metadata. JSON and YAML expose the complete created Environment:
e2engine create environment environment.yaml -o yaml -vQuiet output
Section titled “Quiet output”With --quiet, the command prints only the ID of the created Environment:
e2engine create environment environment.yaml --quietThis is useful when another command or script needs to capture the new resource ID.
Get an Environment
Section titled “Get an Environment”Retrieve an Environment using its name or an ID prefix:
e2engine get environment <ref>For example:
e2engine get environment payment-demoor:
e2engine get environment 8c18c6df3133The default table output provides a compact view of the resource.
Use YAML or JSON to retrieve its complete structured representation:
e2engine get environment payment-demo -o yamle2engine get environment payment-demo -o jsonThis includes the Environment specification and its service definitions.
List Environments
Section titled “List Environments”List stored Environments using the plural environments command:
e2engine get environmentsThe default output is a table:
ID NAME VERSION CREATED UPDATED------------ ------------ ------- --------------------------- ---------------------------8c18c6df3133 payment-demo 1.0.0 2026-09-27T11:51:22.082035Z 2026-09-27T11:51:22.082035ZThe table contains:
| Column | Description |
|---|---|
ID |
Compact Environment ID |
NAME |
Environment name |
VERSION |
Resource version |
CREATED |
Creation timestamp |
UPDATED |
Last update timestamp |
Limit results
Section titled “Limit results”Use --limit to restrict the maximum number of Environments returned:
e2engine get environments --limit 20Values above the configured maximum are capped automatically.
Ordering
Section titled “Ordering”Results can be ordered by:
idnameversioncreatedAtupdatedAtSelect the field with --order-by:
e2engine get environments --order-by nameSelect ascending or descending order with --order-direction:
e2engine get environments \ --order-by updatedAt \ --order-direction descStructured output
Section titled “Structured output”Use JSON or YAML when the list is consumed programmatically:
e2engine get environments -o jsone2engine get environments -o yamlWithout table headers
Section titled “Without table headers”For table output, use --no-headers to omit column headings:
e2engine get environments --no-headersDelete an Environment
Section titled “Delete an Environment”Delete an Environment using its name or an ID prefix:
e2engine delete environment <ref>For example:
e2engine delete environment payment-demoOn success, the command confirms the deleted resource:
deleted environment, name: payment-demo id: <environment-id> version: 1.0.0Use --quiet to suppress the confirmation:
e2engine delete environment payment-demo --quietAliases
Section titled “Aliases”Environment commands provide shorter aliases for interactive use.
The singular resource commands accept env:
e2engine get env payment-demoe2engine delete env payment-demoThe plural list command accepts envs:
e2engine get envsThe full environment and environments forms are used throughout this documentation for clarity.
Output formats
Section titled “Output formats”Environment commands use the global CLI output options:
-o, --output string Output format (available: table, json, yaml) --no-headers Omit headers in table output-q, --quiet Suppress non-error output-v, --verbose Enable verbose outputTable output is intended for interactive use, while JSON and YAML expose structured E2Engine data for inspection and automation.
See CLI for an overview of CLI conventions and Environments for the Environment specification.

