Replace asdf with the Atmos Toolchain
This reference describes how to replace asdf with the Atmos toolchain. For the skill's decision guide, see ../SKILL.md. For the full toolchain feature reference, see atmos-toolchain.
Overview
asdf and the Atmos toolchain read the same file format. Both use .tool-versions, with one
<tool> <version> pair per line.
When you migrate from asdf, you do not need to rewrite this file. The existing .tool-versions
file usually needs no changes.
Two things change: the tool download source and the install method. Atmos downloads tools from an
Atmos or Aqua registry. asdf downloads tools from an asdf plugin. asdf installs tools with the
asdf install command. Atmos installs tools automatically when you run an atmos command.
Before / After
Before (asdf-managed):
# .tool-versionsterraform 1.9.8kubectl 1.28.0helm 3.13.0
asdf plugin add terraformasdf plugin add kubectlasdf plugin add helmasdf install
After (Atmos-managed, same .tool-versions file, unchanged):
# atmos.yamltoolchain:aliases:terraform: hashicorp/terraformkubectl: kubernetes/kubectlhelm: helm/helmregistries:- name: aquatype: aquasource: https://github.com/aquaproj/aqua-registry/pkgsref: v4.550.0priority: 10
atmos toolchain install
Steps
- Leave
.tool-versionsin its current location. If the file is not at the repo root, settoolchain.versions_file(orATMOS_TOOL_VERSIONS) to its path. Do not move the file. - Add a minimal
toolchain:block toatmos.yaml. Add analiases:entry for each tool whose asdf plugin name does not match anowner/repovalue in the public Aqua registry. Also add the public Aqua registry itself as a fallback. See Before/After above for an example. - Verify tool resolution. Run
atmos toolchain installto install every tool declared in.tool-versions. Then runatmos toolchain list. Runatmos toolchain which terraformto confirm the resolved binary path. - Move frequently used tools to
dependencies.tools..tool-versionsis a good default for the whole repository's developer shell. But if a specific component, workflow, or custom command needs a pinned version as part of its contract, declare the tool there instead. See the "Default Rule" and "Where to Declare a Tool" table in atmos-toolchain. This step is optional. It is not required for the migration to work. - Remove the asdf shims last. First confirm that
atmos <command>resolves tools correctly without the shims onPATH. Uninstall asdf plugins (asdf plugin remove <name>) or asdf itself only after the whole team has switched to the Atmos toolchain.
Command Mapping
| asdf command | Atmos toolchain equivalent |
|---|---|
asdf plugin add terraform | No plugin step needed. Add the tool to toolchain.aliases/registries only if the public Aqua registry does not already resolve it. |
asdf install | atmos toolchain install |
asdf install terraform 1.9.8 | atmos toolchain install terraform@1.9.8 |
asdf set -u terraform 1.9.8 (home-level default, asdf 0.16+; asdf global on older asdf) | atmos toolchain set --tool-versions "$HOME/.tool-versions" terraform 1.9.8 (writes the default version to the home-level .tool-versions file) |
asdf set terraform 1.9.8 (current-directory pin, asdf 0.16+; asdf local on older asdf) | atmos toolchain add terraform@1.9.8 (adds/updates the project .tool-versions entry) |
asdf current | atmos toolchain list |
asdf current terraform | atmos toolchain get terraform |
asdf which terraform | atmos toolchain which terraform |
asdf uninstall terraform 1.9.8 | atmos toolchain uninstall terraform@1.9.8 |
asdf plugin list all (browse every short-name plugin) | No exact equivalent. atmos toolchain registry list aqua browses every entry in the public Aqua registry. atmos toolchain registry search <name> matches a specific query instead of browsing everything. |
asdf shell terraform 1.9.8 (session-only override) | atmos toolchain exec terraform@1.9.8 -- <args> (one-off pinned run of the raw binary) |
. ~/.asdf/asdf.sh in shell rc (shim-based, automatic) | eval "$(atmos toolchain env --format=bash)" in shell rc |
Note: atmos terraform, atmos helmfile, and other Atmos commands do not need any of these
steps. These commands resolve and inject declared tool versions automatically. The table above
maps commands for direct, asdf-style interactive use: installing, listing, pinning, and running a
raw third-party binary.
Shell Integration
asdf uses shims to work. The line . "$HOME/.asdf/asdf.sh" in ~/.bashrc or ~/.zshrc adds
~/.asdf/shims to PATH. Each shim reads the nearest .tool-versions file again each time it
runs. As a result, plain terraform always resolves correctly in any shell, IDE terminal, or
script. This works with no per-project setup.
The Atmos toolchain does not do this by default. Atmos resolves and injects tools declared in
.tool-versions (the project-wide default) or dependencies.tools (a scoped override) into PATH
only for the duration of an atmos <subcommand> invocation. If you run plain terraform in your
shell, it will not use the Atmos-managed version. To use the Atmos-managed version in your shell,
you must opt in to shell integration. This is a supported mode, not a limitation. Use
atmos toolchain env to export the resolved PATH into your interactive shell:
Bash (add to ~/.bashrc):
eval "$(atmos toolchain env --format=bash)"
Zsh (add to ~/.zshrc):
eval "$(atmos toolchain env --format=bash)"
Atmos has no separate --format=zsh option. The bash format emits plain POSIX
export PATH=... syntax. Zsh evaluates this syntax identically to bash.
Fish (add to ~/.config/fish/config.fish):
atmos toolchain env --format=fish | source
PowerShell (add to $PROFILE):
Invoke-Expression (atmos toolchain env --format powershell | Out-String)
Verify the result with which terraform (Get-Command terraform on PowerShell). The command must
resolve to the Atmos toolchain install directory, not the system terraform or an asdf shim.
Run atmos commands, including the shell integration commands above, from the directory that
contains atmos.yaml. If your shell is in a different directory, add --chdir /path/to/project
(short form -C /path/to/project) to the command.
Important: atmos toolchain env creates a static snapshot. It does not match asdf's dynamic
per-directory resolution. asdf shims read .tool-versions again on every command. So when you
change directory (cd) into a different project, asdf automatically switches versions. atmos toolchain env sets the resolved paths for the current directory into PATH one time, at eval
time. It does not update automatically when you change directory. Run the eval line again after
you switch projects. Alternatively, use atmos terraform ... instead of bare terraform when you
work across multiple projects. atmos terraform ... always resolves tools per invocation,
regardless of shell state.
Functional Gaps
- Atmos has no equivalent for plugin-specific behavior. asdf plugins can run arbitrary shell
commands during install. These commands can include custom build steps, post-install hooks, and
non-standard download URLs. An Atmos tool is either an Aqua registry entry (GitHub-release or
HTTP download) or a
type: atmosinline registry entry. Atmos has no hook mechanism. Most common CLI tools work through the public Aqua registry without changes. A tool that depends on a custom asdf plugin script can need a customtype: atmosregistry entry. Some such tools cannot migrate to Atmos at all. - The Atmos toolchain has no equivalent to asdf's
.tool-versionssystemsentinel. Thesystemsentinel tells asdf to use the tool already onPATH. Atmos resolves and installs every declared tool instead.
Cross-Links
- atmos-toolchain SKILL.md: full
toolchain:config reference,dependencies.tools, registries, aliases. - atmos-toolchain commands-reference.md: full CLI command reference.