Future releases will start to focus on the 4.x builds which include some important new features e.g. first class
positional argument support, better DI framework integration, that are not possible under 2.x/3.x without making
breaking changes. You can see progress on 4.x by following the 4x branch and its CHANGELOG.md and Migrating.md
files.
- Type Conversion improvements:
- When converting to types
DefaultTypeConverternow considers overloads ofvalueOf(),fromString()and constructors that take aCharSequenceargument
- When converting to types
- Code Modernisation
- Applied a variety of code modernisation PRs (#136, #138, #140, #143) (thanks to @khmarbaise)
- Build Cleanup
- The Maven Plugin build dependencies were updated to avoid warnings during the build process (#152) (thanks to @khmarbaise)
- Various other build warnings eliminated (thanks to @khmarbaise)
- Dependency Updates
- Apache Commons Lang upgraded to 3.18.0
This is a maintenance release to bring dependencies up to date and switch over to the new Maven Central publishing process due to Sonatype sunsetting support for the old OSSRH publishing process.
- Dependency Updates
- Apache Commons Collections upgraded to 4.5.0
- Apache Commons Lang upgraded to 3.17.0
- Classgraph upgraded to 4.8.179
- Various build and test dependencies upgraded to latest available
- Core Improvements
- First class support for
BigIntegerandBigDecimalas numeric types - First class support for
Path - Provided corrected spelling for
ConvertResult.wasSuccessful(), old mis-spelt method preserved but marked as deprecated - Added a
JpmsResourceLocatoras an additionalResourceLocatorto allow finding resources when running in a JPMS context (requires additional moduleairline-jpms-resources) - BREAKING - Only
@AirlineModuleis used as a composition annotation by default, use of the older@javax.inject.Injector@jakarta.inject.Injectannotations MUST now be explicitly configured.
- First class support for
- Help Improvements
- Added an
@SeeAlsoannotation to Airline Core (#51) - BREAKING -
airline-help-bashhas moved@BashCompletionannotation intocom.github.rvesse.airline.annotations.help.bashto avoid package collisions between this module and the core in order to allow this module to become a JPMS module
- Added an
- Fluent API Improvements
- A
ParserBuildercreated by callingwithParser()on aCliBuildercan now return control back to its parent via theparent()method for cleaner Fluid CLI definitions
- A
- Dependency Updates
- BREAKING - Minimum JDK Version is now 11
- Apache Commons Collections upgraded to 4.4
- Apache Commons Lang upgraded to 3.14.0
jakarta.injectandairline-backcompat-javaxinjectwere madeoptionalso will no longer be pulled in automatically- Various build plugins updated to the latest available versions (this only impacts developers building the library from source)
- Added new
airline-help-externalmodule with a dependency on Apache Commons CSV 1.10.0 - Added new
airline-jpms-resourcesmodule with a dependency on ClassGraph to enable resource location when Airline is used on Module Path i.e. JPMS runtime context
- Maven Plugin improvements
- Some logging has moved up to INFO from DEBUG, so you no longer have to use
-Xto see it
- Some logging has moved up to INFO from DEBUG, so you no longer have to use
- New
airline-promptsmodule provides a Fluent API for defining user prompts (#92)- Prompt timeouts so non-interactive apps don't hang forever
- Configurable prompt sources
- Configurable prompt formatting
- Prompt for keys, strings, passwords, options (from a pre-configured list) or a strongly typed value
- Integrates with Airline's type conversion
- New
airline-help-externalmodules provides new help annotations that allow more complex help to be provided via classpath/file resources rather than directly in the annotations. This is a generalisation of the mechanism already used by@Versionannotation. (#52)- Adds
@ExternalDiscussion@ExternalProse,@ExternalExitCodes,@ExternalExamplesand@ExternalExamplesTabularannotations
- Adds
- Build and Release Improvements
- All Airline modules are now fully fledged JPMS modules meaning they can be used on the JVM Module Path instead of
the Classpath where preferred
- See
airline-examplesmodule for examples of constructing amodule-info.javathat pulls in other Airline modules and seemodularExamplescript for examples of invoking an Airline based app using the Module Path
- See
- All Airline modules are now fully fledged JPMS modules meaning they can be used on the JVM Module Path instead of
the Classpath where preferred
3.0.0 is now released, so Airline 2.x will no longer be supported.
- Build Improvements
- Added GitHub Actions based CI/CD for the repository
- Added a new
airline-backcompat-javaxinjectmodule to aid Annotation Improvements (see below), this is included in the dependencies of the coreairlinemodule by default. Note that future 3.x releases may make this dependency optional as the Java ecosystem transitions away from using the oldjavaxpackages.
- Annotation Improvements
- Added
@AirlineModuleas future replacement for existing usage of@Inject @Injectcan now be eitherjavax.inject.Injectorjakarta.inject.Inject, and mixtures thereof are supported. This enables broader compatibility with applications that need/want to use either variant of the standard Java@Injectdependency.
- Added
- Parser Improvements
- Choice of composition annotations is now configurable. Defaulting to supporting the new
@AirlineModuleannotation, and for backwards compatibility both variants of the@Injectannotation as noted above.- Use
compositionAnnotationClassesfield with the@Parserannotation - Use
withCompositionAnnotations()orwithDefaultCompositionAnnotations()with theParserBuilder
- Use
- Choice of composition annotations is now configurable. Defaulting to supporting the new
NB: The changes to injection annotations have been carefully done to be fully backwards compatible with existing
Airline annotations for the 2.9.x releases. Future minor and major releases will change the default behaviour to
only support @AirlineModule. Therefore, you may wish to start migrating your applications to using this
annotation sooner rather than later and explicitly exclude legacy dependencies. See the Migration
Guide for more details on this.
- Restriction Improvements
- New
@RequiredUnlessEnvironmentrestriction for making an option/argument required only if one/more environment variables are not set
- New
- Stopped generating the airline-offline-site artifact as it is superflous
- Restriction Improvements
- New
@NoOptionLikeValuesrestriction for explicitly rejecting values that look like options i.e. start with-or--but didn't match a defined option e.g. user typos (#112)
- New
- Parser Improvements
- Added a
GreedyMaybeListValueOptionParserto cover more cases where greedy parsing behaviour is desired (#110)
- Added a
- Bug Fixes
- Fix for some option parsers being overly greedy for arity=1 options and incorrectly consuming subsequent options
(#110)
- For most users the change should have no impact other than more reliable error reporting. For users who rely
heavily upon
ClassicGetOptParseryou may notice the removal of this greediness. If you wish to retain the old behaviour configure your option parsers to include the newGreedyClassicGetOptParser.
- For most users the change should have no impact other than more reliable error reporting. For users who rely
heavily upon
- Fix for some option parsers being overly greedy for arity=1 options and incorrectly consuming subsequent options
(#110)
- Bug Fixes
- Fix for using Airline in JPMS environments (#102) (thanks to @jfallows)
- Core Improvements
@Optionannotation now allows an array of values for thetitlefield allowing options witharity> 1 to have distinct titles shown for each value the option accepts
- Bug Fixes
@AllowedEnumValuesincorrectly provides help hint that values are case insensitive when they are actually case sensitive (#100)@AllowedRawValuesdoes not handle case insensitive mode correctly (#100)@Optionwithtype = OptionType.GLOBALandtype = OptionType.GROUPare not correctly parsed at the command level (#101)
- Bug Fixes
CollectAllhandler collected multiple duplicates of the same error when certain restrictions were used. Now instead duplicates are combined into a single exception (#94)- CLIs could allow command classes with the same declared command name in their
@Commandannotation to silently override each other. Now instead an error will be thrown reporting the problem (#95) - When using group default commands and command abbreviation we can incorrectly ignore a value (#99)
- Bug Fixes
EnvVarLocatorandJvmSystemPropertyLocatorcould resolve locations incorrectly if some placeholders were undefined- Fixes some corner cases with
@FloatRangeand@DoubleRangeunderlying implementation - Fix possible NPE in maven plugin (#45)
- Restriction Improvements
- Added
@Fileand@Directoryas more explicit variants of@Path(#73) - Added
@Negativeand@Positivefor numerics (#73) - Added
@LengthRangeand@ExactLengthfor strings (#73) - Added
@AllowedEnumValuesas a simpler way of specifying@AllowedRawValueson enum typed fields (#73) - Added
@StartsWithand@EndsWithfor enforcing prefixes/suffixes on strings (#73)
- Added
- Build Improvements
- Provide
module-info.javaavailable so modules can be used on Module Path (#92) - Thanks to jfallows
- Provide
- Core Improvements
- Allow creating a
Cliinstance with an explicitParserMetadatafor situations where parser configuration cannot be specified via annotation e.g. using dynamically determined paths for user aliases - Abstract direct usage of
System.outviaChannelsfactory interface to allow the library to be used in environments that are not consoles (#78) - Thanks to sdorra
- Allow creating a
- Parser Improvements
- Allow
./as a user alias search location resolved as the current working directory - Allow extending how user alias search locations are resolved to support custom behaviours via new
ResourceLocatorinterface - Add ability to specify a force prefix for aliases which allows alias definitions to override built-ins while still being able to invoke those built-ins (#72)
- Add ability to specify default values for positional parameters in alias definitions (#69)
- Allow
- Help Improvements
- Remove deprecated methods from
CommandUsageGeneratorinterface and add newusage()overload for more easily generating usage for single commands
- Remove deprecated methods from
- Annotation Improvements
- Allow specifying global restriction annotations directly on classes used with
SingleCommand @Unrestrictedcan now be applied directly to classes to specify no global restrictions on single commands and CLIs@Versioncan now useResourceLocatorto modify search locations- Help Sections annotations can now be placed onto
@Cliannotated classes and will be inherited by all commands defined for the CLI. Commands can still override help sections as desired. (#59)- CLI defined help sections are included by CLI help generators (#57)
- Allow specifying global restriction annotations directly on classes used with
- Build Improvements
- Now possible to build with JDK 9 and JDK 10. Note that we still compile for JDK 7 compatibility
- Dependencies
- Upgraded Apache Commons Lang to 3.7 (#82)
- Upgraded Apache Commons Collections to 4.2 (#82)
- NEW - Added
airline-maven-pluginthat provides two goals (#45)- A
generategoal for generating help for your commands and CLIs during a Maven build - A
validategoal for validating that your@Commandand@Cliannotated classes have valid annotations that Airline can generate a CLI from
- A
- Parser Changes
ListValuesOptionParsernow accepts any number of values that are a multiple of the arity of the option so can now be used for options that wish to allow multiple values in a single list
- Documentation Improvements
- Documentation website now located in
docs/subfolder ofmasterbranch (#35) - New
airline-docs-VERSION-offline-site.zipand.tar.gzartifacts contain a static build of the documentation website for offline reference (#70)
- Documentation website now located in
- Core Improvements
- Removed some unnecessary helper methods from
AirlineUtilsin favour of JDK built-ins (#64)
- Removed some unnecessary helper methods from
- Help Improvements
- Fixed some issues with UsagePrinter not correctly respecting configured column limits in some cases
- Bug Fixes
- Parsing Changes
- New
ParserErrorHandlerinterface for handling non-fatal parser errors (#53)FailFast- Classic behaviour, throw as soon as error encounteredFailAll- Collect and aggregate non-fatal errors and throw as single errorCollectAll- Collect all non-fatal errors- New
ParseResult<T>interface for representing parsing result and accessing success status and errors (if any) - Support for customising type converter on a per-option/arguments basis (#54)
- New
- Help Changes
- Added
showHelpIfErrors()method toHelpOptionfor use with error handlers which collect errors e.g.CollectAll(#53)
- Added
- Annotation Changes
- New
errorHandlerfield on@Parserannotation for specifying error handler, defaults toFailFastfor backwards compatible behaviour (#53) - New
flagNegationPrefixfield on@Parserto allow specifying that if a flag option (zero arity option) name starts with that prefix the value should be set tofalseas opposed to setting flags totrueas is the normal behaviour (#63) - New
descriptionfield on@Patternto provide human readable explanation of regular expression restriction intent (#48) - Noted in Javadoc that
@Versionsupports both properties and Manifest files as data sources (#56) - Use new
typeConverterProviderfield on@Option/@Argumentsto customise the type converter for a field (#54)- Variety of built in converters provided for supporting more complex number formats
- Alternative Bases:
Hexadecimal,OctalandBinary - Abbreviations:
KiloAs1000,KiloAs1024
- Alternative Bases:
- Variety of built in converters provided for supporting more complex number formats
- New
- Bug Fixes
- Fixed a possible infinite loop in parsing when a group contains both sub-groups and commands (#55)
- Fixed possible non-deterministic ordering of option and arguments help hints (#50)
- Annotation Changes
- Removed deprecated
arityfrom@Arguments, the@MaxOccurrencesrestriction annotation (and its related annotations) provide for much finer grained control than this property did - Global restrictions can now be specified via annotations
- Removed deprecated
- Help Changes
- Removed the deprecated RONN help generators (use
airline-help-manorairline-help-markdowninstead)- This removes the
airline-help-ronnmodule (Breaking)
- This removes the
- New
@Versionannotation for embedding version information into generated help where the version information is pulled from properties files in your JARs or on the local file system - Multi-page help generators can now be configured with a base directory to control where the per-command files are created
- Removed the deprecated RONN help generators (use
- Restriction Changes
- New
GlobalRestrictionsFactoryinterface and corresponding registry inRestrictionsRegistry- Uses
ServiceLoaderfor automatic discovery, provide aMETA-INF/services/com.github.rvesse.airline.restrictions.factories.GlobalRestrictionFactoryfile to specify global restriction factories
- Uses
- Global restrictions can now be specified by adding annotations to
@Cliannotated classes - Improved
OptionRestrictionandArgumentsRestrictioninterfaces- Old
postValidate()method becomesfinalValidate() - Revised
postValidate()method with better type signature that takes the converted value
- Old
- Support partial restrictions i.e. restrictions only apply to some of the values for
@Optionor@Argumentsfields- Specified via
@Partial/@Partialsannotations in addition
- Specified via
- New
- Parser Changes
- Improve how restrictions for options and arguments are enforced
- Options must always receive precisely their
arityin values or aParseOptionMissingValueExceptionis thrown (at least with the built-in parsers)
- Bug Fixes
ManCommandUsageGeneratorcould incorrectly indent the arguments portion of the options list if both visible and hidden options are present- Man help output could fail in the options section if there were no visible options but some hidden options present
- Annotation Changes
- Marked defunct fields of
@Argumentsannotation as deprecated - Marked various annotations as
@Documentedso they are included in JavaDoc output - All fields of
@Aliasannotation are now required
- Marked defunct fields of
- Parser Changes
- Made internal helper class
ConvertResultpublic to make it easier to extend theDefaultTypeConverter
- Made internal helper class
- Documentation Improvements
- New website in progress at http://rvesse.github.io/airline/
- Module Additions and Changes
- New
airline-help-manmoduleManSectionsmoved into this module (Breaking)
- RONN help generators moved to
airline-help-ronnmodule (Breaking)- All RONN generators are marked as
@deprecatedsince they are superseded by the Man and Markdown format generators
- All RONN generators are marked as
- HTML help generators moved to
airline-help-htmlmodule (Breaking) - Bash help generators moved to
airline-help-bashmodule (Breaking)CompletionBehaviourmoved into this module (Breaking)
- New
airline-help-markdownmodule for generating Markdown help
- New
- Help Improvements
- New direct man page generation via
ManCommandUsageGenerator,ManGlobalUsageGeneratorandManMultiPageGlobalUsageGeneratorprovided in theairline-help-man- These are intended to replace use of the existing RONN generators for generating Man pages
- New direct Markdown generation via
MarkdownCommandUsageGenerator,MarkdownGlobalUsageGeneratorandMarkdownMultiPageGlobalUsageGenerator- These are intended to replace use of the existing RONN generators for generating Markdown help
CommandUsageGeneratorhas new overloads that take aParserMetadata<T>object, old overloads are deprecated in favour of these. This allows generators to produce more accurate help in some circumstances.- Switched to using
ServiceLoaderto discover available help section factories avoiding the need to explicitly register these withHelpSectionRegistry- Provide a
META-INF/services/com.github.rvesse.airline.help.sections.factories.HelpSectionFactoryfile to specify help section factories HelpSectionRegistrymoved to packagecom.github.rvesse.airline.help.sections.factories(Breaking)HelpSectionFactorynow required to implement asupportedAnnotations()method to declare the annotations it can turn intoHelpSectioninstances (Breaking)
- Provide a
- New
@Copyrightand@Licenseannotations for adding copyright and license statements to help - New
@ProseSectionannotation for adding a custom prose section to help - Improved presentation of help hint for options/arguments annotated with
@Port - Improved presentation of help hints for numeric ranges, they no longer show min/max if those are set to the min/max of their respective numeric types and the range is inclusive
- Improved presentation of help hint for single value ranges
- New direct man page generation via
- Metadata Changes
- User alias configuration are now preserved on a
UserAliasesSource<T>class which is accessible viaParserMetadata<T>.getUserAliasesSource() completionBehaviourandcompletionCommandare no longer fields on the@Optionand@Argumentsannotation. Instead use the@BashCompletionannotation from theairline-help-bashmodule
- User alias configuration are now preserved on a
- Restriction Improvements
- New
@Pathrestriction for specifying that an arguments value is a path to a file/directory and applying restrictions on the path/file that should be enforced e.g. must exist, readable etc. - New
@MutuallyExclusiveWithrestriction for specifying that only one of some set of options may be specified but that those options are optional, this is thus a less restrictive version of@RequireOnlyOne - Switched to using
ServiceLoaderto discover available restriction factories avoiding the need to explicitly register these with theRestrictionRegistry- Factories are now required to implement a method indicating what annotations they can translate into restrictions (Breaking)
- Provide a
META-INF/services/com.github.rvesse.airline.restrictions.factories.OptionRestrictionFactoryfile to specify option restriction factories - Provide a
META-INF/services/com.github.rvesse.airline.restrictions.factories.ArgumentsRestrictionFactoryfile to specify argument restriction factories
- New
- Bug Fixes
@Portrestriction would incorrectly reject valid values when applies to@Argumentsannotated fields- Restrictions could report incorrect argument title when applied to arguments with multiple titles
- Bug Fixes
- Fix
@MinLengthbeing an exclusive restriction i.e. value had to be greater than given length when intention was that value should be at least the given length
- Fix
- Documentation
- Add missing Javadocs to new annotations
2.0.0 represents substantial breaking changes over 1.x which were made to make the library more configurable and
extensible. We strongly recommend reading the included Migrating.md for notes on how to migrate existing Airline
powered CLIs forward.
- Dependency Changes
- Removed Guava
- Added Apache Commons Collections 4
- Builder improvements
- All parser related options on
CliBuilderare now moved toParserBuilderwhich is access by calling.withParser()on theCliBuilderinstance - Groups now support sub-groups and
GroupBuilderprovideswithSubGroup()andgetSubGroup()for working with these
- All parser related options on
- Annotation Changes
- Various fields were removed from existing annotations in favour of moving them to separate annotations
@Commandremovesexamples,discussion,exitCodesandexitCodeDescriptions@Optionremovesrequired,allowedValuesandignoreCase@Groupcan now be used to create sub-groups by inserting spaces into group names e.g.@Group(name = "foo bar")creates a groupfoowith a sub-groupbarand applies any other configuration given to the sub-group- New
@Cliannotation can be used to define a CLI entirely declaratively - New
@Parserannotation can be used to customise parser for CLIs created withSingleCommandor as a field on a@Cliannotation @Argumentsremovesrequired
- New annotations for adding extended help to commands
@Discussionto add discussion, this replaces thediscussionfield of the@Commandannotation@Examplesto add examples, this replaces theexamplesfield of the `@Command annotation@ExitCodesto add exit codes, this replaces theexitCodesandexitCodeDescriptionsfields of the- Custom extended help sections can be created and registered such that they are automatically discovered by Airline
- New restriction annotations for expressing restrictions on options and arguments
@Requiredto indicate required options/arguments, this replaces therequiredfield on the@Optionand@Argumentsannotations- New
@RequiredOnlyIffor conditionally requiring an option if another option is present - New
@RequireSomefor requiring at least one from some set of options - New
@RequireOnlyOnefor requiring exactly one from some set of options @AllowedRawValuesfor limiting the raw string values an option can receive, this replaces theallowedValuesandignoreCasefields on the@Optionannotation- New
@AllowedValuesfor limiting the converted values an option can receive - New
@MaxLengthand@MinLengthfor limiting the length of the raw string values an option can receive - New
@MinOccurrences,@MaxOccurrencesand@Oncefor limiting how many times an option can appear - New
@LongRange,@IntegerRange,@ShortRange,@ByteRange,@DoubleRange,@FloatRangeand@LexicalRangefor indicating that arguments once converted to the appropriate value type must fall within a given range - New
@Portfor restricting options to some port range(s) - New
@NotEmptyand@NotBlankfor requiring the raw string values be non-empty or non-blank (not all whitespace) - New
@Patternfor requiring that the raw string values conform to some regular expression - New
@Unrestrictedto indicate that restrictions inherited from an overridden option should be removed - Custom restrictions can be created and registered such that they are automatically enforced by Airline
- Various fields were removed from existing annotations in favour of moving them to separate annotations
- Parser Improvements
TypeConverteris now an interface and configurable i.e. allows you to control how Airline turns raw string values into Java objects- Option parsing styles are now fully configurable (default behaviour remains as 1.x which uses the first 3 styles):
- Classic GNU Get Opt Style
- Long GNU Get Opt Style
- Standard whitespace separated style
- List value style i.e.
--name a,b,cfor higher arity options - Pair value style i.e.
--name a=bfor arity 2 options - Users can define and register their own custom option parsers as desired
- Alias Improvements
- Can now support optional alias chaining i.e. aliases can reference other aliases
- Metadata Improvements
- Parsing specific metadata moved to
ParserMetadataclass which is accessible viaGlobalMetadata.getParserConfiguration() GlobalMetadatais now a generic class taking the command type as the type parameter
- Parsing specific metadata moved to
- Help Improvements
- New
HelpHintinterface which is used by restrictions to provide help - New
HelpSectioninterface for adding custom help sections to commands - More advanced and flexible formatting of extra help hints and sections in all existing generators
- Help supports providing help for sub-groups, help for groups will include information about available sub-groups
- New
- Various minor improvements from Christian Raedel
- Long style option parser
--name=valuenow also accepts colon separated values e.g.--name:value allowedValueson@Optioncan now be set to use case insensitive comparisonTrueColorcan be instantiated from a hex value
- Long style option parser
- Fix regression in
RonnCommandUsageGenerator
- Code Structure Refactoring
- Root package is now
com.github.rvesse.airline - Main library now lives under
lib/in source control - New examples module under
examples/in source control
- Root package is now
- Annotation Improvements
@Groupcan now be marked ashiddendiscussionparameter of@Commandis now aString[]rather than a single string making it easier to specify long descriptions
- CLI Improvements
- User defined command aliases are now supported
- CLI builder classes are now public and have their own
builderpackage - Parser Improvements
- All parser errors in the
parserpackage have public constructors
- All parser errors in the
- Help Improvements
- Help generators can now optionally display hidden commands and options
Help.help()static improved:- Respects command abbreviation when enabled
- Additional overloads for enabled output of hidden commands and options
- Bash completion fixes and improvements:
- Default command and default group command completion now included
- Functions for default group commands (i.e. top level commands) are no longer missing if there are also groups present
- Fixed a bug with hidden options not displaying in synopsis even when including hidden options was enabled
HelpOptionimproved:- Generated help will include program and group name where applicable
- It can now be used to show help with an arbitrary usage generator
showHelpIfRequested()guarantees to only display help onceshowHelp()can be used to display help regardless
- Command usage generators now print each item in the discussion as a separate paragraph
- IO Improvements
- New
com.github.rvesse.airline.iopackage with useful helper stuff for doing advanced console IO - Support for colorised output streams and writers:
- Basic ANSI Colors (8 Colors, normal and bright variants)
- 256 Colors (Basic ANSI Colors plus 3 colour palettes plus grayscale palette) - See color chart for more detail
- True Color (24 bit colour i.e. 16 million colours) - Many terminals may not support this mode
- Includes basic text decorations e.g. bold, underline
- New
- Annotation Improvements
Argumentsimprovements- An
aritycan now be specified to set the maximum arity for arguments and throws aParseTooManyArgumentsExceptionif too many arguments are seen
- An
- New
DefaultOptionannotation- Allows a field already annotated with
@Optionto also be marked as the default option under certain circumstances. This allows one option to be specified arguments style i.e. the-nor--namecan be omitted provided only one field is annotated this way, it has an arity of 1 and no fields are annotated with@Arguments
- Allows a field already annotated with
- Bash Completion Fixes
- Bash Completion Scripts for CLI that use groups are now valid Bash and function correctly
- Generated scripts use more unique function names to avoid clashes between different airline generated completion scripts
- CLI Improvements
- CLIs can now have command abbreviation enabled which allows users to only type part of the command name provided that the portion typed is unambiguous
- CLIs can now have option abbreviation enabled which allows users to only type part of the option name provided that the portion typed is unambiguous
- Package Refactoring
- Parser functionality moved into
io.airlift.airline.parserpackage
- Parser functionality moved into
- Help improvements
- Refactored various usage generators to make them easier to extend
- Annotation improvements
Commandimprovements- Added
exitCodesandexitDescriptionsfor declaring the exit codes a command can produce and their meanings
- Added
- Help improvements
- All command help generator now include exit code information if declared for a command via the
exitCodesandexitDescriptionsproperties - Add new
RonnMultiPageGlobalUsageGeneratorwhich generates a top level overview RONN page and then individual RONN files for each sub-command - Fix broken sort order of commands and groups in various help generator implementations
- Add documentation of
allowedValuesto all help generators - Fix typo in presentation of
--option in various help generators - Fix presentation of
examplesto avoid need for users to use markup in their annotations
- All command help generator now include exit code information if declared for a command via the
- Forked from upstream repository
- Group ID changed to
com.github.rvesse - Currently package names remain same as upstream (bar the help system) to make it easy to migrate existing apps to this fork.
- Please note that future releases will change the package names to align with the Group ID.
- Group ID changed to
- Annotation improvements
Optionimprovements:allowedValuesproperties is actually enforced and producesParseOptionIllegalValueExceptionif an invalid value is received- New
overrideandsealedproperties allowing derived commands to change some properties of the annotation - Overridden options may change the type when it is a narrowing conversion
- New
completionBehaviourandcompletionCommandproperties allowing defining behaviours for the purposes of completion script generators
Argumentsimprovements- New
completionBehaviourandcompletionCommandproperties allowing defining behaviours for the purposes of completion script generators
- New
Groupannotation for specifying groupsCommandannotation supports discussion and examples
- Help system improvements
- Most portions moved to
io.airlift.airline.helppackage - Help printing respects new lines allowing them to be used in longer descriptions
- Support for additional examples and discussion sections in command help
- Abstracted out help generation into interfaces with multiple concrete implementations:
- Command Line (the existing help system)
- Ronn
- HTML
- Bash auto-completion script
- Most portions moved to
- Support for Command Factories