Skip to content

Plans and Notes for Future Articles

Remko Popma edited this page May 27, 2018 · 33 revisions

…​ the world needs more picocli articles!

Below is a TODO list of picocli articles to write to make the world a better place.

Picocli v2: Groovy Scripts on Steroids

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.

Picocli v2: What’s New?

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.

Picocli v3: Not Your Father’s Command Line Parser

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.

Command Line TAB Autocompletion for Java with 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…​

ANSI Colors and Style for Kotlin Command Line Apps via Picocli

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.

ANSI Colors and Style for Scala Command Line Apps via Picocli

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.

Command Line Applications with Subcommands Made Easy with Picocli

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)

Testing Picocli-based Command Line Applications

How do you write unit tests for command line applications built with picocli?

option modifiers

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.

Clone this wiki locally