CliktCommand

fun CliktCommand(help: String = "", epilog: String = "", name: String? = null, invokeWithoutSubcommand: Boolean = false, printHelpOnEmptyArgs: Boolean = false, helpTags: Map<String, String> = emptyMap(), autoCompleteEnvvar: String? = "", allowMultipleSubcommands: Boolean = false, treatUnknownOptionsAsArgs: Boolean = false)

Parameters

help

The help for this command. The first line is used in the usage string, and the entire string is used in the help output. Paragraphs are automatically re-wrapped to the terminal width.

epilog

Text to display at the end of the full help output. It is automatically re-wrapped to the terminal width.

name

The name of the program to use in the help output. If not given, it is inferred from the class name.

invokeWithoutSubcommand

Used when this command has subcommands, and this command is called without a subcommand. If true, run will be called. By default, a PrintHelpMessage is thrown instead.

printHelpOnEmptyArgs

If this command is called with no values on the command line, print a help message (by throwing PrintHelpMessage) if this is true, otherwise run normally.

helpTags

Extra information about this option to pass to the help formatter.

autoCompleteEnvvar

The envvar to use to enable shell autocomplete script generation. Set to null to disable generation.

allowMultipleSubcommands

If true, allow multiple of this command's subcommands to be called sequentially. This will disable allowInterspersedArgs on the context of this command an its descendants. This functionality is experimental, and may change in a future release.

treatUnknownOptionsAsArgs

If true, any options on the command line whose names aren't valid will be parsed as an argument rather than reporting an error. You'll need to define an argument().multiple() to collect these options, or an error will still be reported. Unknown short option flags grouped with other flags on the command line will always be reported as errors.