option

fun <T : Any> option(name: String, default: T? = null, flag: T? = null, examples: List<String>? = null, parser: (arg: String) -> T? = { arg -> arg as T }): CLIOption<T>

getopt

  • -a → short option

  • --all → long option

  • -o file or -ofile → option with value

  • -- → end of options

  • Options come before positional args (usually)

Source