I am a simple man, I want to keep things simple, I want to clone a project from GitHub and it to Just Work™. Over time, my projects have ended up using different languages and different versions.

A chalkboard with different languages

This was fine when I was just using Ruby for a single project but as I used multiple versions of Ruby, I needed rvm or rbenv. Adding in frontends, I needed to manage Node versions, so I installed nvm. Then I started to need different DB versions. It was a mess… When I was consulting, it wasn’t uncommon for me to work on multiple projects in a year with different Ruby, Node, PostGres, Redis, MySQL, ElasticSearch, etc. within a single year. Once someone stumbled across ASDF, nearly everyone including myself adopted it pretty quickly.

Docker, Vagrant or Dev Containers could help get around this, but using an Apple Silicon MacOS means they run pretty slow, if the container can run at all. So I now mostly use ASDF to manage my project’s versions. It is open source with a large developer community behind it. It allows me to use just one set of commands to manage the versions of languages and tools I need with.

Officially supports (As of January 2023):

  • Ruby
  • Erlang
  • Elixir
  • NodeJS

ASDF also provides a way to develop plugins to add your own languages and binaries.

Some 3rd party plugins that I have used are:

  • Redis
  • MySQL
  • Postgres
  • ElasticSearch
  • Rust
  • Go
  • Poetry

It has been great for working on my projects. I can quickly switch between projects and not need to think about changing my tool versions. Coupled with Make, it keeps everything very simple.

In one of my more complex projects, the ASDF config (.tool-versions) looks like:

python 3.10.2
poetry 1.3.2
redis 6.2.5
postgres 14.0

I cd into that directory and those binaries with the correct version are already ready for me to develop. It works across multiple operating systems, sometimes I develop on my Mac and sometimes on my Ubuntu box. I can even use it in my Docker images to set up multiple languages.

That being said, on some of my projects a development environment as close as possible to staging/production is required. In that case the speed penalty of using Docker might be worth the cost. If you don’t have many projects and/or the version numbers aren’t important, using your system or the language specific version manager might be a better choice. Although there are a lot of plugins for ASDF, there are some languages that aren’t supported.

All-in-all, I am fully sold on ASDF. It is great for local development, particularly when the requirements can be managed with a package manage. Once you have it installed, you might as well use it for all projects.