Skip to content


clikt / com.github.ajalt.clikt.core

Package com.github.ajalt.clikt.core


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 that is a class NoOpCliktCommand :CliktCommand
ParameterHolder interface ParameterHolder
StaticallyGroupedOption interface StaticallyGroupedOption :Option
TypoSuggestor typealias TypoSuggestor = (enteredValue:String, possibleValues:List<String>) ->List<String>


Name Summary
ParameterHolderDsl annotation class ParameterHolderDsl


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.class BadParameterValue :UsageError
CliktError An exception during command line processing that should be shown to the 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.class IncorrectArgumentValueCount :UsageError
IncorrectOptionValueCount An option was supplied but the number of values supplied to the option was incorrect.class IncorrectOptionValueCount :UsageError
InvalidFileFormat A configuration file failed to parse correctlyclass InvalidFileFormat :UsageError
MissingArgument A required argument was not providedclass MissingArgument :UsageError
MissingOption A required option was not providedclass MissingOption :UsageError
MutuallyExclusiveGroupException class MutuallyExclusiveGroupException :UsageError
NoSuchOption An option was provided that does not exist.class NoSuchOption :NoSuchParameter
NoSuchParameter A parameter was provided that does not class NoSuchParameter :UsageError
NoSuchSubcommand A subcommand was provided that does not exist.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 class PrintMessage :CliktError
ProgramResult Indicate that that the program finished in a controlled manner, and should complete with the given statusCodeclass ProgramResult :CliktError
UsageError An internal exception that signals a usage class UsageError :CliktError


Name Summary
context Configure this command’s <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?>
findOrSetObject Find the closest object of type T, setting context.obj if one is not <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 <T :CliktCommand> T.subcommands(commands:Iterable<CliktCommand>): T
fun <T :CliktCommand> T.subcommands(vararg commands:CliktCommand): T