Julien Lengrand-Lambert c12f8b5fce Add one-liner in README
2020-10-27 15:05:10 +01:00
2020-10-25 22:53:26 +01:00
2020-10-18 17:24:39 +02:00
2020-10-27 15:05:10 +01:00
2020-10-18 17:24:39 +02:00
2020-10-18 17:24:39 +02:00
2020-10-18 17:24:39 +02:00
2020-10-27 15:05:10 +01:00
2020-10-18 17:24:39 +02:00

SwaCLI : A simple Star Wars CLI tool

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
  • 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)

Running

$  ./gradlew customFatJar
$ java -cp build/libs/all-in-one-jar-1.0-SNAPSHOT.jar nl.lengrand.swacli.SwaCLI
# to keep color and paginate the results
$ java -Dpicocli.ansi=true -cp build/libs/all-in-one-jar-1.0-SNAPSHOT.jar nl.lengrand.swacli.SwaCLIOptions -p | less -R 
# to create the native image
$ cd build/libs;native-image --static -jar all-in-one-jar-1.0-SNAPSHOT.jar sw
# remove static if you're on Mac :)
$ cd build/libs;native-image -jar all-in-one-jar-1.0-SNAPSHOT.jar sw

Why

This is an example CLI that I created as illustration for my JFall 2020 talk

Source

Author

Description
No description provided
Readme 18 MiB
Languages
Kotlin 100%