Created using :
This repository contains several small CLIs that aim at demonstrating the various capabilities of picoCLI.
You can find :
- SwaCLIBasic Not doing anything but showing how picoCLI comes with batteries included
- SwaCLIOptions A small demonstration on how to use (mutually exclusive) options and arguments
- SwaCLISubCommands A small demonstration on how to use subcommands
- SwaCLIPaginate A small demonstration on how to use subcommands and paginate the results. Default command in the sw compilable
- SwaCLIProgrammatic An example that uses the programmatic API instead of the annotation system.
- SwaCLISubCommandsTest An example on how to test commandline configurations
All examples are in Kotlin and provide the same rough capabilities (get some facts about characters or planets in Star Wars)
$ ./gradlew customFatJar
$ java -cp build/libs/all-in-one-jar-1.0-SNAPSHOT.jar nl.lengrand.swacli.SwaCLIPaginate
or if you're on Mac give a shot to the latest release.
You'll need to have GraalVM and the native image extension setup on your system :)
$ cd build/libs;native-image --static -jar all-in-one-jar-1.0-SNAPSHOT.jar sw --enable-http --enable-https
# remove static if you're on Mac :)
This is an example CLI that I created as illustration for my JFall 2020 talk
You can check out the slides here.