Giter Site home page Giter Site logo

asdf's Introduction

asdf

extendable version manager

Supported languages include Ruby, Node.js, Elixir and more. Supporting a new language is as simple as this plugin API.

SETUP

Copy-paste the following into command line:

git clone https://github.com/asdf-vm/asdf.git ~/.asdf

Depending on your OS, run the following

# For Ubuntu or other linux distros
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc

# OR for Max OSX
echo '. $HOME/.asdf/asdf.sh' >> ~/.bash_profile
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile

If you use zsh or any other shell, replace .bashrc with the config file for the respective shell.

For most plugins, it is good if you have installed the following packages OR their equivalent on you OS

  • OS X: Install these via homebrew automake autoconf openssl libyaml readline libxslt libtool unixodbc
  • Ubuntu: automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev

That's all ~! You are ready to use asdf


USAGE

Manage plugins

Plugins are how asdf understands how to handle different packages. Below is a list of plugins for languages. There is a super-simple API for supporting more languages.

Language Repository
Elixir asdf-vm/asdf-elixir
Erlang asdf-vm/asdf-erlang
Lua Stratus3D/asdf-lua
Node.js asdf-vm/asdf-nodejs
Ruby asdf-vm/asdf-ruby
Add a plugin
asdf plugin-add <name> <git-url>
# asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git
List installed plugins
asdf plugin-list
# asdf plugin-list
Remove a plugin
asdf plugin-remove <name>
# asdf plugin-remove erlang
Update plugins
asdf plugin-update --all

If you want to update a specific package, just say so.

asdf plugin-update <name>
# asdf plugin-update erlang

Manage versions

asdf install <name> <version>
# asdf install erlang 17.3

asdf which <name>
# asdf which erlang
# 17.3

asdf uninstall <name> <version>
# asdf uninstall erlang 17.3

If a plugin supports downloading & compiling from source, you can also do this ref:foo (replace foo with the branch/tag/commit). You'll have to use the same name when uninstalling too.

Lists installed versions
asdf list <name>
# asdf list erlang
List all available versions
asdf list-all <name>
# asdf list-all erlang

The .tool-versions file

Add a .tool-versions file to your project dir and versions of those tools will be used. Global defaults can be set in the file $HOME/.tool-versions

This is what a .tool-versions file looks like:

ruby 2.2.0
nodejs 0.12.3

The versions can be in the following format:

  • 0.12.3 - an actual version. Plugins that support downloading binaries, will download binaries.
  • ref:v1.0.2-a or ref:39cb398vb39 - tag/commit/branch to download from github and compile
  • path:/src/elixir - a path to custom compiled version of a tool to use. For use by language developers and such.

To install all the tools defined in a .tool-versions file run the asdf install command with no other arguments in the directory containing the .tool-versions file.

Credits

Me (@HashNuke), High-fever, cold, cough.

Copyright 2014 to the end of time (MIT License)


Read the ballad.

asdf's People

Contributors

hashnuke avatar stratus3d avatar kdisneur avatar msch avatar justin-calleja avatar kennyp avatar nobbz avatar jwashton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.