Skip to content

CLI

The e2engine CLI provides a command-line interface to E2Engine resources and executions.

Use it to validate and manage Environments, Tests, and TestSuites, run tests, inspect execution results, and integrate E2Engine into scripts and development workflows.

Terminal window
e2engine --help
Manage and run end-to-end tests
Usage:
e2engine [command]
Available Commands:
check Wait for an execution to complete and check its result
completion Generate the autocompletion script for the specified shell
create Create a new resource
delete Delete a resource
get Display one or more resources
help Help about any command
run Run a test or test suite against an environment
validate Validate a resource specification
version Show e2engine tool version

Commands follow a consistent structure:

e2engine <action> <entity> <arguments> [flags]

For example:

Terminal window
e2engine create environment environment.yaml
e2engine get test payment-test
e2engine run test payment-test payment

The CLI commands fall into two main groups.

Resource commands operate on E2Engine resources:

Environment ─┐
Test ────────┼──▶ validate
TestSuite ───┘ create
get
delete

Execution commands run those resources and inspect the resulting executions:

Environment + Test
│
▼
run
│
▼
TestExecution
│
▼
get

and:

Environment + TestSuite
│
▼
run
│
▼
TestSuiteExecution
│
▼
get

This follows the same distinction used by the E2Engine model: resources describe what should be tested, while executions record what happened when those resources were run.

The CLI provides common operations for Environments, Tests, and TestSuites.

Use validate to check a resource specification without creating it:

Terminal window
e2engine validate environment environment.yaml

Validation checks the resource against the E2Engine model and its validation rules.

This is useful while authoring specifications and before using them in automated workflows.

Use create to create a resource from a specification:

Terminal window
e2engine create environment environment.yaml

The entity identifies the resource kind, while the specification contains the resource definition:

kind: Environment
version: 1.0.0
name: payment
spec:
# ...

The same action follows the same structure for other E2Engine resource kinds.

Use get to retrieve resources and execution results.

For example:

Terminal window
e2engine get environment payment

The reference can be a resource name or an ID prefix accepted by the corresponding command.

List commands can be used to inspect the available resources of a particular kind.

See the resource-specific CLI pages for the complete command forms and available options.

Use delete to remove resources:

Terminal window
e2engine delete environment payment

Deletion applies to persistent E2Engine resources such as Environments, Tests, and TestSuites.

Use run to execute a Test or TestSuite against an Environment.

Conceptually:

Environment + Test
│
▼
e2engine run
│
▼
TestExecution

or:

Environment + TestSuite
│
▼
e2engine run
│
▼
TestSuiteExecution

A Test run takes the Test reference followed by the Environment reference:

Terminal window
e2engine run test <test-ref> <env-ref>

For example:

Terminal window
e2engine run test payment-test payment

The command resolves the referenced resources, starts the execution, and produces an execution record that can subsequently be inspected.

The details of the execution lifecycle are described in Running a test and Running a test suite.

The CLI supports three output formats:

table
json
yaml

Select the format with --output or -o:

Terminal window
e2engine get environment payment --output yaml
Terminal window
e2engine get environment payment -o json

table is the default format for commands intended for interactive use.

It provides a compact human-readable representation of resources and executions.

Use --no-headers when table output should omit column headings:

Terminal window
e2engine get environments --no-headers

JSON and YAML output expose structured E2Engine data and are better suited to scripts, automation, and cases where the complete resource or execution representation is needed.

Terminal window
e2engine get environment payment -o json

This separation allows the CLI to provide concise interactive output without changing the underlying E2Engine models.

Use --quiet or -q to suppress non-error output:

Terminal window
e2engine create environment environment.yaml --quiet

This is useful in scripts where command success is determined from the exit status rather than normal CLI output.

Use --verbose or -v when additional execution information is useful:

Terminal window
e2engine run test payment-test payment -v

Quiet and verbose modes control CLI presentation and diagnostics; they do not change the E2Engine resource or execution model.

The CLI can be configured independently from the resources it manages.

CLI configuration
│
├── repository
├── execution infrastructure
└── runtime settings
Resource specifications
│
├── Environment
├── Test
└── TestSuite

This keeps operational configuration separate from portable test definitions.

See Configuration for the available settings and configuration sources.

Every command provides built-in help:

Terminal window
e2engine create --help

For commands with subcommands, continue through the hierarchy to inspect the available arguments and flags:

Terminal window
e2engine get --help

The root command lists the global flags:

Flags:
-h, --help help for e2engine
--no-headers Omit headers in table output
-o, --output string Output format (available: table, json, yaml)
-q, --quiet Suppress non-error output
-v, --verbose Enable verbose output

The following pages describe the CLI in more detail:

For installation instructions, see Installation.