command
A command is one entry in the commands list. It defines a custom atmos subcommand — its name, help text, the arguments and flags it accepts, the environment it runs in, and the steps it executes.
The example below uses the most common keys. Each key has its own reference page linked in Fields.
commands:
- name: deploy
description: Deploy a component to a stack
verbose: false # set true to see verbose execution output
identity: superadmin # authenticate before running
working_directory: !repo-root . # where steps run
arguments:
- name: component
description: Component to deploy
required: true
flags:
- name: stack
shorthand: s
description: Stack to deploy to
required: true
env:
- key: ATMOS_COMPONENT
value: "{{ .Arguments.component }}"
dependencies:
tools:
terraform: "1.9.8"
steps:
- atmos terraform apply {{ .Arguments.component }} -s {{ .Flags.stack }} -auto-approve
Run it with:
atmos deploy vpc -s plat-ue2-prod
Fields
name- Required. The command name as typed after
atmos(for example,deploy). For nested commands, this is the subcommand name. Names appear inatmos help. description- Required. Help text shown in
atmos helpandatmos <command> --help. Supports multi-line YAML for usage examples. arguments- Positional arguments the command accepts.
flags- Long/short flags the command accepts.
env- Environment variables exported to every step.
steps- The work the command performs. Custom commands support the same step types as workflows.
component- Bind the command to a custom component type so it can read stack configuration.
dependencies- Tools that must be installed (via the toolchain) before the command runs.
working_directory- The directory the command's steps execute in.
identity- An Atmos auth identity to authenticate as before running.
commands- Nested subcommands.
verbose- Set to
trueto print verbose execution output for the command. Defaults tofalse.