Scala CLI is a command-line development utility designed to simplify writing, compiling, executing, testing, and distributing Scala applications. It serves as the official Scala runner beginning with Scala 3.5.0. Developers can execute individual source files, scripts, and directories without maintaining complex build configurations. Embedded using directives specify dependencies, compiler options, Scala versions, and execution settings directly within source files. Automatic dependency resolution retrieves required libraries and development components. An interactive REPL enables experimentation with Scala expressions and code snippets. Compilation targets include the JVM, Scala.js, and Scala Native. Additional commands support code formatting, application packaging, publishing, and IDE integration through the Build Server Protocol.
Features
- Simplified Scala compilation and execution supporting individual source files, scripts, and project directories
- Embedded using directives for declaring library dependencies, Scala versions, and compiler configurations
- Automatic dependency resolution with configurable repositories and Java Development Kit management
- Cross-platform compilation targeting the Java Virtual Machine, JavaScript environments, and native executables
- Integrated interactive Scala REPL with automated test execution and source code formatting capabilities
- Application packaging and publishing tools with Build Server Protocol integration for compatible development environments