CliktCommand(help: String = "", epilog: String = "", name: String? = null, invokeWithoutSubcommand: Boolean = false)
The CliktCommand is the core of command line interfaces in Clikt.
Command line interfaces created by creating a subclass of CliktCommand with properties defined with
option and argument. You can then parse argv
by calling main, which will take care of printing
errors and help to the user. If you want to handle output yourself, you can use parse instead.
Once the command line has been parsed and all of the parameters are populated, run is called.
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.