Manage tools versions with asdf
In order to install binaries and to be able to switch from a version to another I like to use asdf.
📥 Installation
The recommended installation is to use Git as follows
1git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0
Then depending on your shell here are the remaining steps to follow
1. $HOME/.asdf/asdf.sh
And you may want to configure the shell completion
1. $HOME/.asdf/completions/asdf.bash
🚀 Let's take an example
List all available plugins and look for k3d
1asdf plugin-list-all | grep k3d
2k3d https://github.com/spencergilbert/asdf-k3d.git
Let's install k3d
1asdf plugin-add k3d
Check the versions available
1asdf list-all k3d| tail -n 3
25.4.0-dev.3
35.4.0
45.4.1
We'll install the latest version
1asdf install k3d latest
2* Downloading k3d release 5.4.1...
3k3d 5.4.1 installation was successful!
Finally we can switch from a version to another. We can set a global
version that would be used on all directories.
1asdf global k3d 5.4.1
or use a local
version depending on the current directory
1cd /tmp
2asdf local k3d 5.4.1
3
4asdf current k3d
5k3d 5.4.1 /tmp/.tool-versions
🧹 Cleanup
Uninstall a given version
1asdf uninstall k3d 5.4.1
Remove a plugin
1asdf plugin remove k3d