Manage software language versions with ease

asdf is now known as asdf-vm (asdf version manager) and you can check the website or jump to the code base on GitHub.

asdf-vm cheatsheet

with Ruby as an example:

$ asdf plugin add ruby
$ asdf list all ruby
$ asdf install ruby 2.6.6
$ asdf list ruby

# Set Current Version
# global overwrite with this command, but please do this only if you know what consequences it brings.
# global writes the version to $HOME/.tool-versions.
# $ asdf global <name> <version> [<version>...]
# set the ruby version for a project:
# local writes the version to $PWD/.tool-versions, creating it if needed.
$ asdf local <name> <version> [<version>...]

Installation and system integration

It is installed really quick and will do all the hustle for you. User of Mac OS Catalina which comes with zsh as the default shell will most likely use oh-my-zsh and all you need to do is enable the plugin.

But it works just as well with bash or fish.

$ vi ~/.zshrc

Here are the plugins I load:

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git bundler dotenv osx rake ruby asdf docker docker-compose yarn npm)

asdf-vm and nodejs

when it comes to installing nodejs, there might be an error, which is easily fixed by hacking this into your terminal:

bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring