Skip to content
Philip Helger edited this page Apr 8, 2026 · 3 revisions

Command-line argument parsing library, loosely based on Apache commons-cli with cleanup and naming improvements.

Highlights:

  • Options - define available command-line options
  • Option / OptionBuilder - individual option definition with fluent API
  • OptionGroup - mutually exclusive option groups
  • CmdLineParser - parse command-line arguments against defined options
  • ParsedCmdLine - result of parsing with typed access to values
  • HelpFormatter - generate usage/help text

Maven usage

Add the following to your pom.xml to use this artifact:

<dependency>
  <groupId>com.helger.commons</groupId>
  <artifactId>ph-cli</artifactId>
  <version>x.y.z</version>
</dependency>

Note: the Maven groupId changed in v10 from com.helger to com.helger.commons

Clone this wiki locally