Options
Passing flags, like --flag, sets them to true. Use --flag=false (note the = sign) to set them to false.
Help
--help
Prints the available options and exits.
Installation
--install
Has to be passed to install the kernel.
--force
Erase a previously installed kernel with the same ID.
--id
Set the kernel id, like --id custom-id. This id is used to construct the path where this kernel's spec is going to be installed. Use like
--id scala212
Default: scala
--display-name
Set the displayed name for this kernel. This is the name that appears in the Jupyter menus, etc. Use like
--display-name "Scala (2.12)"
Default: Scala
--global
Whether to install this kernel system-wide or not.
System-wide kernels get installed under /usr/local/share/jupyter/kernels (Linux and OS X). User-wide ones (default) under ~/.local/share/jupyter/kernels (Linux) or ~/Library/Jupyter/kernels (Mac).
--jupyter-path
Path to your Jupyter kernels directory, e.g. /opt/conda/share/jupyter/kernels
--logo
Path to a 64 x 64 PNG file. Set to an empty string to remove the default logo, like --logo "". (Defaults to a scala logo embedded with the kernel.)
--arg / --command
Customize the command to spawn the kernel.
By default, it is assumed coursier or a coursier launcher is involved during the installation. This allows to get the command that spawns the kernel for install. (Actual executable is located via the coursier.mainJar Java property, and its arguments via coursier.main.arg-0, coursier.main.arg-1, ... Java properties.) This command is then used to later start actual kernels.
To override that behavior, pass --args or --command options. --arg allows to pass each argument individually, like
--arg "/path to/executable" --arg first-arg --arg second-arg
--command allows to pass a command as a whole, like
--command "/path/to/executable first-arg second-arg"
which is latter split at space chars.
--copy-launcher
Whether to copy the kernel launcher in the kernel installation directory.
Default: true if --arg and --command aren't specified, false else.
Scala-related
--silent-imports
Suppress the automatic output for import statements. Disabled by default. Enable it when installing the kernel:
cs launch --use-bootstrap almond:0.15.0 --scala 2.13.18 -- --install --silent-imports
Add --force when replacing an existing kernel installation.
To limit automatic output for values as well, use --last-value-only.
--last-value-only
Display only the last value defined or computed in each cell, reducing the output chatter described in issue #256. Disabled by default; pass --last-value-only=false to restore the usual output.
Enable it when installing the kernel:
cs launch --use-bootstrap almond:0.15.0 --scala 2.13.18 -- --install --last-value-only
The newer launcher also accepts this option directly:
cs launch --use-bootstrap sh.almond::launcher:0.15.0 -- --install --last-value-only
Add --force when replacing an existing kernel installation, then start a new kernel session.
For example, this cell displays only second: Int = 2:
val first = 1
val second = first + 1
All statements still execute, and both variables remain available in subsequent cells. Import statements and class, method, and type definitions are not echoed. Trailing imports or definitions do not replace the last value. If the last value has type Unit, no automatic result is displayed.
Explicit output, such as println and display() calls, is still shown. Rich values such as almond.display.Html are displayed automatically only when they are the last value in the cell.
--predef-code
Run some code right before the session starts. Makes the kernel start fail if the predef doesn't compile or throws an exception. Use like
--predef-code " import scala.collection.JavaConverters._ "
--auto-update-vars
Whether the output of top-level vars should be updated when they change later on (default: true). See Auto-updated variables. Disable with
--auto-update-vars=false
--auto-update-lazy-vals
Whether the output of top-level lazy vals should be updated when they're computed (default: true). See Auto-updated variables.
Dependency-related
--extra-repository
Add some Maven repositories right when a kernel starts. (~/.ivy2/local and Maven Central are added by default.) Use like
--extra-repository https://oss.sonatype.org/content/repositories/snapshots
--extra-repository sonatype:staging
--auto-dependency
--force-property
--profile
Internals
--log
Sets the kernel log level. Can be any of
none,error,warn(default),info,debug.
--special-loader
--use-thread-interrupt
Whether to use 'Thread.interrupt' method or deprecated 'Thread.stop' method (default) when interrupting kernel.
Jupyter-related
--interrupt-via-message
Whether to ask front-ends to send interrupt messages via SIGINT (default) or a zeromq message.
--banner
Add extra messages to the banner of this kernel (shown via Help > About in Jupyter classic). Use like
--banner " Extra info Some more "
--link
Add entries to the Help menu (Jupyter classic). Use like
--link "https://github.com|GitHub"
--link "https://google.com|Google"
--connection-file
Other
--toree-magics
Enable experimental support for Toree magics.
Simple line magics such as %AddDeps (always assumed to be transitive as of writing this, --transitive is just ignored), %AddJar, and cell magics such as %%html or %%javascript are supported. Note that %%javascript only works from Jupyter classic, as JupyterLab doesn't allow for random javascript code execution.