Builder

class Builder(command: CliktCommand, parent: Context?)

Functions

Link copied to clipboard
fun valueSources(vararg sources: ValueSource)

Set multiple sources that will attempt to read values for options not present on the command line.

Properties

Link copied to clipboard
var allowInterspersedArgs: Boolean

If false, options and arguments cannot be mixed; the first time an argument is encountered, all remaining tokens are parsed as arguments.

Link copied to clipboard
var autoEnvvarPrefix: String?

The prefix to add to inferred envvar names.

Link copied to clipboard
var console: CliktConsole

The console that will handle reading and writing text.

Link copied to clipboard
var correctionSuggestor: TypoSuggestor

A callback called when the command line contains an invalid option or subcommand name. It takes the entered name and a list of all registered names option/subcommand names and filters the list down to values to suggest to the user.

Link copied to clipboard
var envvarReader: (key: String) -> String?

A function called by Clikt to get a parameter value from a given environment variable

Link copied to clipboard
var expandArgumentFiles: Boolean

If true, arguments starting with @ will be expanded as argument files. If false, they will be treated as normal arguments.

Link copied to clipboard
var helpFormatter: HelpFormatter?

The help formatter for this command, or null to use the default

Link copied to clipboard
var helpOptionNames: Set<String>

The names to use for the help option.

Link copied to clipboard
var localization: Localization

Localized strings to use for help output and error reporting.

Link copied to clipboard
var printExtraMessages: Boolean

Set this to false to prevent extra messages from being printed automatically.

Link copied to clipboard
var readEnvvarBeforeValueSource: Boolean

If false,the valueSource is searched before environment variables.

Link copied to clipboard
var tokenTransformer: Context.(String) -> String

An optional transformation function that is called to transform command line

Link copied to clipboard
var valueSource: ValueSource?

The source that will attempt to read values for options that aren't present on the command line.