Getting started with Gleam

To prepare your computer for Gleam development you’ll need to install Gleam, Erlang, rebar3 the Erlang built tool, and optionally install any Gleam plugins for your editor.

Installing Gleam

Precompiled for Linux, Windows, and macOS

The easiest way to install Gleam on Linux, Windows, and Apple macOS is to download a prebuilt version of the compiler from the GitHub release page.

Mac OS X

Using Homebrew

With Homebrew installed run the following:

brew update
brew install gleam

asdf version manager

asdf is a tool for installing and managing multiple version of programming languages at the same time. Install the asdf-gleam plugin to manage Gleam with asdf.

Arch Linux

Gleam is available through the Arch User Repository as package gleam. You can use your prefered helper to install it or clone it for manual build from


Gleam is available in ports, and also in binary packages. You may need to use the latest package repo, amend per instructions in /etc/pkg/FreeBSD.conf. See below for adjusting your PATH to use latest Erlang/OTP runtime and not just the standard OTP21:

$ pkg install -r FreeBSD lang/gleam lang/erlang-runtime23
$ export PATH=/usr/local/lib/erlang23/bin:$PATH

Build from source

The compiler is written in the Rust programming language and so if you wish to build Gleam from source you will need to install the Rust compiler.

# Download the Gleam source code git repository
cd /tmp
git clone --branch v0.14.4
cd gleam

# Build the Gleam compiler. This will take some time!
make install

# Verify the compiler is installed
# Prints "gleam $VERSION"
gleam --version

Installing Erlang

Gleam compiles to Erlang code, so Erlang needs to be installed to run Gleam code.

Precompiled builds for many popular operating systems can be downloaded from the Erlang solutions website.

Guides for installing Erlang on specific operating systems can be found below, as well as information on installing multiple versions of Erlang at once using version management tools.

Once Erlang has been installed you can check it is working by typing erl -version in your computer’s terminal. You will see version information like this if all is well:

$ erl -version
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.1


Debian Linux
sudo apt-get update
sudo apt-get install erlang
Ubuntu Linux
sudo apt-get update
sudo apt-get install erlang

Mac OS X

Using Homebrew

With Homebrew installed run the following:

brew update
brew install erlang


Using Chocolatey

With Chocolatey installed on your computer run the following:

choco install erlang

Using version managers


The asdf version manager has a plugin for installing Erlang. Installation and usage instructions can be found here:

Installing rebar3

By default Gleam uses rebar3, the standard Erlang build tool. Install rebar3 by following the official rebar3 installation instructions.

Editor Plugins

Gleam plugins are available for several popular editors. If one exists for your editor of choice consider installing it for syntax highlighting and other niceties.

GitPod online Gleam development environment

Gleam can be tested on Gitpod. The environment comes with Erlang and Elixir. The port 3000 is also exposed if you want to run a web server.

Language Tour - In this chapter we explore the fundamentals of the Gleam language, namely its syntax, core data structures, flow control features, and static type system.