Toolchain Aliases
Tool aliases provide convenient shorthand names for tools, allowing you to use simple names like terraform instead of the full registry path hashicorp/terraform.
You will learn
- Define short names for frequently used tools
- Multiple aliases can point to the same tool
- Aliases are resolved before registry lookups
- Works with all registry types (Aqua, inline, custom)
- Use aliases with any toolchain command
Basic Configuration
Define aliases in your atmos.yaml:
atmos.yaml
How Aliases Work
Aliases are resolved before registry lookups:
- User runs:
atmos toolchain install terraform@1.9.8 - Atmos checks aliases:
terraform→hashicorp/terraform - Atmos searches registries for
hashicorp/terraform - Tool is installed
Without aliases, you would need to use the full path:
# Without alias
atmos toolchain install hashicorp/terraform@1.9.8
# With alias
atmos toolchain install terraform@1.9.8
Multiple Aliases
Multiple aliases can point to the same tool:
atmos.yaml
All these commands install the same tool:
atmos toolchain install terraform@1.9.8
atmos toolchain install tf@1.9.8
atmos toolchain install hc-terraform@1.9.8
Alias Precedence
Aliases are resolved in this order:
- Exact alias match -
terraform→hashicorp/terraform - Registry search - If no alias, search all registries by priority
- Error - Tool not found in aliases or registries
Common Alias Patterns
HashiCorp Tools
atmos.yaml
Kubernetes Ecosystem
atmos.yaml
Cloud Provider CLIs
atmos.yaml
Terraform Ecosystem
atmos.yaml
Using Aliases in Commands
Aliases work with all toolchain commands:
# Install
atmos toolchain install terraform@1.9.8
atmos toolchain install tf@1.9.8
# Add to .tool-versions
atmos toolchain add terraform@1.9.8
# Remove from .tool-versions
atmos toolchain remove terraform
# Execute
atmos toolchain exec terraform -- version
atmos toolchain exec tf -- version
# Get information
atmos toolchain info terraform
atmos toolchain which tf
# Search
atmos toolchain search terraform
Using Aliases in .tool-versions
Aliases work in .tool-versions files:
.tool-versions
NOTE:
Both terraform and tf resolve to hashicorp/terraform, so they represent the same tool. Use consistent naming to avoid confusion.
Listing Configured Aliases
View all configured aliases:
atmos toolchain aliases
Output:
Configured Toolchain Aliases:
terraform → hashicorp/terraform
tf → hashicorp/terraform
opentofu → opentofu/opentofu
tofu → opentofu/opentofu
kubectl → kubernetes-sigs/kubectl
helm → helm/helm
aws → aws/aws-cli
Aliases with Custom Registries
Aliases work with all registry types:
atmos.yaml
Usage:
# Both work
atmos toolchain install my-tool@1.0.0
atmos toolchain install corp/internal-cli@1.0.0
Complete Example
atmos.yaml
Best Practices
- Use consistent naming - Don't mix aliases and full names in
.tool-versions - Document custom aliases - Add comments in
atmos.yamlfor team awareness - Keep aliases simple - Use common abbreviations (tf, k, tg)
- Avoid conflicts - Don't create aliases that match existing tool names
- Team agreement - Ensure team members use the same aliases
Related Documentation
- Toolchain Overview - Basic toolchain configuration
- Registries - Configure tool registries
- Toolchain Commands - Full command reference