Forem

Cover image for asdf (what?? 🤔)
Mainendra
Mainendra

Posted on

asdf (what?? 🤔)

asdf - the multiple runtime version manager

Why asdf?

  • Simple to install and maintain.
  • Easy to switch runtime (e.g. nodejs) version, just cd into directory
  • one tool for most common runtime needed for development

Installation

brew install asdf
Enter fullscreen mode Exit fullscreen mode

for details refer to - getting started

Update path (for zsh shell)

echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc
Enter fullscreen mode Exit fullscreen mode

for other shells refer to - getting started

Install plugin (nodejs)

asdf plugin add nodejs
Enter fullscreen mode Exit fullscreen mode

other supported plugins

Install node latest version

asdf install nodejs latest
Enter fullscreen mode Exit fullscreen mode

user version number instead of latest for any specific version

e.g. asdf install nodejs 20.12.0

To use any globally everywhere

asdf global nodejs latest
Enter fullscreen mode Exit fullscreen mode

To use any folder specific local version

cd local_folder
asdf local nodejs 20.12.0
Enter fullscreen mode Exit fullscreen mode

config file

  • Global version versions config normally available under home folder (~/.tool-versions)
  • Local version will be under specific local folder same file name .tool-versions

config file format

deno 1.44.4
nodejs 20.12.2
rust 1.79.0
yarn 1.22.22
pnpm 9.4.0
Enter fullscreen mode Exit fullscreen mode

for another other details refer to documentation on asdf-vm.com

Note

Don't forget to run asdf reshim after installing global packages (e.g. npm install -g <tool_name>, cargo install <tool_name>, etc)

HAPPY CODING 🎉

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

đź‘‹ Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay