LinuxCommandLibrary

scala-cli

Modern Scala command-line runner and build tool

TLDR

Run Scala script

$ scala-cli [script.sc]
copy
Run Scala file
$ scala-cli run [Main.scala]
copy
Start REPL
$ scala-cli repl
copy
Compile to JAR
$ scala-cli package [src/] -o [app.jar]
copy
Run tests
$ scala-cli test [src/]
copy

SYNOPSIS

scala-cli [command] [options] [inputs...]

DESCRIPTION

scala-cli is the modern Scala command line tool. Runs scripts, compiles projects, manages dependencies, and creates executables. Designed for both learning and production Scala development.

PARAMETERS

run

Run Scala code.
repl
Start interactive REPL.
compile
Compile sources.
package
Create JAR or native image.
test
Run tests.
fmt
Format code.
--scala version
Scala version.
--dep dependency
Add dependency.
-O option
Scala compiler option.

SEE ALSO

sbt(1), scala(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community