asdf Multi-tool version manager

Version 0.20.2 · source

Start here

asdf plugin add <name>
Add a tool plugin
asdf list all <name>
Available versions
asdf install <name> <version>
Install a version
asdf set <name> <version>
Pin in .tool-versions
asdf current
Versions in use here
asdf list <name>
Installed versions
asdf install
Install all pinned
asdf which <command>
Resolve a binary

Concepts

  1. Plugin knows the tool
  2. Installed version in the data dir
  3. .tool-versions per directory
  4. Command resolved version

Plugins

asdf plugin add <name>
Add a plugin from the official list
asdf plugin add <name> <git-url>
Add a plugin from a Git repo
asdf plugin list
List installed plugins
asdf plugin list --urls --refs
Show plugin URLs and refs
asdf plugin list all
Browse all registered plugins
asdf plugin update --all
Update every plugin
asdf plugin update <name>
Update one plugin
asdf plugin remove <name>
Remove a plugin and its versions
Also deletes every installed version of that tool.

Install versions

asdf list all <name>
List all available versions
asdf list all <name> <prefix>
Filter available versions
asdf install <name> <version>
Install a specific version
asdf install <name> latest
Install the latest stable
asdf install <name> latest:<prefix>
Latest matching a prefix
asdf install <name>
Install the version in .tool-versions
asdf install
Install everything in .tool-versions
asdf latest <name>
Show the latest stable version
asdf latest --all
Latest versions of all tools
asdf uninstall <name> <version>
Remove an installed version
asdf help <name> [<version>]
Show plugin help and notes

Select versions

asdf set <name> <version>
Pin version in ./.tool-versions
asdf set -u <name> <version>
Pin in the home .tool-versions
Replaces the old asdf global.
asdf set -p <name> <version>
Pin in the nearest parent file
asdf set <name> <version> <fallback>
Pin several versions in order
asdf current
Show versions in use here
asdf current <name>
Show version of one tool
asdf list <name>
List installed versions
asdf list <name> <prefix>
Filter installed versions
asdf where <name> [<version>]
Print the install path
asdf which <command>
Print the path to an executable

Shims and utilities

asdf reshim <name> <version>
Rebuild shims for a version
asdf exec <command>
Run a shim with the current version
asdf env <command>
Print the shim environment of a command
asdf shimversions <command>
Which plugins provide a command
asdf info
Print OS, shell and asdf debug info
asdf version
Print the asdf version
.tool-versions lines
Line Meaning
nodejs 22.4.0 Exact version
python 3.12.4 3.11.9 First found wins, rest fallback
ruby latest Resolved at use time
golang system Use the system binary
# note Comment

Recipes

Set up a tool in a project
asdf plugin add nodejsasdf install nodejs latest:22asdf set nodejs 22.4.0asdf current
Bootstrap from a checkout
# add every plugin named in .tool-versionscut -d' ' -f1 .tool-versions | grep -v '^#' | xargs -n1 asdf plugin addasdf install
Refresh everything
asdf plugin update --allasdf latest --all
Clean out an old version
asdf list nodejsasdf uninstall nodejs 18.20.0asdf reshim nodejs