-
Notifications
You must be signed in to change notification settings - Fork 444
Plans and Notes for Future Articles
Below is a TODO list of picocli articles to write to make the world a better place.
How the @PicocliScript annotation gives your Groovy script magical powers. User input is transformed and arranged into the right @Field before your script body starts. Bonus: ANSI colored and styled usage help. Extra bonus: command line TAB autocompletion.
Apart from the Groovy script support, there have been many changes to support mixing options with positional parameters on the command line. The type attribute is rarely needed anymore. Usage help and version information is now printed automatically with the convenience methods. The help option attribute is deprecated. The run and call convenience methods now work with subcommands. The parseWithHandler methods is great for subcommands but also decouples business logic from the infrastructure code.
Programmatic API makes it possible to apply picocli in a wide range of applications. One example is that it’s easy to build DSLs (Domain Specific Languages) like Groovy CliBuilder, or use picocli in applications where command line options are defined dynamically. 3.0 also adds support for reuse via Mixins, gives fine-grained control over STDOUT vs STDERR and exit codes. The programmatic API also facilitates the use of picocli in JVM languages where annotations and reflection are not supported or not convenient.
Lessons learned while migrating the Groovy command line tools from Commons CLI to picocli.
Java command line applications can now have TAB autocompletion when running on Bash. Now that Windows 10 natively supports Bash, that means pretty much anywhere! This is how you do it…
If you’re creating Kotlin command line applications, you may want to consider using this small library to parse command line options and output a smart-looking usage help message with ANSI colors and styles. Bonus: command line TAB autocompletion.
If you’re creating Scala command line applications, you may want to consider using this small library to parse command line options and output a smart-looking usage help message with ANSI colors and styles. Bonus: command line TAB autocompletion.
Walk through the steps of building a command line application with subcommands. Demonstrates some of the things that picocli makes easy, and some of the things that you need to be aware of. Emphasize the convenience methods and error handling. For example, how to have global options apply to all subcommands. (Related: https://github.com/remkop/picocli/issues/247, https://github.com/remkop/picocli/issues/248, https://github.com/remkop/picocli/issues/175)
How do you write unit tests for command line applications built with picocli?
Article on the idea to provide options with a similar prefix that give users different options for authenticating. See discussion in https://github.com/remkop/picocli/issues/176
Good timing for this article may be after https://github.com/remkop/picocli/issues/82 is implemented. We could suggest this in the user manual section on that feature as well.