asdf(1)
asdf is a version manager that lets you install and switch between multiple versions of programming languages and tools.
Synopsis
asdf [COMMAND] [OPTIONS]Description
asdf is an extensible version manager supporting Ruby, Node.js, Elixir, Erlang, and many other languages through a plugin system. It manages multiple versions of tools in isolated environments, allowing per-project version pinning via .tool-versions files.
Unlike language-specific managers (rbenv, nvm), asdf provides a unified interface for all tools. Plugins add support for new languages; the community maintains official plugins for popular tools.
Common options
| Flag | What it does |
|---|---|
install <name> <version> | Install a specific version of a tool |
uninstall <name> <version> | Remove an installed version |
list <name> | Show installed versions of a tool |
list-all <name> | List all available versions for a tool |
global <name> <version> | Set the global default version for a tool |
local <name> <version> | Set the local project version (creates .tool-versions) |
current <name> | Show the currently active version of a tool |
plugin-list | List all installed plugins |
plugin-add <name> <url> | Install a plugin from a repository |
reshim <name> <version> | Rebuild shims for a specific version |
Examples
Add the official Node.js plugin to asdf
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.gitFind the latest Node.js 18.x version available
asdf list-all nodejs | grep '^18' | tail -1Install Node.js version 18.16.0
asdf install nodejs 18.16.0Set Node.js 18.16.0 as the global default
asdf global nodejs 18.16.0Pin Node.js 16.14.0 for the current project only
cd ~/my-project && asdf local nodejs 16.14.0Show which Node.js version is active now
asdf current nodejsDisplay all installed Node.js versions
asdf list nodejsShow all installed language/tool plugins
asdf plugin-list