When I first read about scala-cli, I wasn’t quite sure of the motivation while you have the Scala REPL itself, sbt console, ammonite etc.
I took scala-cli
for a ride. My first impressions, if I have to put it one line:
One thing that stood out to me is the simplicity.
scala-cli
is very approachable. Generally speaking, the command line options are the first line of discouragement for any command line tool. It is a relief that scala-cli
kept the list of options extremely simple and intuitive yet powerful.
While scripting in Scala is available in many flavors elsewhere (ammonite, IntelliJ worksheet etc.), it is a no-brainer in scala-cli
. Especially with the shebang (#!/usr/bin/env scala-cli
), it is as simple as it can get.
In the process of learning the commands, I distilled this cheatsheet (mostly for myself). It is not extensive but a 10-min quick start guide. I will update the cheatsheet as I learn more.