| CARVIEW |
Scala CLI is a command-line tool to interact with the Scala language.
It lets you compile, run, test, and package your Scala code (and more!)


Scala CLI combines all of the features you need to learn and use Scala in your scripts, playgrounds and (single-module) projects.
To get started you can read the documentation, or just install and enjoy scala-cli.
Scala CLI is the default Scala runner and is being shipped as scala along with scalac as part of the official language installation since Scala 3.5.0. (read more).



Who is Scala CLI designed for?

Education
Scala CLI is a help — not a distraction — while learning Scala, a library or programming in general.

Scripting
Scala CLI has all the tools to create (or be integrated into) scripts with the whole power of the Scala ecosystem.

Prototyping, Experimenting, Reproducing
With Scala CLI, experimenting with different libraries, Scala or JVM versions, or compiler options is easy and fun.

Single-module projects
Scala CLI provides all the tools you need to manage single-module projects like CLI or basic web applications, or server-less lambdas.
Install Scala CLI
Still undecided?
Scala versions, dependencies and JVMs
Scala CLI is built on top of coursier
This allow us to manage Scala versions, dependencies and JVMs so you can test your code in different environments by changing single option.
Scala CLI ships with all its dependencies
No need to fluff with installing JVM or setting up PATH.




We do not call Scala CLI a build tool
Scala CLI shares some similarities with build tools, but doesn't aim at supporting multi-module projects, nor to be extended via a task system known from sbt, mill or bazel.
Scala ecosystem has multiple amazing build tools, there is no need to create another multipurpose build tool.


Complete installation
Scala CLI comes with batteries included. No additional installation is required, no more fluffing with setting up the correct Java version or PATH
Scala CLI manages JVMs, Scala and other used tools under the hood.


Solid defaults
No additional configuration is needed to most Scala CLI commands.
Scala CLI is configured out of the box to use the latest stable versions and other commands such as formatter or compiler contain reasonable defaults.


No learning curve
Scala CLI does not use a complex configuration language, its options are simple and self-explanatory.
There are no big differences in running repl or .scala files so expanding the results of repl session into a small project does not require learning new concepts from Scala CLI perspective


Scripts are as powerful as other programs
Scripts in Scala CLI can use dependencies and other features as standard Scala programs. Scala CLI is command-line first, giving access to all its features without the need for any configuration files or specific project structure.


Embeddable Scripts
Scala CLI can be set up in shebang lines, making your *.scala or *.sc (or even .java or .md!) files runnable.
Scala CLI supports piping inputs and is designed to be embeddable in other scripts, turning Scala into proper scripting language.


Self-contained examples
With Scala CLI, configuration can be included in source code so complex examples can be self-contained and shipped as e.g. gist. Moreover, Scala CLI can compile, run and test gists without any manual work!
Scala CLI is the perfect tool to submit and reproduce bugs.



