LinuxCommandLibrary

ern

The command 'ern' is not a standard Linux command

TLDR

Create a new ern application (MiniApp)

$ ern create-miniapp [application_name]
copy

Run one or more MiniApps in the iOS/Android Runner application
$ ern run-[ios|android]
copy

Create an Electrode Native container
$ ern create-container --miniapps /[path/to/miniapp_directory] --platform [ios|android]
copy

Publish an Electrode Native container to a local Maven repository
$ ern publish-container --publisher [maven] --platform [android] --extra '[{"groupId":"com.walmart.ern","artifactId":"quickstart"]}'
copy

Transform an iOS container into a pre-compiled binary framework
$ ern transform-container --platform [ios] --transformer [xcframework]
copy

List all installed versions of Electrode Native
$ ern platform versions
copy

Set a logging level
$ ern platform config set logLevel [trace|debug]
copy

SYNOPSIS

ern <command> [<options>] [<version>]

PARAMETERS

install <version>
    Downloads and installs specified Erlang/OTP version (e.g., ern install 26.1)

uninstall <version>
    Removes the specified installed version

use <version>
    Activates the specified version for current shell session

default <version>
    Sets the specified version as system-wide default

list
    Lists all locally installed versions

list-remote
    Lists available remote versions for installation

--help
    Displays help for ern or specific command

--version
    Shows ern version

-v
    Enables verbose output during operations

DESCRIPTION

ern is a lightweight bash-based tool designed to simplify the management of multiple Erlang/OTP releases on Unix-like systems, including Linux and macOS. Similar to tools like nvm for Node.js or rbenv for Ruby, ern allows users to install, switch between, and uninstall precompiled Erlang binaries with minimal effort, eliminating the need for manual compilation or complex build processes.

It fetches official prebuilt releases from the Erlang Solutions repository or similar sources, supporting a wide range of OTP versions (e.g., 22.x to 27.x). Key benefits include quick installation via a single command, automatic shimming for easy erl invocation, and environment variable setup for seamless version switching in shell sessions. ern stores installations in a user-defined directory (default: ~/.ern), keeping system Erlang intact.

Ideal for developers working on projects requiring specific Erlang versions, it integrates well with build tools like rebar3 and mix. No root privileges required, and it's portable across shells like bash and zsh.

CAVEATS

Prebuilt binaries may not support all platforms/architectures; verify compatibility. Does not handle source builds like kerl. Requires writable home directory.

INSTALLATION

curl -fsSL https://raw.githubusercontent.com/robisonsantos/ern/master/get-ern.sh | bash
Then add source ~/.ern/ernrc to shell profile.

VERSION FORMAT

Supports formats like OTP-26.1, 26.1, or 26 for latest patch.

HISTORY

ern was first released in 2020 by developer Fernando Machado (robisonsantos on GitHub) as a simpler alternative to kerl, focusing on precompiled binaries. It gained popularity in the Elixir/Erlang community for its ease of use, with ongoing updates to support newer OTP releases up to 27.x. Maintained as an open-source project with contributions from users.

SEE ALSO

kerl(1), asdf(1), erl(1), rebar3(1)

Copied to clipboard