Skip to main content
Version: 2.1.0-M2-19-g5a34ba7c1

Installation

These instructions will install the coursier CLI cs itself, as well as a typical Scala development environment. By default, they will install the following applications:

They will also install a JVM if none is found on the system.

If you want more control over what gets installed and how, read about the setup command.

After the setup, you can start using Scala, or install more applications with the install command.

Native launcher​

Linux​

On Linux, download and run the coursier installer with

$ curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz | gzip -d > cs
$ chmod +x cs
$ ./cs setup

macOS​

On macOS, download and run the coursier installer with

$ curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-apple-darwin.gz | gzip -d > cs
$ chmod +x cs
$ ./cs setup

macOS - brew based installation​

Alternatively, the coursier launcher can be installed via homebrew with

$ brew install coursier/formulas/coursier
$ cs setup

Windows​

On Windows, download and execute the Windows installer.

If you prefer a command line-based install, or if you would like to customize the setup options, use:

# CMD
> curl -fLo cs-x86_64-pc-win32.zip https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-win32.zip
> tar -xf cs-x86_64-pc-win32.zip
> move cs-x86_64-pc-win32.exe cs.exe
> .\cs --help

Check your setup​

Check your setup with

$ scala -version
Scala code runner version 2.13.7 -- Copyright 2002-2021, LAMP/EPFL and Lightbend, Inc.

If that does not work, you may need to log out and log back in (or reboot) in order for the changes to take effect.

JAR-based launcher​

In case you run into any issue with the native launcher, a JAR-based launcher is available.

The commands below install the JAR-based launcher as coursier, which can be substituted to cs in the various examples on this website.

Linux / macOS​

Download and run the launcher with

$ curl -fLo coursier https://github.com/coursier/launchers/raw/master/coursier &&
chmod +x coursier &&
./coursier

Note that the JAR-based launcher requires Java 8 or later to run. That is, a command like java -version should print a version >= 8.

The JAR-based launcher weights only about 25 kB and can be easily embedded as is in other projects. It downloads the artifacts required to launch coursier on the first run.

Alternatively, on macOS, the JAR-based launcher can be installed via homebrew with

$ brew install coursier/formulas/coursier
$ coursier

Windows​

Install and run the JAR-based coursier launcher from the current directory at the Windows prompt, with

# CMD
> bitsadmin /transfer downloadCoursierCli https://github.com/coursier/launchers/raw/master/coursier "%cd%\coursier"
> bitsadmin /transfer downloadCoursierBat https://github.com/coursier/launchers/raw/master/coursier.bat "%cd%\coursier.bat"

# PowerShell
> Start-BitsTransfer -Source https://github.com/coursier/launchers/raw/master/coursier -Destination coursier
> Start-BitsTransfer -Source https://github.com/coursier/launchers/raw/master/coursier.bat -Destination coursier.bat

You can then run coursier from the same directory, like

> coursier resolve io.circe:circe-core_2.12:0.10.0

Arch Linux​

Install it from AUR,

$ pacaur -S coursier

FreeBSD​

Install it via pkg from the Ports Collection,

$ pkg install coursier

zsh completions​

If you use ZSH, simple tab-completions are available by writing the coursier completion data into your completions directory. You can install the completions with:

mkdir -p ~/.zsh/completion
cs --completions zsh > ~/.zsh/completion/cs
echo 'fpath=(~/.zsh/completion $fpath)' >> ~/.zshrc
echo 'autoload -Uz compinit ; compinit' >> ~/.zshrc

Launcher URLs​

Latest launchers​

OSShort URLLong URL
Linuxhttps://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz
macOShttps://github.com/coursier/launchers/raw/master/cs-x86_64-apple-darwin.gz
Windowshttps://github.com/coursier/launchers/raw/master/cs-x86_64-pc-win32.zip
Linux (ARM64)https://github.com/coursier/launchers/raw/master/cs-aarch64-pc-linux.gz
Any (needs JVM)https://git.io/coursier-clihttps://github.com/coursier/coursier/raw/gh-pages/coursier (gh-pages branch of coursier repository rather than launchers repository)
Any (needs JVM)https://github.com/coursier/launchers/raw/master/coursier (same launcher as above)

Specific versions​

To download specific versions of the launcher, download them from GitHub release assets:

OSURLSince version
Linuxhttps://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/cs-x86_64-pc-linux.gz2.0.16-158-gbdc8669f9
macOShttps://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/cs-x86_64-apple-darwin.gz2.0.16-158-gbdc8669f9
Windowshttps://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/cs-x86_64-pc-win32.exe2.0.16-158-gbdc8669f9
Linux (ARM64)https://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/cs-aarch64-pc-linux.gz2.0.16-158-gbdc8669f9
Any (needs JVM)https://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/coursier1.1.0-M9

Former URLs, for information:

OSURLSince versionUp to version
Linuxhttps://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/cs-x86_64-pc-linux2.0.0-RC3-12.0.16
macOShttps://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/cs-x86_64-apple-darwin2.0.0-RC3-12.0.16
Windowshttps://github.com/coursier/coursier/releases/download/v2.1.0-M2-19-g5a34ba7c1/cs-x86_64-pc-win32.exe2.0.0-RC62.0.16
Any (needs JVM)https://github.com/coursier/coursier/raw/v1.1.0-M9/coursier1.1.0-M9