Manage all your runtime versions with one tool (asdf, mise)
I’ve recently seen some posts on LinkedIn about managing multiple Java versions with things like sdkman or jenv. Don’t get me wrong, those tools are doing the job well and really useful. But I just thought about how many people are still using different version managers from different tools (sdkman, nvm, rbenv, that list can go on and on).
asdf
This is just a reminder that things like asdf exist and it’s doing what it’s promising: a single tool to manage all runtimes. It is also really extensible as you can easily add your tool as well by writing a simple plugin, nothing too scary, it’s just a bit of scripts that define how you can list versions of your tool and how you can download it to install. In reality, it’s a rare case when you need to write your own plugin due to a huge list of community plugins available.
I have a video about using asdf on the channel, so it’s a good starting point:
mise (rtx previously)
Also in the comments for that video, there was a suggestion to try a different tool called mise (known as rtx before).
It is the same idea (fully compatible with asdf) but written in Rust and it is trying to solve some known issues of asdf (performance, CLI UX, etc). More information can be found here: https://mise.jdx.dev/dev-tools/comparison-to-asdf.html
A short demo of using mise:
If you were using rtx previously, check this link: https://mise.jdx.dev/rtx.html
The cool thing is that you can also manage your global versions of tools. I already see a great use case for the future. Next time when I have to set up a new laptop, I can just install mise, copy ~/.config/mise/config.toml
file and run mise install
. I’ll instantly get the same working environment as before. If a project requires different versions, they will be defined in a local .mise.toml
file, and mise will automatically install the required versions when you go into those directories.
I highly recommend you at least try those tools as they are convenient in practice (not just on paper), mise has great docs and it’s a great starting point!