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.

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 $(asdf latest k3d)
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