atmos list
Use these subcommands to list sections of Atmos configurations.
Configure Stacks
Learn how to configure stacks, components, and the list command column customization.
Usageβ
Atmos provides a powerful feature to customize the columns displayed by various atmos list commands (e.g., atmos list stacks, atmos list components, atmos list workflows). This allows you to tailor the tabular output to show precisely the information you need for different contexts.
Column customization is configured within your atmos.yaml file using Go template expressions, enabling dynamic values based on stack, component, or workflow data. This guide explains how to configure and use this feature.
Subcommandsβ
ποΈ components
Use this command to list Atmos components
ποΈ instances
Use this command to list all Atmos component instances across stacks
ποΈ metadata
Use this command to list component metadata across all stacks
ποΈ settings
Use this command to list component settings across all stacks
ποΈ stacks
Use this command to list all Stack configurations or stacks for a specified component
ποΈ values
Use this command to list component values across all stacks
ποΈ vars
Use this command to list component variables across all stacks
ποΈ vendor
Use this command to list all vendored components and modules
ποΈ workflows
Use this command to list all workflows defined in your Atmos project
ποΈ themes
List available terminal themes for markdown rendering
Supported List Commandsβ
| Command | Description |
|---|---|
atmos list stacks | Lists all defined stacks in your project. A stack is a named configuration representing a deployment environment (e.g., dev/us-east-1, prod/eu-west-1). |
atmos list components | Lists all available components (Terraform, Helmfile, etc.) defined in the project. Components are reusable infrastructure building blocks. |
atmos list workflows | Lists all defined workflows, which are custom command sequences defined in atmos.yaml to streamline repetitive tasks. |
atmos list values | Displays the fully resolved configuration values for a specified component in a stack, after inheritance and imports are applied. |
atmos list vars | Lists the Terraform vars (input variables) that will be passed to a component for a given stack. Useful for debugging variable resolution. |
atmos list settings | Shows the settings block, typically used for configuring a componentβs behavior (e.g., module version, backend type). |
atmos list metadata | Displays the metadata block associated with a component in a stack, including attributes like stage, tenant, environment, and namespace. |
You can define custom columns for each of these commands individually in your atmos.yaml.
How Column Customization Worksβ
To customize columns for a specific list command, navigate to the relevant section (e.g., stacks, components, workflows) in your atmos.yaml configuration file. Within that section, define a list block.
Inside the list block:
- Specify the output
format(optional, defaults totable). Other options includejson,yaml,csv,tsv. - Define a
columnsarray. Each element in this array represents a column in the output table and must have:name: The string that will appear as the column header.value: A Go template string that dynamically determines the value for each row in that column.
Example Structure:
# In atmos.yaml
stacks: # Or components, workflows, etc.
list:
format: table # Optional
columns:
- name: "Header 1"
value: "{{ .some_template_variable }}"
- name: "Header 2"
value: "Static Text or {{ .another_variable }}"
# ... more columns
YAML Template Syntaxβ
The value field in each column definition supports Go templates. The available variables within the template depend on the specific atmos list command being customized:
For atmos list stacks:β
{{ .stack_name }} # Name of the stack
{{ .stack_path }} # Filesystem path to the stack configuration file
For atmos list components:β
{{ .component_name }} # Name of the component
{{ .component_type }} # Type of the component (e.g., terraform, helmfile)
{{ .component_path }} # Filesystem path to the component directory
For atmos list workflows:β
{{ .name }} # The name of the workflow
{{ .file }} # The manifest name
{{ .description }} # The description provided for the workflow
For atmos list values, atmos list vars, atmos list settings, and atmos list metadata:β
{{ .stack_name }} # Name of the stack context
{{ .key }} # The key or property name being listed
{{ .value }} # The corresponding value for the key
Full Reference: atmos.yaml Structureβ
Here's the general structure for defining custom list columns in atmos.yaml:
<command_scope>: # e.g., stacks, components, workflows, values, vars, settings, metadata
list:
format: table|json|csv|yaml|tsv # Optional, default is 'table'
columns:
- name: "<Your Column Header>"
value: "<Go template string using available variables>"
# ... add more column definitions as needed
- Replace
<command_scope>with the specific scope corresponding to theatmos listcommand you want to customize (e.g.,stacksforatmos list stacks). - The
columnsarray is mandatory if you want to override the default columns. Ifcolumnsis omitted, the command uses its default output columns.
Custom Columns for Workflowsβ
# In atmos.yaml
workflows:
list:
columns:
- name: Workflow
value: "{{ .name }}" # Corresponds to the workflow key in the manifest
- name: Manifest Name
value: "{{ .file }}" # Corresponds to the 'name' field within the manifest file
- name: Description
value: "{{ .description }}" # Corresponds to the 'description' field for the workflow
Note that {{ .file }} in this context refers to the value of the top-level name attribute within the workflow manifest file itself, not the path to the file.
Display Behaviorβ
TTY vs Non-TTY Outputβ
The appearance of the output table depends on whether atmos detects an interactive terminal (TTY) or not:
-
TTY Output (e.g., running in your terminal)
- Displays a formatted table with borders and styling.
- Attempts to fit within the terminal width.
- Uses standard padding between columns (TableColumnPadding = 3).
- Defaults to
format: tableif not specified.
-
Non-TTY Output (e.g., redirecting to a file, piping to another command)
- Produces a simpler, machine-readable format suitable for scripting or automation.
- Ensures consistent structure for programmatic parsing.
Authenticationβ
All atmos list subcommands support authentication via the --identity flag or ATMOS_IDENTITY environment variable. This is useful when stack configurations use YAML template functions (e.g., !terraform.state, !terraform.output) that require cloud provider credentials.
Using the --identity Flagβ
# Use a specific identity
atmos list stacks --identity my-aws-identity
atmos list components -s tenant1-ue2-dev -i my-aws-identity
# Disable authentication explicitly (use AWS SDK defaults)
atmos list instances --identity=false
Using Environment Variablesβ
# Set identity via environment variable
ATMOS_IDENTITY=my-aws-identity atmos list stacks
# Using the environment variable with a different command
ATMOS_IDENTITY=my-aws-identity atmos list components
Stack-Level Default Identityβ
When neither the --identity flag nor environment variable is set, Atmos automatically loads your stack configuration files to find a default identity configured with default: true:
# In stacks/orgs/acme/_defaults.yaml
auth:
identities:
my-default-identity:
default: true # This identity will be used automatically
For more details on authentication, refer to Authentication.
Global Flagsβ
All atmos list subcommands support these flags inherited from the parent command:
--identity/-i(optional)- Authenticate with a specific identity before executing the command.
This is required when YAML template functions need to access remote resources requiring authentication.atmos list stacks --identity my-aws-identity
Troubleshooting & Tipsβ
- Blank Columns: If a column appears empty, double-check the template variable name (
{{ .variable }}) against the YAML Template Syntax section for the specific command. Ensure the data context actually contains that variable for the items being listed. - Inspecting Available Data: Use the
describecommand with--format jsonor--format yaml(e.g.,atmos describe stacks --format json) to see the raw data structure and available fields you can use in your templates. - Wide Tables: If the table is too wide for your terminal or you encounter errors about content width:
- Reduce the number of columns defined in your
atmos.yaml. - Use a different output format like
jsonoryaml. - Some
listcommands might support a--max-columnsflag (check command help).
- Reduce the number of columns defined in your
- Filtering: Use command-specific flags like
--stacks 'pattern'foratmos list stacksto filter the rows, which can indirectly simplify the output. Query flags (--query) might also help narrow down data.