simple erlang release management

erlenv (v0.4)

do you like rbenv? you’ll love erlenv

used to rbenv? erlenv is almost exactly the same thing. use erlenv to setup and switch between multiple erlang releases effortlessly. ok maybe some tiny amount of effort required

erlenv is a fork of rbenv and all credit belongs to sam stephenson and the other contributors to rbenv



erlenv allows multiple erlang releases to coexist peacefully, and makes it easy to switch between them on a systemwide, per user or per directory basis

each directory under the directory ~/.erlenv/releases is considered a release. you might have ~/.erlenv/releases/r14b04, ~/.erlenv/releases/r15b01 and ~/.erlenv/releases/github_head for example

each release is it’s own working tree with it’s own binaries and applications. erlenv creates shim binaries - simple wrapper scripts - that redirect execution to the currently active release

because of this shim approach, all you need to use erlenv is ~/.erlenv/shims in your $PATH


check out erlenv into ~/.erlenv:

$ cd
$ git clone .erlenv

add ~/.erlenv/bin to your $PATH for access to the erlenv command-line utility

$ echo 'export PATH="$HOME/.erlenv/bin:$PATH"' >> ~/.bash_profile

zsh note: modify your ~/.zshenv file instead of ~/.bash_profile

add erlenv init to your shell to enable shims and autocompletion

$ echo 'eval "$(erlenv init -)"' >> ~/.bash_profile

zsh note: modify your ~/.zshenv file instead of ~/.bash_profile

restart your shell so the path changes take effect. you can now begin using erlenv

$ exec $SHELL

install releases into ~/.erlenv/releases. for example, to install OTP R15B01, download and unpack the source, then run:

$ ./configure --prefix=$HOME/.erlenv/releases/r15b01
$ make
$ make install
**Ubuntu Desktop note**: Modify your `~/.bashrc` instead of `~/.bash_profile`.
$ erlenv rehash

start using erlenv

$ erlenv


like git, the erlenv command delegates to subcommands based on its first argument. the most common subcommands are:


sets the global release to be used in all shells by writing the version name to the ~/.erlenv/release file. this version can be overridden by a per-project .erlang-release file, or by setting the ERLENV_RELEASE environment variable

$ erlenv global r15b01

the special version name system tells erlenv to use the system erlang (detected by searching your $PATH)

when run without a release name, erlenv global reports the currently configured global version


sets a local per-project release by writing the version name to an .erlang-release file in the current directory. this version overrides the global, and can be overridden itself by setting the ERLENV_RELEASE environment variable or with the erlenv shell command.

$ erlenv local r15b01

when run without a release name, erlenv local reports the currently configured local release. you can also unset the local version:

$ erlenv local --unset


sets a shell-specific release by setting the ERLENV_RELEASE environment variable in your shell. this release overrides both project-specific releases and the global release

$ erlenv shell riak-1.1.1

when run without a release name, erlenv shell reports the current value of ERLENV_RELEASE. you can also unset the shell version

$ erlenv shell --unset

note that you’ll need erlenv’s shell integration enabled (step 3 of the installation instructions) in order to use this command. if you prefer not to use shell integration, you may simply set the ERLENV_RELEASE variable yourself

$ export ERLENV_RELEASE=riak-1.1.1


displays the currently active release, along with information on how it was set

$ erlenv release
riak-1.1.1 (set by /Users/alisdair/riak/.erlang-release)


lists all releases known to erlenv, and shows an asterisk next to the currently active release

$ erlenv versions
* r15b01-minimal (set by /Users/alisdair/.erlenv/global)


installs shims for all release binaries known to erlenv (i.e., ~/.rbenv/releases/*/bin/*). run this command after you install a new release

$ erlenv rehash


displays the full path to the binary that erlenv will execute when you run the given command

$ erlenv which erl


lists all releases with the given command installed

$ erlenv whence typer

Related Repositories



simple erlang release management ...

Top Contributors

sstephenson mislav talentdeficit josh guilleiguaran wakatara jamis radar tpope gma javierjulio jeremy mlafeldt telemachus carsomyr ryanfb tmking YanhaoYang eddorre alecchen alexrinass almog ndreas amarshall terceiro griff sodabrew asaaki baer eric


-   v0.4.0 zip tar
-   v0.3.0 zip tar
-   v0.2.1 zip tar
-   v0.2.0 zip tar
-   v0.1.2 zip tar
-   v0.1.1 zip tar
-   v0.1.0 zip tar