Quick start
Pick the installation method:
- Windows
- MacOs
- MacOs/M1
- 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
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 -iA scala-cli
Scala CLI can be installed via SDKMAN with
sdk install scalacli
- Manual
- Installer
- SDKMAN
- Chocolatey
- Scoop
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
To install Scala CLI via Chocolatey, run the following command from the command line or from PowerShell:
choco install scala-cli
Third-party Chocolatey packages may not provide the latest version.
To install Scala CLI via Scoop, run the following command from the command line or from PowerShell:
scoop install scala-cli
- 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 the PKG installer with Scala CLI for MacOS
Once downloaded, right-click on scala-cli-x86_64-apple-darwin.pkg
from Finder and then choose "Open".
Scala CLI can be installed via homebrew with
brew install Virtuslab/scala-cli/scala-cli
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 -iA scala-cli
Scala CLI can be installed via SDKMAN with
sdk install scalacli
- Manual
- Installer
Download the launcher from GitHub release assets with
curl -fL https://github.com/Virtuslab/scala-cli/releases/latest/download/scala-cli-aarch64-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 the PKG installer with Scala CLI for MacOS/M1
Once downloaded, right-click on scala-cli-aarch64-apple-darwin.pkg
from Finder and then choose "Open".
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.
Pick the uninstallation method:
- Windows
- MacOs
- Linux
- Installation script
- Manual
- Apt
- Deb
- Yum
- Rpm
- Alpine
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.
If Scala CLI was installed manually you can uninstall it with:
rm /usr/local/bin/scala-cli
If Scala CLI was installed via apt you can uninstall it with:
sudo apt purge scala-cli
If Scala CLI was installed via dpkg you can uninstall it with:
sudo dpkg --remove scala-cli
If Scala CLI was installed via yum you can uninstall it with:
yum remove scala-cli
If Scala CLI was installed via rpm you can uninstall it with:
rpm -e scala-cli
For Alpine Linux you can uninstall scala-cli with:
rm /usr/bin/scala-cli
- Manual
- Installer
- Chocolatey
If Scala CLI was installed manually you can uninstall it with:
rmdir "%USERPROFILE%/scala-cli"
If Scala CLI was installed via the installer, you can uninstall it in the Control Panel.
To uninstall Scala CLI via Chocolatey, run the following command from the command line or from PowerShell:
choco uninstall scala-cli
- Installation script
- Manual
- Brew
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.
If Scala CLI was installed manually you can uninstall it with:
rm /usr/local/bin/scala-cli
If Scala CLI was installed via homebrew you can uninstall it with:
brew uninstall scala-cli