All Versions
22
Latest Version
Avg Release Cycle
46 days
Latest Release
80 days ago

Changelog History
Page 1

  • v3.1.0

    December 12, 2020

    2020-12-12

    โž• Added

    • โž• Added required() and defaultLazy() for nullable flag options like switch(). (#240)
    • โž• Added support for generating autocomplete scripts for Fish shells (#189)
    • โž• Added CompletionCommand and CliktCommand.completionOption() that will print an autocomplete script when invoked, as an alternative to using environment variables.

    ๐Ÿ”„ Changed

    • โšก๏ธ Updated Kotlin to 1.4.21
    • @argfiles now allow line breaks in quoted values, which are included in the value verbatim. You can now end lines with \ to concatenate them with the following line. (#248)
  • v3.0.1

    September 03, 2020

    2020-09-03

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ Deprecated calling echo with err or lineSeparator but no message.
  • v3.0.0

    September 02, 2020

    2020-09-02

    โž• Added

    • ๐Ÿ’ป Clikt's JS target now supports both NodeJS and Browsers. (#198)
    • 0๏ธโƒฃ Default values for switch options are now shown in the help. Help text can be customized using the defaultForHelp argument, similar to normal options. (#205)
    • โž• Added FlagOption.convert (#208)
    • โž• Added ability to use unicode NEL character (\u0085) to manually break lines in help output (#214)
    • โž• Added help("") extension to options and arguments as an alternative to passing the help as an argument (#207)
    • โž• Added valueSourceKey parameter to option
    • โž• Added check() extensions to options and arguments as an alternative to validate()
    • โž• Added prompt and confirm functions to CliktCommand that call the TermUi equivalents with the current console.
    • โž• Added echo() overload with no parameters to CliktCommand that prints a newline by itself.
    • โž• Added localization support. You can set an implementation of the Localization interface on your context with your translations. (#227)

    ๐Ÿ›  Fixed

    • Hidden options will no longer be suggested as possible typo corrections. (#202)
    • Options and Arguments with multiple(required=true) will now show as required in help output. (#212)
    • Multiple short lines in a help text paragraph no longer appear dedented (#215)

    ๐Ÿ”„ Changed

    • โšก๏ธ Updated Kotlin to 1.4.0
    • Argument.help and Option.help properties have been renamed to argumentHelp and optionHelp, respectively. The help parameter names to option() and argument() are unchanged.
    • commandHelp and commandHelpEpilog properties on CliktCommand are now open, so you can choose to override them instead of passing help and epilog to the constructor.
    • 0๏ธโƒฃ Replaced MapValueSource.defaultKey with ValueSource.getKey(), which is more customizable.
    • Option.metavar, Option.parameterHelp, OptionGroup.parameterHelp and Argument.parameterHelp properties are now functions.
    • ๐Ÿ”„ Changed constructor parameters of CliktHelpFormatter. Added localization and removed usageTitle, optionsTitle, argumentsTitle, commandsTitle, optionsMetavar, and commandMetavar. Those strings are now defined on equivalently named functions on Localization.

    โœ‚ Removed

    • โœ‚ Removed envvarSplit parameter from option() and convert(). Option values from environment variables are no longer split automatically. (#177)
    • โœ‚ Removed public constructors from the following classes: ProcessedArgument, OptionWithValues, FlagOption, CoOccurringOptionGroup, ChoiceGroup, MutuallyExclusiveOptions.
    • ๐Ÿ‘ป MissingParameter exception replaced with MissingOption and MissingArgument
    • โœ‚ Removed Context.helpOptionMessage. Override Localization.helpOptionMessage and set it on your context instead.

    ๐Ÿ—„ Deprecated

    • @ExperimentalCompletionCandidates and @ExperimentalValueSourceApi annotations. These APIs no longer require an opt-in.
  • v3.0.0-rc

    August 27, 2020
  • v2.8.0

    June 19, 2020

    2020-06-19

    โž• Added

    • โž• Added error parameter to PrintMessage and PrintHelpMessage. When true, CliktCommand.main will exit with status code 1. (#187)

    ๐Ÿ”„ Changed

    • ๐Ÿ–จ When printHelpOnEmptyArgs is true and no arguments are present, or when invokeWithoutSubcommand is false and no subcommand is present, CliktCommand.main will now exit with status code 1 rather than 0.
    • restrictTo now works with any Comparable value, not just Number.
    • CliktCommand.main now accepts Array<out String>, not just Array<String>. (#196)

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed option values being reset when calling multiple subcommands with allowMultipleSubcommands=true (#190)
  • v2.7.1

    May 19, 2020

    2020-05-19

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed NPE thrown in some cases when using defaultByName (#179)
  • v2.7.0

    May 13, 2020

    โž• Added

    • Ability to use custom program exit status codes via ProgramResult.
    • inputStream and outputStream conversions for options and arguments. (#157 and #159)
    • splitPair, toMap, and associate extensions on option. (#166)
    • treatUnknownOptionsAsArgs parameter to CliktCommand. (#152)
    • 0๏ธโƒฃ defaultByName function for groupChoice and groupSwitch options. (#171)

    ๐Ÿ”„ Changed

    • โšก๏ธ Update Kotlin to 1.3.71
    • ๐Ÿ‘Œ Improved command name inference. Now, a class like MyAppCommand will infer its commandName as my-app rather than myappcommand. You can still specify the name manually as before. (#168)

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ Correctly parse short options with attached values that contain =

    ๐Ÿš€ Thanks to @sschuberth for his contributions to this release!

  • v2.6.0

    March 15, 2020

    2020-03-15

    โž• Added

    • registeredSubcommands, registeredOptions, registeredArguments, and registeredParameterGroups methods on CliktCommand.
    • ๐Ÿ‘€ Ability to read default option values from configuration files and other sources. Support for Java property files is built in on JVM, see the json sample for an example of reading from other formats.
    • ๐Ÿ“„ allowMultipleSubcommands parameter to CliktCommand that allows you to pass multiple subcommands in the same call. (docs)
    • โœ๏ธ Errors from typos in subcommand names will now include suggested corrections. Corrections for options and subcommands are now based on a Jaro-Winkler similarity metric, and can be customized with Context.correctionSuggestor

    ๐Ÿ”„ Changed

    • โšก๏ธ Update Kotlin to 1.3.70
    • convert can be called more than once on the same option or argument, including after calls to conversion functions like int and file.
    • CliktCommand.toString now includes the class name
    • Reverted automatic ~ expansion in file() and path() introduced in 2.5.0. If you need this behavior, you can implement it with code like convert { /* expand tidle */ }.file()

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ wrapValue is now deprecated, since convert can be used in its place instead.
  • v2.5.0

    February 22, 2020

    2020-02-22

    โž• Added

    • ๐ŸŽ Clikt is now available as a Kotlin Multiplatform Project, supporting JVM, NodeJS, and native Windows, Linux, and macOS.
    • eagerOption {} function to more easily register eager options.
    • Eager options can now be added to option groups in help out by passing a value for groupName when creating them.
    • canBeSymlink parameter to file() and path() conversions that can be used to disallow symlinks
    • CliktCommand.eagerOption to simplify creating custom eager options

    ๐Ÿ”„ Changed

    • ๐Ÿšš The parameter names of file() and path() conversions have changed. The existing names are deprecated, and can be converted to the new usages with an IntelliJ inspection. Note that if you are calling these functions with unnamed arguments (e.g. file(true, false)), you'll need to add argument names in order to remove the deprecation warning.

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ The CliktCommand.context property has been deprecated in favor of the new name, currentContext, to avoid confusion with the CliktCommand.context{} method.
    • ๐Ÿ—„ NoRunCliktCommand was renamed to NoOpCliktCommand. The existing class is deprecated. (#130)

    ๐Ÿ›  Fixed

    • file() and path() conversions will now properly expand leading ~ in paths to the home directory for mustExist, canBeFile, and canBeDir checks. The property value is unchanged, and can still begin with a ~. (#131)
  • v2.5.0-beta1

    February 13, 2020