List Command Configuration
The top-level list: section in atmos.yaml configures the default output of the atmos list family of commands. You can pin the output format, customize which columns appear, control column widths, and use Go templates to derive column values from component, stack, and variable data — without passing --columns or --format flags every time.
You will learn
- Set per-command defaults for
list components,list instances, andlist stacks - Control output format (
table,json,csv) - Define columns with Go templates that read component/stack/var data
- CLI flags (
--columns,--format) still override config defaults
Configuration
atmos.yaml
Configuration Reference
list.componentsDefault output configuration for
atmos list components. This command lists unique component definitions, deduplicated across stacks.list.instancesDefault output configuration for
atmos list instances. This command lists one row per component+stack pair (every materialized instance).list.stacksDefault output configuration for
atmos list stacks.
Each section accepts the same fields:
formatOutput format when no
--formatflag is supplied. One oftable,json, orcsv. If empty, defaults totable.- Type:
string - Allowed values:
table,json,csv - Default:
table
- Type:
columnsOrdered list of columns to render. Each entry is an object with:
name- The column header that appears in table output and the field name in CSV/JSON output.
value- A Go template expression evaluated per row. The available context depends on which list command is being run (see Template Context below).
width- Optional fixed column width (in characters) for table output. Omit to let the renderer auto-size.
When
columnsis empty or omitted, each list command falls back to its built-in default columns.
Template Context
The value template for each column is rendered against a row context whose keys vary by command.
list components
Lists unique components — one row per component definition.
{{ .component }}- The component name (e.g.,
vpc,eks/cluster). {{ .type }}- The component type (
terraform,helmfile,packer,ansible). {{ .stack_count }}- How many stacks this component appears in.
list instances
Lists instances — one row per component+stack pair. The full per-instance configuration is available, including:
{{ .component }},{{ .stack }}- The component name and the stack it's deployed in.
{{ .type }}- The component type (
terraform,helmfile, etc.). {{ .vars.<name> }}- Any variable defined in the stack manifest, e.g.,
{{ .vars.tenant }},{{ .vars.environment }},{{ .vars.stage }},{{ .vars.region }}. {{ .settings.<key> }}- Any value under the component's
settings:block. {{ .metadata.<key> }}- Component metadata fields like
metadata.type,metadata.locked.
list stacks
Lists stacks — one row per stack name. Useful fields include {{ .stack }} and any locals or variables resolved at the stack level.
Templates use the same Go template engine as the rest of Atmos. Sprig and Gomplate functions are available, so you can format, default, or compute values inline (e.g., {{ .vars.region | default "us-east-1" }}).
Precedence
For each list command, output is resolved with the following precedence (highest to lowest):
- CLI flags —
--format,--columns "Name=template" list.<command>configuration inatmos.yaml- Built-in defaults
Backward Compatibility
Earlier versions of Atmos used components.list.columns for the list instances command. That path is still honored as a fallback when list.instances.columns is unset, but new configurations should use the top-level list: section so each command can be configured independently.
Examples
Per-Format Defaults
Default to JSON for scripting while keeping the table layout for list components:
atmos.yaml
Custom Columns with Conditional Logic
Use template functions to derive columns:
atmos.yaml
See Also
atmos list components— List unique componentsatmos list instances— List component instancesatmos list stacks— List stacks- Settings — Other top-level settings