Navigate back to the homepage

Replace nvm, rvm, and others with asdf-vm, the best version manager

Jaime Martínez Rincón
June 27th, 2020 · 2 min read

Today trying to improve my nvm and rvm installations I stumbled upon asdf-vm. This tool is all the version managers you can think of included in a nice and modular package that works perfectly.

Under the hood, this tool works by creating shims (or wrappers, if you wish) of the version of the tool you want to use. Unlike nvm, rvm, rbenv or some other tools, this one does not do heavy logic on the shell’s startup and therefore it doesn’t slow your terminal startup.

In my opinion, this tool is better than any and all version managers out there, here are some reasons why:

  • Easy to install, it’s just a command and one line that you have to add to your shells rc file, like .bashrc, .zshrc, etc.

  • It’s really easy and straightforward to use, and pretty much everything I needed worked straight out of the box, as all things should.

  • It has a simple yet concise documentation, it has served me well when learning to use this tool.

  • It doesn’t wrap the cd command like rvm, which is not a good thing to do.

  • You don’t have to execute a “use” command, like nvm use, rvm use, etc. It’s automatic and done when you actually use the desired tool.

  • It’s as fast as it can get for a version manager of this caliber, this is thanks to not having to do heavy logic when the shell starts. That stuff is done when you try to use node, ruby, go or any other tool that is provided by the plugins you installed to asdf.

  • It’s supported by all JetBrains IDEs, to the same level as nvm, rvm, rbenv or similar tools.

  • It supports a list of default global nodejs packages, so you can make packages like eslint, typescript install globally by default when you install a new version of nodejs.

  • At the time of writing, this tool supports 213 languages or tools, the ones I use or will use include nodejs, ruby, gohugo, golang, java, and python. You can see a full list of the supported tools in its website. This is all thanks to the community around this project.

  • You can enable support for legacy files like .nvmrc or .ruby-version. You won’t need to change them as long as they reference the full version (not just major or any other reference that is not just the semver reference)

  • It supports installing the latest version of a tool, for example, you can install the latest revision of the 10th major version of node by running asdf install nodejs 10:latest (note that this isn’t supported in legacy files like .nvmrc, you have to specify the full version)

  • It’s modular and easy to extend if you want to add support for a new tool.

I strongly recommend anyone dealing with multiple versions of the tools they use in their workflow to uninstall all the version managers they use and start using asdf-vm, it’s an awesome tool and I think I won’t go back to nvm, rvm or other tools again, I’m sticking with asdf forever ❤️.

More articles from Jaime Martínez Rincón

Automatically make git clone use ssh instead of https

The reason There are multiple ways to set your repository remote or clone a repository. You can do it through https , ssh and git…

June 27th, 2020 · 1 min read

Fix Visual Studio Code freezing when deleting

If you have ever used an Electron-based application that deletes files or directories by moving them to the trash bin under KDE or other Qt…

May 16th, 2020 · 1 min read
© 2020 Jaime Martínez Rincón
Link to $ to $ to $ to $