Quick start
Pick the installation method:
- Windows
- MacOs
- Linux
- Manual
- Apt
- Deb
- Yum
- Rpm
- Alpine
- Nix
- SDKMAN
Download the launcher from GitHub release assets with
curl -fL https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-x86_64-pc-linux.gz | 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 about
command:
scala-cli about
Scala CLI can be installed via apt packager tool.
curl -s --compressed "https://virtuslab.github.io/scala-cli-packages/KEY.gpg" | sudo apt-key add -
sudo curl -s --compressed -o /etc/apt/sources.list.d/scala_cli_packages.list "https://virtuslab.github.io/scala-cli-packages/debian/scala_cli_packages.list"
sudo apt update
sudo apt install scala-cli
The Debian package can be downloaded at this address.
Alternatively, you can download it and install it manually with:
curl -fLo scala-cli.deb https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-x86_64-pc-linux.deb
sudo dpkg -i scala-cli.deb
Scala CLI can be installed via yum packager tool.
sudo cat > /etc/yum.repos.d/virtuslab.repo << EOF
[virtuslab-repo]
name=VirtusLab Repo
baseurl=https://virtuslab.github.io/scala-cli-packages/CentOS/Packages
enabled=1
gpgcheck=1
gpgkey=https://virtuslab.github.io/scala-cli-packages/KEY.gpg
EOF
sudo yum repo-pkgs virtuslab-repo list
sudo yum install scala-cli
The RPM package can be downloaded at this address.
Alternatively, you can download it and install it manually with:
curl -fLo scala-cli.rpm https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-x86_64-pc-linux.rpm
sudo rpm -i scala-cli.rpm
Download the launcher from GitHub release assets with
wget -q -O scala-cli.gz https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-x86_64-pc-linux-static.gz && gunzip scala-cli.gz
chmod +x scala-cli
mv scala-cli /usr/bin/
Check that it runs fine by running its about
command:
scala-cli about
info
This method is provided and supported by the community, not the core team of Scala CLI
Scala CLI can be installed with Nix with
nix-env -if https://github.com/NixOS/nixpkgs/archive/refs/heads/master.tar.gz -A scala-cli
Scala CLI can be installed via SDKMAN with
sdk install scalacli
- Manual
- Installer
- SDKMAN
Note that the Windows manual installation requires Visual C++ redistributable to be installed. See below for how to install it.
Download the launcher from GitHub release assets with
curl -fLo scala-cli.zip https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-x86_64-pc-win32.zip
tar -xf scala-cli.zip
Check that it runs fine by running its about
command:
scala-cli about
If you get an error about MSVCR100.dll
being missing, you have to install
Visual C++ redistributable. A valid version is distributed with the Scala CLI launchers.
You can download it here,
and install it by double-clicking on it. Once the Visual C++ redistributable runtime is installed,
check that the Scala CLI runs fine by running its about
command:
scala-cli about
Note that the commands above don't put the scala-cli
command in the PATH
. For that, you can create a directory, move the
launcher there, and add the directory to the PATH
with
md "%USERPROFILE%/scala-cli"
scala-cli add-path "%USERPROFILE%/scala-cli"
move scala-cli.exe "%USERPROFILE%/scala-cli"
Download MSI installer with Scala CLI for Windows
Scala CLI can be installed via SDKMAN with
sdk install scalacli
- Manual
- Installer
- Brew
- Nix
- SDKMAN
Download the launcher from GitHub release assets with
curl -fL https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-x86_64-apple-darwin.gz | gzip -d > scala-cli
chmod +x scala-cli
mv scala-cli /usr/local/bin/scala-cli
Check that it runs fine by running its about
command:
scala-cli about
Download PKG installer with Scala CLI for MacOS
Once downloaded, right-click on scala-cli-x86_64-apple-darwin.pkg
from Finder, and choose "Open".
Scala CLI can be installed via homebrew with
brew install Virtuslab/scala-cli/scala-cli
info
This method is provided and supported by the community, not the core team of Scala CLI
Scala CLI can be installed with Nix with
nix-env -if https://github.com/NixOS/nixpkgs/archive/refs/heads/master.tar.gz -A scala-cli
Scala CLI can be installed via SDKMAN with
sdk install scalacli
Script to automatically download and cache standalone scala-cli
launcher.
- macOS/Linux
- Windows
Try the completions with
- Bash
- zsh
eval "$(scala-cli install completions --env --shell bash)"
scala-cli --<TAB>
eval "$(scala-cli install completions --env --shell zsh)"
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
- Bash
- zsh
scala-cli install completions --shell bash
scala-cli install completions --shell zsh
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.
Clang is required to compile and run Scala Native applications. Using some functionalities known from JDK (like using java.util.zip
package) require additional packages to be installed.
Scala Native page contains detailed installation guide.