skade / avm

installs node.js on your machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

avm Build Status

Motivation

Right now to install multiple versions of node.js there's nvm available. It does a decent job but there's one disadvantage: It's written in Shell. On the one hand that's nice because it's easy to install on Unix machines, but on the other hand it's not usable on Windows machines and Shell code is not easy to understand. At least for me. Especially the latter reason is important for me. It is not that easy to find a person who can maintain Shell code and also it's not that easy to figure out where to look when something goes wrong.

Since Rust has become stable this year, I took the opportunity and began to write a replacement for nvm. It's called avm as abbreviation for "All version manager". In the future I want to be able to not only install node.js but also Ruby and Python on my machine in a convenient way. The other advantage is since Rust runs on many platforms, there's also the possibility to run avm on machines without Bash e.g. Windows.

Installation

It installs from source, for that you need to have git and Rust stable installed.

To install avm on your system, run the following:

curl https://raw.githubusercontent.com/schultyy/avm/master/install.sh | bash

If Rust is not installed yet, visit https://www.rust-lang.org/downloads.html and download the version for your operating system.

After installation finished, you need to make sure that avm is in your PATH. For that you need to append the following line to either ~/.zshrc or ~/.bash_profile:

export PATH=~/.avm/:~/.avm/bin:$PATH

If you encounter the following compilation error on a Linux based system:

$ cargo build
#...
failed to run custom build command for `openssl-sys v0.6.6`

make sure that you have the following package installed:

sudo apt-get install libssl-dev

Supported platforms

Right now, it is possible to run avm on the major Linux distributions and Mac OS X. There is no support for Windows right now. See #33 for details.

Usage

Install a new node version:

$ avm install 4.1.2

Please note, that right now avm installs precompiled versions of Node.js. There is no supported yet for installing from source.

Use 4.1.2 by default:

$ avm use 4.1.2

Use your system node version:

$ avm use system

List all installed versions:

$ avm ls

Uninstall a version:

$ avm uninstall 4.1.2

About

installs node.js on your machine


Languages

Language:Rust 87.6%Language:Shell 12.4%