Skip to main content

Command-line options

This document describes as scala-cli behaves if run as scala command. See more information in SIP-46

This is a summary of options that are available for each subcommand of the scala-cli command.

Scalac options forwarding​

All options that start with:

  • -g
  • -language
  • -opt
  • -P
  • -target
  • -V
  • -W
  • -X
  • -Y

are assumed to be Scala compiler options and will be propagated to Scala Compiler. This applies to all commands that uses compiler directly or indirectly.

Scalac options that are directly supported in scala CLI (so can be provided as is, without any prefixes etc.):​

  • -encoding
  • -release
  • -color
  • -nowarn
  • -feature
  • -deprecation
  • -indent
  • -no-indent
  • -unchecked
  • -rewrite
  • -old-syntax
  • -new-syntax

Benchmarking options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

This section was automatically generated and may be empty if no options were available.

Compilation server options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test, uninstall

--bloop-bsp-protocol​

IMPLEMENTATION specific per Scala Runner specification

Protocol to use to open a BSP connection with Bloop

--bloop-bsp-socket​

IMPLEMENTATION specific per Scala Runner specification

Socket file to use to open a BSP connection with Bloop

--bloop-host​

IMPLEMENTATION specific per Scala Runner specification

Host the compilation server should bind to

--bloop-port​

IMPLEMENTATION specific per Scala Runner specification

Port the compilation server should bind to (pass -1 to pick a random port)

--bloop-daemon-dir​

IMPLEMENTATION specific per Scala Runner specification

Daemon directory of the Bloop daemon (directory with lock, pid, and socket files)

--bloop-version​

IMPLEMENTATION specific per Scala Runner specification

If Bloop isn't already running, the version we should start

--bloop-bsp-timeout​

IMPLEMENTATION specific per Scala Runner specification

Maximum duration to wait for the BSP connection to be opened

--bloop-bsp-check-period​

IMPLEMENTATION specific per Scala Runner specification

Duration between checks of the BSP connection state

--bloop-startup-timeout​

IMPLEMENTATION specific per Scala Runner specification

Maximum duration to wait for the compilation server to start up

--bloop-default-java-opts​

IMPLEMENTATION specific per Scala Runner specification

Include default JVM options for Bloop

--bloop-java-opt​

IMPLEMENTATION specific per Scala Runner specification

Pass java options to use by Bloop server

--bloop-global-options-file​

IMPLEMENTATION specific per Scala Runner specification

Bloop global options file

--bloop-jvm​

IMPLEMENTATION specific per Scala Runner specification

JVM to use to start Bloop (e.g. 'system|17', 'temurin:21', …)

--bloop-working-dir​

IMPLEMENTATION specific per Scala Runner specification

Working directory for Bloop, if it needs to be started

--server​

IMPLEMENTATION specific per Scala Runner specification

Enable / disable usage of Bloop compilation server. Bloop is used by default so use --server=false to disable it. Disabling compilation server allows to test compilation in more controlled mannter (no caching or incremental compiler) but has a detrimental effect of performance.

Compile options​

Available in commands:

compile

--print-class-path​

Aliases: -p, --print-classpath

SHOULD have per Scala Runner specification

Print the resulting class path

Config options​

Available in commands:

config

--dump​

IMPLEMENTATION specific per Scala Runner specification

Dump config DB as JSON

--unset​

Aliases: --remove

SHOULD have per Scala Runner specification

Remove an entry from config

--force​

Aliases: -f

SHOULD have per Scala Runner specification

Force overwriting values for key

Cross options​

Available in commands:

compile, doc, repl , console, run, shebang, test

This section was automatically generated and may be empty if no options were available.

Debug options​

Available in commands:

bsp, compile, config, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--debug​

SHOULD have per Scala Runner specification

Turn debugging on

--debug-port​

SHOULD have per Scala Runner specification

Debug port (5005 by default)

--debug-mode​

SHOULD have per Scala Runner specification

Debug mode (attach by default)

Dependency options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--dependency​

Aliases: --dep

MUST have per Scala Runner specification

Add dependencies

--compile-only-dependency​

Aliases: --compile-dep, --compile-lib

MUST have per Scala Runner specification

Add compile-only dependencies

--repository​

Aliases: -r, --repo

SHOULD have per Scala Runner specification

Add repositories for dependency resolution.

Accepts predefined repositories supported by Coursier (like sonatype:snapshots, ivy2Local or m2Local) or a URL of the root of Maven repository

--compiler-plugin​

Aliases: -P, --plugin

MUST have per Scala Runner specification

Add compiler plugin dependencies

Doc options​

Available in commands:

doc

--output​

Aliases: -o

MUST have per Scala Runner specification

Set the destination path

--force​

Aliases: -f

MUST have per Scala Runner specification

Overwrite the destination directory, if it exists

--default-scaladoc-options​

Aliases: --default-scaladoc-opts

SHOULD have per Scala Runner specification

Control if Scala CLI should use default options for scaladoc, true by default. Use --default-scaladoc-opts:false to not include default options.

Fmt options​

Available in commands:

fmt , format , scalafmt

--check​

SHOULD have per Scala Runner specification

Check if sources are well formatted

--respect-project-filters​

IMPLEMENTATION specific per Scala Runner specification

Use project filters defined in the configuration. Turned on by default, use --respect-project-filters:false to disable it.

--save-scalafmt-conf​

IMPLEMENTATION specific per Scala Runner specification

Saves .scalafmt.conf file if it was created or overwritten

--os-arch-suffix​

IMPLEMENTATION specific per Scala Runner specification

--scalafmt-tag​

IMPLEMENTATION specific per Scala Runner specification

--scalafmt-github-org-name​

IMPLEMENTATION specific per Scala Runner specification

--scalafmt-extension​

IMPLEMENTATION specific per Scala Runner specification

--scalafmt-launcher​

IMPLEMENTATION specific per Scala Runner specification

--scalafmt-arg​

Aliases: -F

IMPLEMENTATION specific per Scala Runner specification

Pass an argument to scalafmt.

--scalafmt-conf​

Aliases: --scalafmt-config

IMPLEMENTATION specific per Scala Runner specification

Custom path to the scalafmt configuration file.

--scalafmt-conf-str​

Aliases: --scalafmt-conf-snippet, --scalafmt-config-str

IMPLEMENTATION specific per Scala Runner specification

Pass configuration as a string.

--scalafmt-dialect​

Aliases: --dialect

IMPLEMENTATION specific per Scala Runner specification

Pass a global dialect for scalafmt. This overrides whatever value is configured in the .scalafmt.conf file or inferred based on Scala version used.

--scalafmt-version​

Aliases: --fmt-version

IMPLEMENTATION specific per Scala Runner specification

Pass scalafmt version before running it (3.11.5 by default). If passed, this overrides whatever value is configured in the .scalafmt.conf file.

Global suppress warning options​

Available in commands:

bsp, clean, compile, config, doc, fmt , format , scalafmt, help, install completions , install-completions, install-home, repl , console, run, setup-ide, shebang, test, uninstall, uninstall completions , uninstall-completions, update, version

--suppress-experimental-feature-warning​

Aliases: --suppress-experimental-warning

IMPLEMENTATION specific per Scala Runner specification

Suppress warnings about using experimental features

--suppress-deprecated-feature-warning​

Aliases: --suppress-deprecated-feature-warnings, --suppress-deprecated-warning, --suppress-deprecated-warnings

IMPLEMENTATION specific per Scala Runner specification

Suppress warnings about using deprecated features

Help options​

Available in commands:

bsp, clean, compile, config, doc, fmt , format , scalafmt, help, install completions , install-completions, install-home, repl , console, run, setup-ide, shebang, test, uninstall, uninstall completions , uninstall-completions, update, version

--usage​

IMPLEMENTATION specific per Scala Runner specification

Print usage and exit

--help​

Aliases: -h, -help

IMPLEMENTATION specific per Scala Runner specification

Print help message and exit

--help-full​

Aliases: --full-help, -full-help, -help-full

IMPLEMENTATION specific per Scala Runner specification

Print help message, including hidden options, and exit

Help group options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--help-envs​

Aliases: --env-help, --envs-help, --help-env

IMPLEMENTATION specific per Scala Runner specification

Show environment variable help

--help-js​

IMPLEMENTATION specific per Scala Runner specification

Show options for ScalaJS

--help-native​

IMPLEMENTATION specific per Scala Runner specification

Show options for ScalaNative

--help-scaladoc​

Aliases: --doc-help, --help-doc, --scaladoc-help

IMPLEMENTATION specific per Scala Runner specification

Show options for Scaladoc

--help-repl​

Aliases: --repl-help

IMPLEMENTATION specific per Scala Runner specification

Show options for Scala REPL

--help-scalafmt​

Aliases: --fmt-help, --help-fmt, --scalafmt-help

IMPLEMENTATION specific per Scala Runner specification

Show options for Scalafmt

--help-wasm​

Aliases: --wasm-help

IMPLEMENTATION specific per Scala Runner specification

Show options for WebAssembly

Install completions options​

Available in commands:

install completions , install-completions

--format​

Aliases: --shell

IMPLEMENTATION specific per Scala Runner specification

Name of the shell, either zsh or bash

--rc-file​

IMPLEMENTATION specific per Scala Runner specification

Path to *rc file, defaults to .bashrc or .zshrc depending on shell

--output​

Aliases: -o

IMPLEMENTATION specific per Scala Runner specification

Completions output directory

--banner​

IMPLEMENTATION specific per Scala Runner specification

Custom banner in comment placed in rc file

--name​

IMPLEMENTATION specific per Scala Runner specification

Custom completions name

--env​

IMPLEMENTATION specific per Scala Runner specification

Print completions to stdout

Java options​

Available in commands:

repl , console, run, shebang, test

--java-opt​

Aliases: -J

MUST have per Scala Runner specification

Set Java options, such as -Xmx1g

Java prop options​

Available in commands:

repl , console, run, shebang, test

--java-prop-option​

Aliases: --java-prop

IMPLEMENTATION specific per Scala Runner specification

Add java properties. Note that options equal -Dproperty=value are assumed to be java properties and don't require to be passed after --java-prop.

Jvm options​

Available in commands:

bsp, compile, config, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--java-home​

SHOULD have per Scala Runner specification

Set the Java home directory

--jvm​

Aliases: -j

SHOULD have per Scala Runner specification

Use a specific JVM, such as 14, temurin:11, or graalvm:21, or system. scala-cli uses coursier to fetch JVMs, so you can use cs java --available to list the available JVMs.

--jvm-index​

IMPLEMENTATION specific per Scala Runner specification

JVM index URL

--jvm-index-os​

IMPLEMENTATION specific per Scala Runner specification

Operating system to use when looking up in the JVM index

--jvm-index-arch​

IMPLEMENTATION specific per Scala Runner specification

CPU architecture to use when looking up in the JVM index

--javac-plugin​

SHOULD have per Scala Runner specification

Javac plugin dependencies or files

--javac-option​

Aliases: --javac-opt

SHOULD have per Scala Runner specification

Javac options

--bsp-debug-port​

IMPLEMENTATION specific per Scala Runner specification

Port for BSP debugging

Logging options​

Available in commands:

bsp, clean, compile, config, doc, fmt , format , scalafmt, help, install completions , install-completions, install-home, repl , console, run, setup-ide, shebang, test, uninstall, uninstall completions , uninstall-completions, update, version

--quiet​

Aliases: -q

IMPLEMENTATION specific per Scala Runner specification

Decrease logging verbosity

--progress​

IMPLEMENTATION specific per Scala Runner specification

Use progress bars

Main class options​

Available in commands:

run, shebang

--main-class​

Aliases: -M

MUST have per Scala Runner specification

Specify which main class to run

--main-class-ls​

Aliases: --list-main-class, --list-main-classes, --list-main-method, --list-main-methods, --main-class-list, --main-method-list, --main-method-ls

SHOULD have per Scala Runner specification

List main classes available in the current context

Markdown options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

This section was automatically generated and may be empty if no options were available.

Pgp scala signing options​

Available in commands:

config

This section was automatically generated and may be empty if no options were available.

Power options​

Available in commands:

bsp, clean, compile, config, doc, fmt , format , scalafmt, help, install completions , install-completions, install-home, repl , console, run, setup-ide, shebang, test, uninstall, uninstall completions , uninstall-completions, update, version

--power​

MUST have per Scala Runner specification

Allows to use restricted & experimental features

Python options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

This section was automatically generated and may be empty if no options were available.

Repl options​

Available in commands:

repl , console

--jshell​

Aliases: --jsh

IMPLEMENTATION specific per Scala Runner specification

Use JShell as the REPL (default for pure-Java projects). Requires JDK >= 9.

--repl-init-script-file​

IMPLEMENTATION specific per Scala Runner specification

Read the REPL init script (--repl-init-script) from a file. Mutually exclusive with --repl-init-script.

--repl-dry-run​

IMPLEMENTATION specific per Scala Runner specification

Don't actually run the REPL, just fetch it

Run options​

Available in commands:

run, shebang

--command​

SHOULD have per Scala Runner specification

Print the command that would have been run (one argument per line), rather than running it

--scratch-dir​

IMPLEMENTATION specific per Scala Runner specification

Temporary / working directory where to write generated launchers

--use-manifest​

IMPLEMENTATION specific per Scala Runner specification

Run Java commands using a manifest-based class path (shortens command length)

Scala.js options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--js​

SHOULD have per Scala Runner specification

Enable Scala.js. To show more options for Scala.js pass --help-js

--js-version​

SHOULD have per Scala Runner specification

The Scala.js version (1.22.0 by default).

--js-mode​

SHOULD have per Scala Runner specification

The Scala.js mode, for fastLinkJS use one of [dev, fastLinkJS or fast], for fullLinkJS use one of [release, fullLinkJS, full]

--js-no-opt​

IMPLEMENTATION specific per Scala Runner specification

Disable optimalisation for Scala.js, overrides --js-mode

--js-module-kind​

SHOULD have per Scala Runner specification

The Scala.js module kind: commonjs/common, esmodule/es, nomodule/none

--js-check-ir​

SHOULD have per Scala Runner specification

--js-emit-source-maps​

SHOULD have per Scala Runner specification

Emit source maps

--js-source-maps-path​

SHOULD have per Scala Runner specification

Set the destination path of source maps

--js-es-module-import-map​

SHOULD have per Scala Runner specification

A file relative to the root directory containing import maps for ES module imports

--js-dom​

SHOULD have per Scala Runner specification

Enable jsdom

--js-header​

SHOULD have per Scala Runner specification

A header that will be added at the top of generated .js files

--js-allow-big-ints-for-longs​

IMPLEMENTATION specific per Scala Runner specification

Primitive Longs may be compiled as primitive JavaScript bigints

--js-avoid-classes​

IMPLEMENTATION specific per Scala Runner specification

Avoid class'es when using functions and prototypes has the same observable semantics.

--js-avoid-lets-and-consts​

IMPLEMENTATION specific per Scala Runner specification

Avoid lets and consts when using vars has the same observable semantics.

--js-module-split-style​

IMPLEMENTATION specific per Scala Runner specification

The Scala.js module split style: fewestmodules, smallestmodules, smallmodulesfor

--js-small-module-for-package​

IMPLEMENTATION specific per Scala Runner specification

Create as many small modules as possible for the classes in the passed packages and their subpackages.

--js-es-version​

SHOULD have per Scala Runner specification

The Scala.js ECMA Script version: es5_1, es2015, es2016, es2017, es2018, es2019, es2020, es2021

--js-linker-path​

IMPLEMENTATION specific per Scala Runner specification

Path to the Scala.js linker

--js-cli-version​

IMPLEMENTATION specific per Scala Runner specification

Scala.js CLI version to use for linking (1.22.0.1 by default).

--js-cli-java-arg​

IMPLEMENTATION specific per Scala Runner specification

Scala.js CLI Java options

--js-cli-on-jvm​

IMPLEMENTATION specific per Scala Runner specification

Whether to run the Scala.js CLI on the JVM or using a native executable

Scala Native options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--native​

SHOULD have per Scala Runner specification

Enable Scala Native. To show more options for Scala Native pass --help-native

--native-version​

SHOULD have per Scala Runner specification

Set the Scala Native version (0.5.12 by default).

--native-mode​

SHOULD have per Scala Runner specification

Set Scala Native compilation mode (debug by default): debug, release-fast, release-size, release-full

--native-lto​

SHOULD have per Scala Runner specification

Link-time optimisation mode (none by default): none, full, thin

--native-gc​

SHOULD have per Scala Runner specification

Set the Scala Native garbage collector (immix by default): immix, commix, boehm, none

--native-clang​

IMPLEMENTATION specific per Scala Runner specification

Path to the Clang command

--native-clangpp​

IMPLEMENTATION specific per Scala Runner specification

Path to the Clang++ command

--native-linking​

SHOULD have per Scala Runner specification

Extra options passed to clang verbatim during linking

--native-linking-defaults​

IMPLEMENTATION specific per Scala Runner specification

Use default linking settings

--native-compile​

SHOULD have per Scala Runner specification

List of compile options

--native-c-compile​

SHOULD have per Scala Runner specification

List of compile options (C files only)

--native-cpp-compile​

SHOULD have per Scala Runner specification

List of compile options (C++ files only)

--native-compile-defaults​

IMPLEMENTATION specific per Scala Runner specification

Use default compile options

--native-target​

SHOULD have per Scala Runner specification

Build target type

--embed-resources​

SHOULD have per Scala Runner specification

Embed resources into the Scala Native binary (can be read with the Java resources API)

--native-multithreading​

SHOULD have per Scala Runner specification

Enable/disable Scala Native multithreading support

Scalac options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--args-file​

IMPLEMENTATION specific per Scala Runner specification

File with scalac options.

--scalac-option​

Aliases: -O, --scala-opt, --scala-option

IMPLEMENTATION specific per Scala Runner specification

Add a scalac option. Note that options starting with -g, -language, -opt, -P, -target, -V, -W, -X, and -Y are assumed to be Scala compiler options and don't require to be passed after -O or --scalac-option.

Scalac extra options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--scalac-help​

Aliases: --help-scalac

IMPLEMENTATION specific per Scala Runner specification

Show help for scalac. This is an alias for --scalac-option -help

--scalac-verbose​

Aliases: --verbose-scalac

IMPLEMENTATION specific per Scala Runner specification

Turn verbosity on for scalac. This is an alias for --scalac-option -verbose

Scope options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--test​

Aliases: --test-scope, --with-test, --with-test-scope

SHOULD have per Scala Runner specification

Include test scope

Shared options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--scala-version​

Aliases: -S, --scala

MUST have per Scala Runner specification

Set the Scala version (3.9.0 by default)

--scala-binary-version​

Aliases: -B, --scala-bin, --scala-binary

MUST have per Scala Runner specification

Set the Scala binary version

--extra-jars​

Aliases: --class, --class-path, --classes, -classpath, --classpath, -cp, --extra-class, --extra-class-path, --extra-classes, --extra-jar, --jar, --jars

MUST have per Scala Runner specification

Add extra JARs and compiled classes to the class path

--extra-compile-only-jars​

Aliases: --compile-only-jar, --compile-only-jars, --extra-compile-only-jar

SHOULD have per Scala Runner specification

Add extra JARs in the compilaion class path. Mainly using to run code in managed environments like Spark not to include certain depenencies on runtime ClassPath.

--extra-source-jars​

Aliases: --extra-source-jar, --source-jar, --source-jars

SHOULD have per Scala Runner specification

Add extra source JARs

--resource-dirs​

Aliases: --resource, --resource-dir

MUST have per Scala Runner specification

Add a resource file or directory

--platform​

SHOULD have per Scala Runner specification

Specify platform

--scala-library​

IMPLEMENTATION specific per Scala Runner specification

--with-compiler​

Aliases: -with-compiler, --with-scala-compiler

MUST have per Scala Runner specification

Allows to include the Scala compiler artifacts on the classpath.

--java​

IMPLEMENTATION specific per Scala Runner specification

Do not add dependency to Scala Standard library. This is useful, when Scala CLI works with pure Java projects.

--runner​

IMPLEMENTATION specific per Scala Runner specification

Should include Scala CLI runner on the runtime ClassPath. Runner is added by default for application running on JVM using standard Scala versions. Runner is used to make stack traces more readable in case of application failure.

--strict-bloop-json-check​

IMPLEMENTATION specific per Scala Runner specification

--compilation-output​

Aliases: --compile-out, --compile-output, -d, --destination, --output-directory

MUST have per Scala Runner specification

Copy compilation results to output directory, or package them as a library JAR when the path ends with .jar

--with-toolkit​

Aliases: --toolkit

IMPLEMENTATION specific per Scala Runner specification

Add toolkit to classPath (not supported in Scala 2.12), 'default' version for Scala toolkit: 0.9.2, 'default' version for typelevel toolkit: 0.2.0

--exclude​

IMPLEMENTATION specific per Scala Runner specification

Exclude sources

--auto-setup-ide​

Aliases: --auto-setup-bsp

IMPLEMENTATION specific per Scala Runner specification

Automatically generate BSP configuration in .bsp/ when running build commands. Enabled by default.

[deprecated] --deprecated-test-option​

Deprecated: For testing purposes only.

IMPLEMENTATION specific per Scala Runner specification

Deprecated test option (internal, do not use)

--deprecated-test-alias-option​

Aliases: [deprecated] --deprecated-test-alias

IMPLEMENTATION specific per Scala Runner specification

Option with deprecated alias (internal, do not use)

Snippet options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--script-snippet​

SHOULD have per Scala Runner specification

Allows to execute a passed string as a Scala script

--execute-script​

Aliases: -e, --execute-sc, --execute-scala-script

SHOULD have per Scala Runner specification

A synonym to --script-snippet, which defaults the sub-command to run when no sub-command is passed explicitly

--scala-snippet​

SHOULD have per Scala Runner specification

Allows to execute a passed string as Scala code

--execute-scala​

IMPLEMENTATION specific per Scala Runner specification

A synonym to --scala-snippet, which defaults the sub-command to run when no sub-command is passed explicitly

--java-snippet​

IMPLEMENTATION specific per Scala Runner specification

Allows to execute a passed string as Java code

--execute-java​

IMPLEMENTATION specific per Scala Runner specification

A synonym to --scala-snippet, which defaults the sub-command to run when no sub-command is passed explicitly

Source generator options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

This section was automatically generated and may be empty if no options were available.

Suppress warning options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--suppress-directives-in-multiple-files-warning​

Aliases: --suppress-warning-directives-in-multiple-files

IMPLEMENTATION specific per Scala Runner specification

Suppress warnings about using directives in multiple files

--suppress-outdated-dependency-warning​

IMPLEMENTATION specific per Scala Runner specification

Suppress warnings about outdated dependencies in project

Test options​

Available in commands:

test

--test-frameworks​

Aliases: --test-framework

SHOULD have per Scala Runner specification

Names of the test frameworks' runner classes to use while running tests. Skips framework lookup and only runs passed frameworks.

--require-tests​

SHOULD have per Scala Runner specification

Fail if no test suites were run

--test-only​

SHOULD have per Scala Runner specification

Specify a glob pattern to filter the tests suite to be run.

Uninstall options​

Available in commands:

uninstall

--force​

Aliases: -f

IMPLEMENTATION specific per Scala Runner specification

Force scala-cli uninstall

--skip-cache​

IMPLEMENTATION specific per Scala Runner specification

Don't clear Scala CLI cache

--binary-name​

IMPLEMENTATION specific per Scala Runner specification

Binary name

--bin-dir​

IMPLEMENTATION specific per Scala Runner specification

Binary directory

Uninstall completions options​

Available in commands:

uninstall, uninstall completions , uninstall-completions

--rc-file​

IMPLEMENTATION specific per Scala Runner specification

Path to *rc file, defaults to .bashrc or .zshrc depending on shell

--banner​

IMPLEMENTATION specific per Scala Runner specification

Custom banner in comment placed in rc file

--name​

IMPLEMENTATION specific per Scala Runner specification

Custom completions name

Update options​

Available in commands:

update

--binary-name​

IMPLEMENTATION specific per Scala Runner specification

Binary name

--bin-dir​

IMPLEMENTATION specific per Scala Runner specification

Binary directory

--force​

Aliases: -f

IMPLEMENTATION specific per Scala Runner specification

Force update Scala CLI if it is outdated

--is-internal-run​

IMPLEMENTATION specific per Scala Runner specification

--gh-token​

IMPLEMENTATION specific per Scala Runner specification

A github token used to access GitHub. Not needed in most cases.

Verbosity options​

Available in commands:

bsp, clean, compile, config, doc, fmt , format , scalafmt, help, install completions , install-completions, install-home, repl , console, run, setup-ide, shebang, test, uninstall, uninstall completions , uninstall-completions, update, version

--verbose​

Aliases: -v, -verbose

IMPLEMENTATION specific per Scala Runner specification

Increase verbosity (can be specified multiple times)

--interactive​

Aliases: -i

IMPLEMENTATION specific per Scala Runner specification

Interactive mode

--actions​

IMPLEMENTATION specific per Scala Runner specification

Enable actionable diagnostics

Version options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test, version

--cli-version​

Aliases: --cli

IMPLEMENTATION specific per Scala Runner specification

Show plain Scala CLI version only

--scala-version​

Aliases: --scala

IMPLEMENTATION specific per Scala Runner specification

Show plain Scala version only

--gh-token​

IMPLEMENTATION specific per Scala Runner specification

A github token used to access GitHub. Not needed in most cases.

--offline​

IMPLEMENTATION specific per Scala Runner specification

Don't check for the newest available Scala CLI version upstream

Watch options​

Available in commands:

compile, repl , console, run, shebang, test

--watch​

Aliases: -w

SHOULD have per Scala Runner specification

Run the application in the background, automatically wake the thread and re-run if sources have been changed

--restart​

Aliases: --revolver

SHOULD have per Scala Runner specification

Run the application in the background, automatically kill the process and restart if sources have been changed

Internal options​

Bsp options​

Available in commands:

bsp

--json-options​

IMPLEMENTATION specific per Scala Runner specification

Command-line options JSON file

--json-launcher-options​

IMPLEMENTATION specific per Scala Runner specification

Command-line launcher options JSON file

--envs​

Aliases: --envs-file

IMPLEMENTATION specific per Scala Runner specification

Command-line options environment variables file

Bsp file options​

Available in commands:

clean, setup-ide

--bsp-directory​

Aliases: --bsp-dir

IMPLEMENTATION specific per Scala Runner specification

Custom BSP configuration location

--bsp-name​

Aliases: --name

IMPLEMENTATION specific per Scala Runner specification

Name of BSP

Coursier options​

Available in commands:

bsp, compile, config, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test, uninstall

--ttl​

IMPLEMENTATION specific per Scala Runner specification

Specify a TTL for changing dependencies, such as snapshots

--cache​

IMPLEMENTATION specific per Scala Runner specification

Set the coursier cache location

--coursier-validate-checksums​

IMPLEMENTATION specific per Scala Runner specification

Enable checksum validation of artifacts downloaded by coursier

Input options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--default-forbidden-directories​

IMPLEMENTATION specific per Scala Runner specification

--forbid​

IMPLEMENTATION specific per Scala Runner specification

Install home options​

Available in commands:

install-home

--scala-cli-binary-path​

IMPLEMENTATION specific per Scala Runner specification

--force​

Aliases: -f

IMPLEMENTATION specific per Scala Runner specification

Overwrite if it exists

--binary-name​

IMPLEMENTATION specific per Scala Runner specification

Binary name

--env​

IMPLEMENTATION specific per Scala Runner specification

Print the update to env variable

--bin-dir​

IMPLEMENTATION specific per Scala Runner specification

Binary directory

Semantic db options​

Available in commands:

bsp, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--semantic-db​

Aliases: --semanticdb

SHOULD have per Scala Runner specification

Generate SemanticDBs

--semantic-db-target-root​

Aliases: --semanticdb-target-root, --semanticdb-targetroot

SHOULD have per Scala Runner specification

SemanticDB target root (default to the compiled classes destination directory)

--semantic-db-source-root​

Aliases: --semanticdb-source-root, --semanticdb-sourceroot

SHOULD have per Scala Runner specification

SemanticDB source root (default to the project root directory)

Setup IDE options​

Available in commands:

setup-ide

--charset​

IMPLEMENTATION specific per Scala Runner specification

Workspace options​

Available in commands:

bsp, clean, compile, doc, fmt , format , scalafmt, repl , console, run, setup-ide, shebang, test

--workspace​

IMPLEMENTATION specific per Scala Runner specification

Directory where .scala-build is written