DevEx LogoMy App
CLI Reference

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

SubcommandPurpose
listList available templates
check-updatesCheck for template updates
updateUpdate one template or all templates
infoShow template metadata
statusShow template system status
initInitialize template version tracking
validateValidate a devex.template/v1 lifecycle template
planBuild and display a lifecycle execution plan
customManage custom user and team templates

devex template list

devex template list [flags]

Options:

FlagTypeDefaultDescription
--formatstringtableOutput format: table, json, or yaml
--sourcestringFilter by source: builtin or user
--updates-onlyboolfalseShow only templates with available updates
--include-userboolfalseInclude user templates

Examples:

devex template list
devex template list --include-user
devex template list --source builtin --format json
devex template list --updates-only

devex template info

devex template info <template-name> [flags]

Options:

FlagTypeDefaultDescription
--formatstringtableOutput format: table, json, or yaml

Examples:

devex template info databases
devex template info databases --format yaml

devex template validate

devex template validate <id-or-path> [flags]

Validates a canonical lifecycle template using schema_version: devex.template/v1.

Options:

FlagTypeDefaultDescription
--formatstringtableOutput format: table, json, or yaml

Examples:

devex template validate databases
devex template validate ./templates/databases.yaml --format json

devex 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:

FlagTypeDefaultDescription
--actionstringinstallLifecycle action: install, maintain, status, or remove
--answerstring[]Template input in key=value form; repeatable
--answersstring[]YAML file containing template inputs; repeatable
--non-interactiveboolfalseFail instead of prompting for missing required inputs
--formatstringtableOutput 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 yaml

Lifecycle Commands

Runtime templates execute through top-level lifecycle commands.

Install

devex install --template <id-or-path> [flags]

Supported template flags:

FlagTypeDescription
--templatestringTemplate ID or path
--answerstring[]Template input in key=value form; repeatable
--answersstring[]YAML file containing template inputs; repeatable
--non-interactiveboolFail instead of prompting for missing template inputs
--dry-runboolPreview without executing
devex install --template databases \
  --answer databases=postgres,redis \
  --non-interactive

Status

devex status --template <id-or-path> [flags]

Supported template flags:

FlagTypeDefaultDescription
--templatestringTemplate ID or path
--answerstring[]Template input in key=value form; repeatable
--answersstring[]YAML file containing template inputs; repeatable
--non-interactiveboolfalseFail instead of prompting for missing template inputs
--runstringlatestInstall run to inspect: latest or a run ID
--formatstringtableOutput format: table, json, or yaml
devex status --template databases --run latest --format json

Maintain

devex maintain --template <id-or-path> [flags]

Supported flags:

FlagTypeDefaultDescription
--templatestringTemplate ID or path
--answerstring[]Template input in key=value form; repeatable
--answersstring[]YAML file containing template inputs; repeatable
--non-interactiveboolfalseFail instead of prompting for missing template inputs
--runstringlatestInstall run to maintain: latest or a run ID
--dry-runboolfalsePreview without executing
--formatstringtableOutput format: table, json, or yaml
devex maintain --template databases --run latest --dry-run

Remove

devex remove --template <id-or-path> [flags]

Supported template flags:

FlagTypeDefaultDescription
--templatestringTemplate ID or path
--answerstring[]Template input in key=value form; repeatable
--answersstring[]YAML file containing template inputs; repeatable
--non-interactiveboolfalseFail instead of prompting for missing template inputs
--runstringlatestInstall run to remove: latest or a run ID
--dry-runboolfalsePreview without executing
--forceboolfalseContinue forced removal where supported
--formatstringtableOutput format: table, json, or yaml
devex remove --template databases --run latest --force

Input Precedence

Inputs are resolved from lowest to highest precedence:

  1. Template defaults
  2. Environment variables named DEVEX_INPUT_<KEY>
  3. YAML files passed with --answers
  4. CLI values passed with --answer
DEVEX_INPUT_POSTGRES_NAME=ci-postgres \
  devex install --template databases \
  --answers ./prod.answers.yaml \
  --answer databases=postgres,redis \
  --non-interactive

With --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-interactive

Use 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 json

Removal 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.

  • devex runs list
  • devex runs show <run-id>
  • devex runs resources <run-id>
  • devex runs operations <run-id>
  • devex template custom <subcommand>

On this page