Index

clikt / com.github.ajalt.clikt.core

Package com.github.ajalt.clikt.core

Types

Name Summary
CliktCommand The CliktCommand is the core of command line interfaces in Clikt.abstract class CliktCommand :ParameterHolder
Context A object used to control command line parsing and pass data between commands.class Context
GroupableOption An option that can be added to a ParameterGroupinterface GroupableOption :StaticallyGroupedOption
NoOpCliktCommand A CliktCommand that has a default implementation of CliktCommand.run that is a no-op.open class NoOpCliktCommand :CliktCommand
NoRunCliktCommand open class ~~NoRunCliktCommand~~ :CliktCommand
ParameterHolder interface ParameterHolder
StaticallyGroupedOption interface StaticallyGroupedOption :Option
TypoSuggestor typealias TypoSuggestor = (enteredValue:String, possibleValues:List<String>) ->List<String>

Annotations

Name Summary
ParameterHolderDsl annotation class ParameterHolderDsl

Exceptions

Name Summary
Abort An internal error that signals Clikt to abort.class Abort :RuntimeException
BadParameterValue A parameter was given the correct number of values, but of invalid format or type.open class BadParameterValue :UsageError
CliktError An exception during command line processing that should be shown to the user.open class CliktError :RuntimeException
FileNotFound A required configuration file was not found.class FileNotFound :UsageError
IncorrectArgumentValueCount An argument was supplied but the number of values supplied was incorrect.open class IncorrectArgumentValueCount :UsageError
IncorrectOptionValueCount An option was supplied but the number of values supplied to the option was incorrect.open class IncorrectOptionValueCount :UsageError
InvalidFileFormat A configuration file failed to parse correctlyclass InvalidFileFormat :UsageError
MissingParameter A required parameter was not providedopen class MissingParameter :UsageError
MutuallyExclusiveGroupException open class MutuallyExclusiveGroupException :UsageError
NoSuchOption An option was provided that does not exist.open class NoSuchOption :NoSuchParameter
NoSuchParameter A parameter was provided that does not exist.open class NoSuchParameter :UsageError
NoSuchSubcommand A subcommand was provided that does not exist.open class NoSuchSubcommand :NoSuchParameter
PrintCompletionMessage An exception that indicates that shell completion code should be printed.class PrintCompletionMessage :PrintMessage
PrintHelpMessage An exception that indicates that the command’s help should be printed.class PrintHelpMessage :CliktError
PrintMessage An exception that indicates that a message should be printed.open class PrintMessage :CliktError
UsageError An internal exception that signals a usage error.open class UsageError :CliktError

Functions

Name Summary
context Configure this command’s Context.fun <T :CliktCommand> T.context(block: Builder.() ->Unit): T
findObject Find the closest object of type T, or nullfun <T :Any>CliktCommand.findObject():ReadOnlyProperty<CliktCommand, T?>``fun <T :Any>CliktCommand.~~findObject~~(default: () -> T):ReadOnlyProperty<CliktCommand, T>
findOrSetObject Find the closest object of type T, setting context.obj if one is not found.fun <T :Any>CliktCommand.findOrSetObject(default: () -> T):ReadOnlyProperty<CliktCommand, T>
requireObject Find the closest object of type T, or throw a NullPointerExceptionfun <T :Any>CliktCommand.requireObject():ReadOnlyProperty<CliktCommand, T>
subcommands Add the given commands as a subcommand of this command.fun <T :CliktCommand> T.subcommands(commands:Iterable<CliktCommand>): T
fun <T :CliktCommand> T.subcommands(vararg commands:CliktCommand): T