asdf: The Best Version Manager
What's the best version manager today? asdf.
What is a Version Manager
Manage what? Runtimes. So, I guess it's a runtime version manager.
What's a runtime? A platform you build and/or run your code on, like Node.js, Ruby or Java.
For a version manager, you'd usually be talking about something like "Node.js Version Manager" and get nvm
. Or "Ruby Version Manager" and get rvm
.
In the case of asdf
, you get to manage hundreds of runtimes. See:
❯ asdf plugin list all | wc -l
685
And the best thing: You get a common interface for all of these runtimes. The same commands you'd use to install and use a version of nodejs will be the same commands that you use for python, etc.
Throw away your other version managers, install asdf, and get started.
Commands
asdf
- see all available commands
asdf plugin list all
- see available runtimes
asdf plugin add babashka
- add the ability to install a particular runtime (eg, babashka)
asdf list all babashka
- show all versions of a particular runtime that you could install
asdf install babashka 1.3.184
- install a particular version of your runtime
asdf local babashka 1.3.184
- set a version of the runtime to use in your project (generates a .tool-versions
file)
asdf global babashka 1.3.184
- set a version of the runtime to use globally (in absence of .tool-versions
)
asdf current
- see what runtime versions you're using at the current path
It's a little different than the varied interfaces of other runtime version managers, but once accustomed, you'll get many miles from this one.