Skip to main content

atmos completion

Purpose

Use this command to generate completion scripts for Bash, Zsh, Fish and PowerShell.

atmos completion --help

Usage​

Execute the completion command like this:

atmos completion [bash|zsh|fish|powershell]

This command generates completion scripts for Bash, Zsh, Fish and powershell.

When the generated completion script is loaded into the shell, pressing the tab key twice displays the available commands and the help.

tip

Run atmos completion --help to see all the available options

Configuring Your Shell​

To enable command completion, you need to configure your shell. The setup process depends on which shell you’re using (e.g., zsh or bash).

Select your shell below for detailed setup instructions.

Bash Completion Setup​

To enable tab completion for Atmos in Bash, add the following to your ~/.bashrc or ~/.bash_profile:

# Enable Atmos CLI completion
source <(atmos completion bash)

After saving the file, apply the changes by running:

source ~/.bashrc

Now, you can run any atmos command, and pressing <Tab> after typing atmos will show the available subcommands. The same applies to --stack arguments and commands requiring a component (e.g., atmos terraform plan).

warning

The Atmos completion script statically completes custom commands based on the Atmos configuration. If completions are generated without this configuration (e.g., outside a project directory), custom commands won’t be included. To ensure accuracy, generate or regenerate the script from the correct working directory. This only affects custom commands. Components, stacks, and built-in commands remain fully dynamic.

Examples​

atmos completion bash
atmos completion zsh
atmos completion fish
atmos completion powershell

You can generate and load the shell completion script for Bash by executing the following commands:

atmos completion bash > /tmp/completion
source /tmp/completion

or

source <(atmos completion bash)

Arguments​

ArgumentDescriptionRequired
shell_name Shell name. Valid values are bash, zsh, fish and powershellyes
info

Refer to Command-line completion for more details