About Scala CLI
Scala CLI is a command-line tool to interact with the Scala language.
Scala CLI is a command-line tool to interact with the Scala language.
Scala CLI is a command-line tool to interact with the Scala language.
Default Scala 3.8.4, Scala Native 0.5.12 & Scala.js 1.22.0
This Scala CLI version bumps the default Scala version to 3.8.4, Scala Native to 0.5.12 and Scala.js to 1.22.0.
scala-cli version
Scala CLI version: 1.15.0
Scala version (default): 3.8.4
scala-cli -e 'println("Hello from Scala.js 1.22.0!")' --js
Compiling project (Scala 3.8.4, Scala.js 1.22.0)
Compiled project (Scala 3.8.4, Scala.js 1.22.0)
Hello from Scala.js 1.22.0!
scala-cli -e 'println("Hello from Scala Native 0.5.12!")' --native
Compiling project (Scala 3.8.4, Scala Native 0.5.12)
Compiled project (Scala 3.8.4, Scala Native 0.5.12)
Hello from Scala Native 0.5.12!
Scala 3.8.4 was added by @Gedochao in #4299
Scala Native 0.5.12 was added by @WojciechMazur in #4286
Scala.js 1.22.0 was added by @Gedochao in #4344
JShell support in repl
scala-cli repl can now use JShell as its REPL backend, enabled with the --jshell (--jsh) flag. JShell is also picked automatically for pure-Java projects. The project's classpath (including dependencies) is available inside the JShell session, so you can play with your code (and even reference Scala classes via reflection). JShell requires JDK 9 or newer.
package demo;
public class HelloJShell {
public static String greet() { return "Hello from JShell!"; }
}
System.out.println(demo.HelloJShell.greet());
scala-cli repl demo/HelloJShell.java --jshell --jvm 17 --repl-quit-after-init --repl-init-script-file hi.jsh
Note: It is possible to explicitly disable JShell on pure Java projects and revert to using Scala REPL with --jshell=false.
Added by @Gedochao in #4262
java snippets in Markdown inputs (experimental ⚡️)
Scala CLI can now compile and run java code blocks inside Markdown inputs, mirroring the existing support for scala snippets. A java snippet is treated like a regular .java input (its body is emitted as Java source without any wrapping). As with other Markdown features, this requires --power.
Java in Markdown
java
public class HelloMarkdown {
public static void main(String[] args) {
System.out.println("Hello from a Java snippet in Markdown!");
}
}
scala-cli --power HelloMarkdown.md
Added by @Gedochao in #4284
WebAssembly support (experimental ⚡️)
Scala CLI can now compile and run Scala.js through the experimental Scala.js WebAssembly backend. Enable it with the --js-emit-wasm flag (or the //> using wasm directive) together with ES module output (--js-module-kind es / //> using jsModuleKind es). …
| Publisher | [email protected] |
|---|---|
| Version | 1.15.0 |
| Release date | 2026-06-30 |
| License | Apache-2.0 |
| Installer type | wix |
| Architecture | x86 |
| Package ID | VirtusLab.ScalaCLI |
Install Scala CLI from the command line with Windows Package Manager (winget):
winget install --id=VirtusLab.ScalaCLI -e