devex template
Validate, plan, list, inspect, and manage DevEx templates
devex template
The template command manages DevEx templates and provides validation and planning for lifecycle templates.
devex template <subcommand> [flags]list
List built-in and user templates
info
Show metadata for a template
validate
Validate a lifecycle template schema
plan
Render a lifecycle execution plan
custom
Manage custom template packages
Lifecycle execution uses top-level commands
Use devex install --template, devex status --template, devex maintain --template, and devex remove --template to execute lifecycle templates. devex template plan only displays the planned work.
Subcommands
| Subcommand | Purpose |
|---|---|
list | List available templates |
check-updates | Check for template updates |
update | Update one template or all templates |
info | Show template metadata |
status | Show template system status |
init | Initialize template version tracking |
validate | Validate a devex.template/v1 lifecycle template |
plan | Build and display a lifecycle execution plan |
custom | Manage custom user and team templates |
devex template list
devex template list [flags]Options:
| Flag | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output format: table, json, or yaml |
--source | string | Filter by source: builtin or user | |
--updates-only | bool | false | Show only templates with available updates |
--include-user | bool | false | Include user templates |
Examples:
devex template list
devex template list --include-user
devex template list --source builtin --format json
devex template list --updates-onlydevex template info
devex template info <template-name> [flags]Options:
| Flag | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output format: table, json, or yaml |
Examples:
devex template info databases
devex template info databases --format yamldevex template validate
devex template validate <id-or-path> [flags]Validates a canonical lifecycle template using schema_version: devex.template/v1.
Options:
| Flag | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output format: table, json, or yaml |
Examples:
devex template validate databases
devex template validate ./templates/databases.yaml --format jsondevex template plan
devex template plan <id-or-path> [flags]Builds a concrete execution plan without running it. Plans resolve inputs, evaluate conditions, interpolate arguments, resolve app references, sort steps, and redact sensitive values in displayed output.
Options:
| Flag | Type | Default | Description |
|---|---|---|---|
--action | string | install | Lifecycle action: install, maintain, status, or remove |
--answer | string[] | Template input in key=value form; repeatable | |
--answers | string[] | YAML file containing template inputs; repeatable | |
--non-interactive | bool | false | Fail instead of prompting for missing required inputs |
--format | string | table | Output format: table, json, or yaml |
Examples:
devex template plan databases \
--action install \
--answer databases=postgres,redis \
--non-interactive
devex template plan ./templates/databases.yaml \
--action remove \
--answers ./prod.answers.yaml \
--format yamlLifecycle Commands
Runtime templates execute through top-level lifecycle commands.
Install
devex install --template <id-or-path> [flags]Supported template flags:
| Flag | Type | Description |
|---|---|---|
--template | string | Template ID or path |
--answer | string[] | Template input in key=value form; repeatable |
--answers | string[] | YAML file containing template inputs; repeatable |
--non-interactive | bool | Fail instead of prompting for missing template inputs |
--dry-run | bool | Preview without executing |
devex install --template databases \
--answer databases=postgres,redis \
--non-interactiveStatus
devex status --template <id-or-path> [flags]Supported template flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--template | string | Template ID or path | |
--answer | string[] | Template input in key=value form; repeatable | |
--answers | string[] | YAML file containing template inputs; repeatable | |
--non-interactive | bool | false | Fail instead of prompting for missing template inputs |
--run | string | latest | Install run to inspect: latest or a run ID |
--format | string | table | Output format: table, json, or yaml |
devex status --template databases --run latest --format jsonMaintain
devex maintain --template <id-or-path> [flags]Supported flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--template | string | Template ID or path | |
--answer | string[] | Template input in key=value form; repeatable | |
--answers | string[] | YAML file containing template inputs; repeatable | |
--non-interactive | bool | false | Fail instead of prompting for missing template inputs |
--run | string | latest | Install run to maintain: latest or a run ID |
--dry-run | bool | false | Preview without executing |
--format | string | table | Output format: table, json, or yaml |
devex maintain --template databases --run latest --dry-runRemove
devex remove --template <id-or-path> [flags]Supported template flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--template | string | Template ID or path | |
--answer | string[] | Template input in key=value form; repeatable | |
--answers | string[] | YAML file containing template inputs; repeatable | |
--non-interactive | bool | false | Fail instead of prompting for missing template inputs |
--run | string | latest | Install run to remove: latest or a run ID |
--dry-run | bool | false | Preview without executing |
--force | bool | false | Continue forced removal where supported |
--format | string | table | Output format: table, json, or yaml |
devex remove --template databases --run latest --forceInput Precedence
Inputs are resolved from lowest to highest precedence:
- Template defaults
- Environment variables named
DEVEX_INPUT_<KEY> - YAML files passed with
--answers - CLI values passed with
--answer
DEVEX_INPUT_POSTGRES_NAME=ci-postgres \
devex install --template databases \
--answers ./prod.answers.yaml \
--answer databases=postgres,redis \
--non-interactiveWith --non-interactive, required inputs that remain missing cause the command to fail before execution.
State And Runs
Template lifecycle commands record runs, operations, and managed resources in a local bbolt database. The default path is ~/.devex/state.db.
Override the path with the state.db_path config key or DEVEX_STATE_DB:
DEVEX_STATE_DB=/tmp/devex-state.db \
devex install --template ./templates/databases.yaml \
--answers ./ci.answers.yaml \
--non-interactiveUse devex runs to inspect recorded state:
devex runs list
devex runs show <run-id> --format yaml
devex runs resources <run-id>
devex runs operations <run-id> --format jsonRemoval uses recorded resources from the selected install run. If the template file changed after install, devex remove --template <id-or-path> --run <run-id> still targets the resources recorded for that run when removal hints are available.
Sensitive Inputs
Templates mark secrets with sensitive: true. Sensitive values may be used during planning and execution, but displayed plans and persisted state redact those values with [REDACTED]. Redaction applies to values supplied through --answer, --answers, environment variables, defaults, or prompts.
Related Commands
devex runs listdevex runs show <run-id>devex runs resources <run-id>devex runs operations <run-id>devex template custom <subcommand>