Skip to main content

Quick start

>_ Advanced Installation

Pick the installation method:

Download the launcher from GitHub release assets with

curl -fL | gzip -d > scala-cli
chmod +x scala-cli
sudo mv scala-cli /usr/local/bin/scala-cli

Check that it runs fine by running its version command:

scala-cli version
>_ Standalone launcher

Script to automatically download and cache standalone scala-cli launcher.

>_ Bootstrapped standalone fat JAR

In certain restricted environments, jar files may only be accessible through Nexus or a specific Artifactory, making it cumbersome to manually load each dependency and construct the classpath. To simplify this process, run the bootstrapped Scala CLI standalone fat jar using Coursier, follow the command below:

cs launch org.virtuslab.scala-cli:cliBootstrapped:latest.release -M scala.cli.ScalaCli

Alternatively, you can directly download it from the Maven repository here.

>_ Shell completions

Try the completions with

eval "$(scala-cli install completions --env --shell bash)"
scala-cli --<TAB>

Install them on your system with

scala-cli install completions

If any of the scala-cli install completions command complained that your shell cannot be determined, specify it with --shell

scala-cli install completions --shell bash
>_ Scala.js

To run Scala.js applications Node.js needs to be installed. Scala CLI at this moment does not manage Node.js however it may change in the future.

>_ Scala Native

Clang is required to compile and run Scala Native applications. Using some functionalities known from JDK (like using package) require additional packages to be installed.

Scala Native page contains detailed installation guide.

>_ Uninstall scala CLI

Pick the uninstallation method:

If Scala CLI was installed via the installation script, you can uninstall it with:

scala-cli uninstall

If you have installed Scala CLI completions into your shell, uninstall command uninstalls them by running uninstall-completions command under the hood.