Skip to content

v2.0.0-M15

Pre-release
Pre-release
Compare
Choose a tag to compare
@alexarchambault alexarchambault released this 16 Mar 12:06
85e378a

Help / description message for apps and commands

Use like

@HelpMessage("Does something")
case class MyAppOptions(
  n: Int = 0
)

object MyApp extends CaseApp[MyAppOptions] {
  def run(options: MyAppOptions, args: RemainingArgs): Unit =
    ???
}

prints a help message like

MyApp
Does something
Usage: my-app [options]
  --usage  <bool>
        Print usage and exit
  --help | -h  <bool>
        Print help message and exit
  -n  <int>

Added in #187, thanks to @regadas.