# Aliases

Aliases let you create shortcut names for existing CLI commands. Any CLI command can be aliased, including Atmos native commands like `terraform apply` or `describe stacks`, as well as [custom commands](/cli/configuration/commands).

_\[Video: Atmos Aliases]_

## Configuration

CLI command aliases are configured in the `aliases` section:

**File:** `atmos.yaml`

```yaml
# CLI command aliases
aliases:
  # Aliases for Atmos native commands
  tf: terraform
  tp: terraform plan
  up: terraform apply
  down: terraform destroy
  ds: describe stacks
  dc: describe component
  # Aliases for Atmos custom commands
  ls: list stacks
  lc: list components

  # Command-path aliases can add default flags
  terraform: terraform --identity=false
  "terraform apply": terraform apply -auto-approve
  "describe component": describe component --process-functions=false
```

## Using Aliases

Execute an alias as you would any Atmos native or custom command:

```shell
> atmos ls

plat-ue2-dev
plat-ue2-prod
plat-ue2-staging
plat-uw2-dev
plat-uw2-prod
plat-uw2-staging
```

## Aliases in Help

The aliases configured in the `aliases` section automatically appear in Atmos help, shown as `alias for '<command>'`.

## Argument Support

An alias automatically supports all command line arguments and flags that the aliased command accepts.

For example:

| Alias Command | Equivalent To |
|---------------|---------------|
| `atmos up <component> -s <stack>` | `atmos terraform apply <component> -s <stack>` |
| `atmos dc <component> -s <stack>` | `atmos describe component <component> -s <stack>` |

## Command Path Aliases

Aliases are expanded before command parsing. The longest matching command path wins, so aliases can
target subcommands as well as top-level commands. Quote multi-word alias keys in YAML:

```yaml
aliases:
  "terraform apply": terraform apply -auto-approve
```

Running `atmos terraform apply vpc -s dev` is expanded to:

```console
atmos terraform apply -auto-approve vpc -s dev
```

Same-name aliases work like shell aliases and can set command defaults:

```yaml
aliases:
  terraform: terraform --identity=false
```

User-provided command line flags still win because they appear later in the expanded argument list:

```console
atmos terraform plan --identity=true
# expands to:
atmos terraform --identity=false plan --identity=true
```

## Common Aliases

Here are some commonly used aliases:

```yaml
aliases:
  # Terraform shortcuts
  tf: terraform
  tp: terraform plan
  up: terraform apply
  down: terraform destroy

  # Describe shortcuts
  ds: describe stacks
  dc: describe component
  da: describe affected

  # Workflow shortcuts
  wf: workflow

  # List shortcuts (requires custom commands)
  ls: list stacks
  lc: list components
```

## See Also

- [CLI Configuration](/cli/configuration) — Overview of CLI configuration
- [Custom Commands](/cli/configuration/commands) — Create custom Atmos commands
