atmos ai skill install atmos-toolchainAtmos Toolchain
Purpose
The Atmos toolchain manages CLI tool installation and versioning natively, using the Aqua package registry ecosystem. It replaces external version managers (asdf, mise, aqua CLI) with a built-in system that integrates directly with atmos.yaml configuration.
Default Rule
Declare tool requirements where they are used, then run the owning Atmos command. Do not add
atmos toolchain install before component, workflow, custom-command, or hook execution when the
tool can be declared with dependencies.tools. Atmos installs missing declared tools and injects
them into PATH for that execution context.
Use explicit atmos toolchain install only for shell bootstrap, cache warming, ad-hoc
troubleshooting, or job-level tools that are not owned by a component, workflow, custom command, or hook.
Agents repeatedly get two things wrong here: putting an operation-specific tool version only in
.tool-versions, and wrapping atmos itself in atmos toolchain exec. Both are covered below.
❌ Wrong — a component needs a pinned Terraform version, declared only in .tool-versions:
# .tool-versionsterraform 1.10.3
This is a repo-wide default. Nothing ties it to the vpc component, so a different component (or a
different environment's .tool-versions) can silently drift the version this component actually needs.
✅ Right — pin it on the component that requires it:
components:terraform:vpc:dependencies:tools:terraform: "1.10.3"
.tool-versions still sets the repo-wide developer-shell default; dependencies.tools overrides it for
this component's execution context, and travels with the component if it's vendored or reused elsewhere.
Core Concepts
.tool-versions File
The .tool-versions file (asdf-compatible format) declares which tools and versions a project needs:
terraform 1.9.8opentofu 1.10.3kubectl 1.28.0helm 3.13.0jq 1.7.1
- One tool per line, format:
toolname version [version2 version3...] - Multiple versions per tool are supported; first version is the default
- File location: project root (default), overridable via
toolchain.versions_filein atmos.yaml,--tool-versions, orATMOS_TOOL_VERSIONS
Use .tool-versions for repo-wide developer shell defaults and general tools that every developer,
agent, or interactive shell should see. Atmos can auto-install these defaults for custom commands and
shell integration, but .tool-versions is not the preferred home for operation-specific requirements.
Use dependencies.tools when the tool is part of a stack/component/workflow/command contract. Those
dependencies are installed and injected into that execution context and can override .tool-versions
defaults. Do not rely on .tool-versions alone when CI or a stack requires a specific Terraform,
OpenTofu, scanner, or generator version.
Where to Declare a Tool
| Need | Preferred declaration |
|---|---|
| Component needs Terraform/OpenTofu, scanner, or generator | Stack/component dependencies.tools |
| Workflow step needs a CLI | Workflow dependencies.tools |
Custom command invokes a CLI such as bat, tree, jq, or checkov | Command dependencies.tools |
| Hook invokes a scanner or custom binary | Component dependencies.tools for the hooked component |
| One-off local shell, manual verification, or cache warm | atmos toolchain install plus atmos toolchain env |
Tool Installation Path
By default, tools are installed in the XDG data directory for Atmos, such as
~/.local/share/atmos/toolchain on Linux/macOS. If the XDG data directory cannot be created, Atmos
falls back to .tools in the current project.
Installed tools use this layout under the selected install path:
<install-path>/bin/{os}/{tool}/{version}/{binary}
Override the install path with toolchain.install_path in atmos.yaml or ATMOS_TOOLCHAIN_PATH
when tools must be stored in a project-local, shared, or cached directory.
Registries
Atmos supports three registry types for discovering and downloading tools:
Aqua Registry -- The primary source, providing 1,000+ tools:
registries:- name: aquatype: aquasource: https://github.com/aquaproj/aqua-registry/tree/main/pkgspriority: 10
Inline (Atmos) Registry -- Define tools directly in atmos.yaml:
registries:- name: customtype: atmospriority: 150tools:owner/repo:type: github_releaseurl: "asset_{{.Version}}_{{.OS}}_{{.Arch}}"format: tar.gz
File-Based Registry -- Local or remote Aqua-format files:
registries:- name: corporatetype: aquasource: file://./custom-registry.yamlpriority: 100
Priority System: Higher numbers are checked first. First match wins. Typical ordering: inline (150) > corporate (100) > public aqua (10).
Aliases
Map short names to fully qualified tool identifiers:
toolchain:aliases:terraform: hashicorp/terraformtf: hashicorp/terraformkubectl: kubernetes-sigs/kubectl
Package Verification
Atmos verifies downloaded packages before extraction when Aqua or inline registry metadata provides checksums, signatures, or attestations. Defaults are non-breaking: verify when metadata exists, allow packages without metadata.
toolchain:verification:checksums: when_available # when_available | required | disabledsignatures: when_available # when_available | required | disabledverifier_install: auto # auto | path_only
Supported methods: checksums (sha256, sha512, sha1, md5), cosign, slsa-verifier,
GitHub artifact attestations via gh, and minisign.
Configuration in atmos.yaml
toolchain:install_path: .tools # Optional override; default is XDG data dirversions_file: .tool-versions # Path to version filealiases:terraform: hashicorp/terraformtf: hashicorp/terraformregistries:# Inline tools (highest priority)- name: my-toolstype: atmospriority: 150tools:jqlang/jq:type: github_releaseurl: "jq-{{.OS}}-{{.Arch}}"# Aqua registry (fallback)- name: aquatype: aquasource: https://github.com/aquaproj/aqua-registry/tree/main/pkgspriority: 10verification:checksums: when_availablesignatures: when_availableverifier_install: auto
Key Commands
Manual Installation and Cleanup
atmos toolchain install # Bootstrap/cache warm tools from .tool-versionsatmos toolchain install terraform@1.9.8 # Ad-hoc install for shell use or troubleshootingatmos toolchain uninstall terraform@1.9.8 # Remove installed toolatmos toolchain clean # Remove all installed tools and cache
Prefer dependencies.tools for normal Atmos execution. Component, workflow, custom-command, and hook
runs install missing declared tools automatically.
Version Management
atmos toolchain add terraform # Add tool to .tool-versions (latest)atmos toolchain add terraform@1.9.8 # Add with specific versionatmos toolchain remove terraform # Remove from .tool-versionsatmos toolchain set terraform 1.9.8 # Set default versionatmos toolchain get terraform # Get version from .tool-versions
Discovery
atmos toolchain search terraform # Search across registriesatmos toolchain info hashicorp/terraform # Display tool configurationatmos toolchain list # Show installed toolsatmos toolchain which terraform # Show full path to binaryatmos toolchain du # Show disk usage
Execution
atmos toolchain exec terraform@1.9.8 -- plan # Run specific versionatmos toolchain env --format=bash # Export PATH for shellatmos toolchain path # Print PATH entries
Anti-pattern: never run atmos toolchain exec -- atmos .... Every atmos command is already
toolchain-aware — it resolves and injects declared tool paths for its own execution automatically (see
"Default Rule" above). Wrapping atmos in atmos toolchain exec is redundant at best and a sign the
tool declaration is missing at worst. toolchain exec exists only to run a third-party binary
(terraform, kubectl, a scanner CLI) directly, pinned to a specific managed version, outside of an
atmos-orchestrated command — never to invoke atmos itself.
If a workflow/custom-command/hook step needs to confirm a tool is present on PATH without
installing it, use the require step type (alias assert) instead of dependencies.tools (which
auto-installs) or a hand-rolled command -v shell check — see atmos-workflows for the tools:/files:/
dirs: config.
Registry Management
atmos toolchain registry list # List all registriesatmos toolchain registry list aqua # List tools in specific registryatmos toolchain registry search jq # Search across registries
Environment Variables
| Variable | Description |
|---|---|
ATMOS_GITHUB_TOKEN / GITHUB_TOKEN | GitHub token for higher API rate limits |
ATMOS_TOOL_VERSIONS | Override .tool-versions file path |
ATMOS_TOOLCHAIN_PATH | Override tool installation directory |
ATMOS_TOOLCHAIN_ENV_FORMAT | Default format for env command |
Precedence Order
- CLI flags (highest)
- Environment variables
- atmos.yaml configuration
- XDG data directory
.toolsfallback
Shell Integration
If you only ever run atmos <subcommand>, you do not need shell integration — Atmos resolves and
injects declared tool paths for its own execution automatically. Shell integration is only for getting
the raw tool binary directly into an interactive shell or a non-Atmos script (e.g. running terraform
by hand outside of atmos terraform ...).
Add to ~/.bashrc or ~/.zshrc for automatic PATH setup:
eval "$(atmos toolchain env --format=bash)"
Other shell formats: --format=fish, --format=powershell, --format=github (for CI).
For shells where evaluation is not desirable, prepend the generated toolchain path directly:
export PATH="$(atmos toolchain path):$PATH"
Set ATMOS_TOOLCHAIN_PATH when the installed-tools directory must be shared, cached, or moved outside
the repo checkout:
export ATMOS_TOOLCHAIN_PATH="$HOME/.cache/atmos/tools"eval "$(atmos toolchain env --format=bash)"
In GitHub Actions, use the GitHub format only when later job-level steps need direct shell access to
toolchain binaries. When $GITHUB_PATH is available, Atmos appends toolchain paths to it automatically:
- name: Add toolchain paths for later job-level scriptsrun: atmos toolchain env --format=github
Tool Dependencies in Atmos Config
Declare tool dependencies close to the thing that needs them. Atmos installs missing tools from the
toolchain registry and injects them into the command environment. Use these dependencies for tools
required by stacks, components, workflows, and custom commands; use .tool-versions for general
project tools.
# Top-level defaultsdependencies:tools:aws-cli: "^2.0.0"# Component-type defaultsterraform:dependencies:tools:terraform: "~> 1.10.0"tflint: "^0.54.0"# Component-specific toolscomponents:terraform:vpc:dependencies:tools:terraform: "1.10.3"checkov: "latest"# Workflow toolsworkflows:validate:dependencies:tools:tflint: "^0.54.0"# Custom command toolscommands:- name: scandependencies:tools:checkov: "3.0.0"
Use exact versions for reproducible CI, SemVer ranges for managed upgrade windows, and latest
only for non-production workflows where drift is acceptable.
In Atmos CI, prefer dependencies.tools over GitHub setup actions such as
hashicorp/setup-terraform or opentofu/setup-opentofu. Setup actions install a runner-level binary,
while Atmos tool dependencies travel with the stack, component, workflow, or command that requires
the tool and are injected into that execution context. If an agent is about to add
atmos toolchain install <tool> to CI, first check whether the tool belongs on the component,
workflow, or custom command that invokes it.
Custom Registries in atmos.yaml
Add your own tools under toolchain.registries when the public Aqua registry does not define them.
Use a high-priority type: atmos registry for inline definitions, and keep the public Aqua registry
as a fallback:
toolchain:aliases:policyctl: company/policyctlregistries:- name: companytype: atmospriority: 150tools:company/policyctl:type: github_releaseurl: "policyctl_{{.Version}}_{{.OS}}_{{.Arch}}.tar.gz"format: tar.gzbinary_name: policyctl- name: aquatype: aquasource: https://github.com/aquaproj/aqua-registry/tree/main/pkgspriority: 10
For shared registry files, use type: aqua with a local or remote source and a higher priority than
the public registry:
toolchain:registries:- name: company-registrytype: aquasource: file://./toolchain/company-registry.yamlpriority: 100
Template Variables in Registries
Aqua and inline registries support Go templates in asset URLs:
| Variable | Description |
|---|---|
{{.Version}} | Full version string |
{{trimV .Version}} | Version without 'v' prefix |
{{.OS}} | Operating system (linux, darwin, windows) |
{{.Arch}} | Architecture (amd64, arm64) |
Common Patterns
Project Setup
# atmos.yamltoolchain:aliases:terraform: hashicorp/terraformkubectl: kubernetes-sigs/kubectlregistries:- name: aquatype: aquasource: https://github.com/aquaproj/aqua-registry/tree/main/pkgspriority: 10
# .tool-versionshashicorp/terraform 1.9.8kubernetes-sigs/kubectl 1.28.0helmfile/helmfile 0.168.0
Tools declared on components, workflows, and commands are installed when those operations run. Use
atmos toolchain list to inspect local installs; use atmos toolchain install only to pre-warm a
developer shell or CI cache.
CI/CD Integration
# GitHub Actions: normal Atmos operation, no preinstall step needed- run: atmos terraform plan vpc -s prod# Optional: expose already-managed tool paths to later non-Atmos shell steps- run: atmos toolchain env --format=github
Custom Tool Registry
toolchain:registries:- name: internaltype: atmospriority: 150tools:company/internal-tool:type: github_releaseurl: "internal-tool_{{.Version}}_{{.OS}}_{{.Arch}}.tar.gz"format: tar.gz- name: aquatype: aquasource: https://github.com/aquaproj/aqua-registry/tree/main/pkgspriority: 10
Unsupported Aqua Features
These Aqua features are intentionally not supported to keep Atmos focused:
github_content,github_archive,go_build,cargopackage typesversion_filter,version_exprversion manipulationimport(use multiple registries instead)command_aliases(usetoolchain.aliasesin atmos.yaml)