Convert Figma logo to code with AI

asdf-vm logoasdf

Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

21,553
767
21,553
198

Top Related Projects

78,700

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

16,029

Manage your app's Ruby environment

38,567

Simple Python version management

The SDKMAN! Command Line Interface

Quick Overview

asdf-vm/asdf is a versatile version manager for multiple programming languages and tools. It allows developers to manage multiple runtime versions of various languages and tools on a per-project basis, providing a unified interface for version management across different technologies.

Pros

  • Supports multiple programming languages and tools in a single, consistent interface
  • Allows for easy switching between different versions of languages/tools
  • Provides a plugin system for extending support to additional languages and tools
  • Enables version management on a per-project basis

Cons

  • Initial setup and configuration can be more complex compared to language-specific version managers
  • May have a steeper learning curve for users accustomed to single-language version managers
  • Requires manual installation of plugins for each language/tool
  • Performance may be slightly slower compared to dedicated version managers

Getting Started

To install asdf, follow these steps:

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc
source ~/.bashrc

To install a plugin and a specific version of a tool:

asdf plugin add nodejs
asdf install nodejs 14.17.0
asdf global nodejs 14.17.0

To set a version for a specific project:

cd /path/to/your/project
asdf local nodejs 14.17.0

This creates a .tool-versions file in your project directory, specifying the version to use for that project.

Competitor Comparisons

78,700

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Pros of nvm

  • Specialized for Node.js, offering a more streamlined experience for Node.js developers
  • Extensive community support and widespread adoption in the Node.js ecosystem
  • Simpler setup and usage for those primarily working with Node.js

Cons of nvm

  • Limited to managing Node.js versions only
  • Lacks support for other programming languages and tools
  • Requires separate tools for managing versions of other languages or runtimes

Code Comparison

nvm:

nvm install 14.17.0
nvm use 14.17.0
nvm alias default 14.17.0

asdf:

asdf plugin add nodejs
asdf install nodejs 14.17.0
asdf global nodejs 14.17.0

Summary

nvm is a specialized tool for managing Node.js versions, offering a straightforward experience for Node.js developers. It benefits from extensive community support and widespread adoption in the Node.js ecosystem. However, its scope is limited to Node.js only.

asdf, on the other hand, is a more versatile version manager that supports multiple programming languages and tools. It provides a unified interface for managing versions across different technologies, making it a more comprehensive solution for developers working with multiple languages. While it may have a slightly steeper learning curve, asdf offers greater flexibility and extensibility for diverse development environments.

16,029

Manage your app's Ruby environment

Pros of rbenv

  • Lightweight and focused solely on Ruby version management
  • Seamless integration with Ruby ecosystem tools
  • Simpler setup and configuration for Ruby-specific projects

Cons of rbenv

  • Limited to managing only Ruby versions
  • Requires separate tools for managing other language versions
  • Less flexibility for polyglot development environments

Code Comparison

rbenv:

# Install Ruby version
rbenv install 3.1.0

# Set global Ruby version
rbenv global 3.1.0

# Set local Ruby version
rbenv local 3.1.0

asdf:

# Install Ruby version
asdf install ruby 3.1.0

# Set global Ruby version
asdf global ruby 3.1.0

# Set local Ruby version
asdf local ruby 3.1.0

Key Differences

  • rbenv is specialized for Ruby, while asdf is a multi-language version manager
  • asdf requires plugins for each language, whereas rbenv is ready to use for Ruby out of the box
  • rbenv integrates more deeply with Ruby-specific tools and workflows
  • asdf offers a consistent interface for managing multiple programming languages
  • rbenv may have a slight performance edge for Ruby-only projects due to its focused nature

Both tools are well-maintained and popular in their respective domains, with rbenv being the go-to choice for Ruby-centric developers and asdf appealing to those working with multiple languages.

38,567

Simple Python version management

Pros of pyenv

  • Specialized for Python, offering deeper integration and Python-specific features
  • Simpler setup and usage for Python-only projects
  • Supports creating virtual environments directly

Cons of pyenv

  • Limited to Python version management only
  • Requires separate tools for managing other language versions
  • Less flexible for multi-language projects

Code Comparison

pyenv:

pyenv install 3.9.5
pyenv global 3.9.5
pyenv virtualenv 3.9.5 myproject
pyenv activate myproject

asdf:

asdf plugin add python
asdf install python 3.9.5
asdf global python 3.9.5
python -m venv myproject
source myproject/bin/activate

Both tools allow for easy installation and switching between Python versions. However, pyenv provides a more streamlined approach for creating and managing virtual environments, while asdf requires using Python's built-in venv module or additional tools.

asdf offers a more versatile solution for managing multiple programming languages, making it suitable for projects that involve multiple technologies. On the other hand, pyenv focuses solely on Python, providing a more specialized and potentially simpler experience for Python-centric development.

The choice between pyenv and asdf depends on the project requirements and personal preferences. pyenv is ideal for Python-only projects, while asdf is better suited for multi-language development environments.

The SDKMAN! Command Line Interface

Pros of SDKMAN

  • Specialized for JVM-based languages and tools
  • Simpler installation process (single-line curl command)
  • Built-in support for Java-specific features like setting JAVA_HOME

Cons of SDKMAN

  • Limited to JVM ecosystem, less versatile than ASDF
  • Fewer plugins available compared to ASDF's extensive plugin ecosystem
  • Less flexible in managing non-JVM tools and languages

Code Comparison

SDKMAN installation:

curl -s "https://get.sdkman.io" | bash

ASDF installation:

git clone https://github.com/asdf-vm/asdf.git ~/.asdf
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc

SDKMAN usage:

sdk install java 11.0.12-open
sdk use java 11.0.12-open

ASDF usage:

asdf plugin add java
asdf install java openjdk-11.0.2
asdf global java openjdk-11.0.2

Both SDKMAN and ASDF are version management tools, but they cater to different needs. SDKMAN is more focused on the Java ecosystem, providing a streamlined experience for JVM developers. ASDF, on the other hand, offers a more versatile approach, supporting a wide range of programming languages and tools through its plugin system. The choice between the two depends on the specific requirements of the developer and the project at hand.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

asdf Lint Tests

Manage multiple runtime versions with a single CLI tool, extendable via plugins - docs at asdf-vm.com

asdf is a CLI tool that can manage multiple language runtime versions on a per-project basis. It is like gvm, nvm, rbenv & pyenv (and more) all in one! Simply install your language's plugin!

Why use asdf?

  • single CLI for multiple languages
  • consistent commands to manage all your languages
  • single global config keeping defaults in one place
  • single .tool-versions config file per project
  • support for existing config files .node-version, .nvmrc, .ruby-version for easy migration
  • automatically switches runtime versions as you traverse your directories
  • simple plugin system to add support for your language of choice
  • shell completion available for common shells (Bash, Zsh, Fish, Elvish)

Documentation

Please head over to the documentation site for more information!

Contributing

See CONTRIBUTING.md in the repo or the Contributing section on the docs site.

Community & Questions

  • FAQ
  • GitHub Issues GitHub Issues: report a bug or raise a feature request to the asdf core team
  • StackOverflow Tag StackOverflow Tag: see existing Q&A for asdf. Some of the core team watch this tag in addition to our helpful community

Ballad of asdf

Once upon a time there was a programming language
There were many versions of it
So people wrote a version manager for it
To switch between versions for projects
Different, old, new.

Then there came more programming languages
So there came more version managers
And many commands for them

I installed a lot of them
I learnt a lot of commands

Then I said, just one more version manager
Which I will write instead

So, there came another version manager
asdf version manager - https://github.com/asdf-vm/asdf

A version manager so extendable
for which anyone can create a plugin
To support their favourite language
No more installing more version managers
Or learning more commands


This was the mail I wrote to a few friends to tell them about the project. Thanks to @roshanvid for suggesting that this go into the readme
@HashNuke