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


This content originally appeared on DEV Community and was authored by Mainendra

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

for details refer to - getting started

Update path (for zsh shell)

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

for other shells refer to - getting started

Install plugin (nodejs)

asdf plugin add nodejs

other supported plugins

Install node latest version

asdf install nodejs latest

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

To use any folder specific local version

cd local_folder
asdf local nodejs 20.12.0

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

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 🎉


This content originally appeared on DEV Community and was authored by Mainendra


Print Share Comment Cite Upload Translate Updates
APA

Mainendra | Sciencx (2024-07-13T13:59:08+00:00) asdf (what?? 🤔). Retrieved from https://www.scien.cx/2024/07/13/asdf-what-%f0%9f%a4%94/

MLA
" » asdf (what?? 🤔)." Mainendra | Sciencx - Saturday July 13, 2024, https://www.scien.cx/2024/07/13/asdf-what-%f0%9f%a4%94/
HARVARD
Mainendra | Sciencx Saturday July 13, 2024 » asdf (what?? 🤔)., viewed ,<https://www.scien.cx/2024/07/13/asdf-what-%f0%9f%a4%94/>
VANCOUVER
Mainendra | Sciencx - » asdf (what?? 🤔). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/13/asdf-what-%f0%9f%a4%94/
CHICAGO
" » asdf (what?? 🤔)." Mainendra | Sciencx - Accessed . https://www.scien.cx/2024/07/13/asdf-what-%f0%9f%a4%94/
IEEE
" » asdf (what?? 🤔)." Mainendra | Sciencx [Online]. Available: https://www.scien.cx/2024/07/13/asdf-what-%f0%9f%a4%94/. [Accessed: ]
rf:citation
» asdf (what?? 🤔) | Mainendra | Sciencx | https://www.scien.cx/2024/07/13/asdf-what-%f0%9f%a4%94/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.