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.
Aliases also provide the tool target for toolchain proxies, such as mapping coreutils to uutils/coreutils before exposing an ls command.
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:
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:
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
Kubernetes Ecosystem
Cloud Provider CLIs
Terraform Ecosystem
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:
Both terraform and tf resolve to hashicorp/terraform, so they represent the same tool. Use consistent naming to avoid confusion.
Listing Configured Aliases
Use atmos toolchain aliases to list effective built-in and configured aliases. Configured aliases take precedence when names overlap.
atmos toolchain aliases
atmos toolchain aliases --format=json
atmos toolchain aliases --format=yaml
The default table is sorted by alias name. JSON and YAML output are alias-to-target mappings. Targets are shown as defined; listing does not resolve alias chains, query registries, or install tools.
Aliases with Custom Registries
Aliases work with all registry types:
Usage:
# Both work
atmos toolchain install my-tool@1.0.0
atmos toolchain install corp/internal-cli@1.0.0
Complete Example
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