Scala Native CLI Template, with all the usual dependencies included and configured already:
- Scala 3
- Scala Native
- Scala Test
- Command Parsing
- Command Autocompletion
- Config Parsing (TODO)
- Command Line Prompts (TODO)
- Example Table Printer
You have to have latest scala, sbt and llvm available on your system.
On a mac you can get it via:
brew install scala
brew install sbt
brew install llvmIt will install in sub directory (using the project name you have chosen).
The template will ask number of questions about desired versions of things, normally you should be fine to use defaults.
sbt new spikerlabs/scala-native-cli.g8Infrastructure code is reusable and suggested structure is scalable towards complex real use cases.
Test, Build and Run:
sbt clean test compile nativeLink
./target/scala-3.3.6/example-cli hello --helpThis is a Giter8 template, which integrates beautifully with sbt.
It is heavily inspired by Anton Sviridov's talk Modern Command Line Applications with Scala Native at Scala User Group London.