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.
- Core Improvements
- First class support for
BigInteger
andBigDecimal
as numeric types - First class support for
Path
- Provided corrected spelling for
ConvertResult.wasSuccessful()
, old mis-spelt method preserved but marked as deprecated - Added a
JpmsResourceLocator
as an additionalResourceLocator
to allow finding resources when running in a JPMS context (requires additional moduleairline-jpms-resources
) - BREAKING - Only
@AirlineModule
is used as a composition annotation by default, use of the older@javax.inject.Inject
or@jakarta.inject.Inject
annotations MUST now be explicitly configured.
- First class support for
- Help Improvements
- Added an
@SeeAlso
annotation to Airline Core (#51) - BREAKING -
airline-help-bash
has moved@BashCompletion
annotation intocom.github.rvesse.airline.annotations.help.bash
to 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
ParserBuilder
created by callingwithParser()
on aCliBuilder
can 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.inject
andairline-backcompat-javaxinject
were madeoptional
so 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-external
module with a dependency on Apache Commons CSV 1.10.0 - Added new
airline-jpms-resources
module 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
-X
to see it
- Some logging has moved up to INFO from DEBUG, so you no longer have to use
- New
airline-prompts
module 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-external
modules 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@Version
annotation. (#52)- Adds
@ExternalDiscussion
@ExternalProse
,@ExternalExitCodes
,@ExternalExamples
and@ExternalExamplesTabular
annotations
- 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-examples
module for examples of constructing amodule-info.java
that pulls in other Airline modules and seemodularExample
script 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-javaxinject
module to aid Annotation Improvements (see below), this is included in the dependencies of the coreairline
module by default. Note that future 3.x releases may make this dependency optional as the Java ecosystem transitions away from using the oldjavax
packages.
- Annotation Improvements
- Added
@AirlineModule
as future replacement for existing usage of@Inject
@Inject
can now be eitherjavax.inject.Inject
orjakarta.inject.Inject
, and mixtures thereof are supported. This enables broader compatibility with applications that need/want to use either variant of the standard Java@Inject
dependency.
- Added
- Parser Improvements
- Choice of composition annotations is now configurable. Defaulting to supporting the new
@AirlineModule
annotation, and for backwards compatibility both variants of the@Inject
annotation as noted above.- Use
compositionAnnotationClasses
field with the@Parser
annotation - 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
@RequiredUnlessEnvironment
restriction 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
@NoOptionLikeValues
restriction 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
GreedyMaybeListValueOptionParser
to 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
ClassicGetOptParser
you 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
@Option
annotation now allows an array of values for thetitle
field allowing options witharity
> 1 to have distinct titles shown for each value the option accepts
- Bug Fixes
@AllowedEnumValues
incorrectly provides help hint that values are case insensitive when they are actually case sensitive (#100)@AllowedRawValues
does not handle case insensitive mode correctly (#100)@Option
withtype = OptionType.GLOBAL
andtype = OptionType.GROUP
are not correctly parsed at the command level (#101)
- Bug Fixes
CollectAll
handler 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
@Command
annotation 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
EnvVarLocator
andJvmSystemPropertyLocator
could resolve locations incorrectly if some placeholders were undefined- Fixes some corner cases with
@FloatRange
and@DoubleRange
underlying implementation - Fix possible NPE in maven plugin (#45)
- Restriction Improvements
- Added
@File
and@Directory
as more explicit variants of@Path
(#73) - Added
@Negative
and@Positive
for numerics (#73) - Added
@LengthRange
and@ExactLength
for strings (#73) - Added
@AllowedEnumValues
as a simpler way of specifying@AllowedRawValues
on enum typed fields (#73) - Added
@StartsWith
and@EndsWith
for enforcing prefixes/suffixes on strings (#73)
- Added
- Build Improvements
- Provide
module-info.java
available so modules can be used on Module Path (#92) - Thanks to jfallows
- Provide
- Core Improvements
- Allow creating a
Cli
instance with an explicitParserMetadata
for situations where parser configuration cannot be specified via annotation e.g. using dynamically determined paths for user aliases - Abstract direct usage of
System.out
viaChannels
factory 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
ResourceLocator
interface - 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
CommandUsageGenerator
interface 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
@Unrestricted
can now be applied directly to classes to specify no global restrictions on single commands and CLIs@Version
can now useResourceLocator
to modify search locations- Help Sections annotations can now be placed onto
@Cli
annotated 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-plugin
that provides two goals (#45)- A
generate
goal for generating help for your commands and CLIs during a Maven build - A
validate
goal for validating that your@Command
and@Cli
annotated classes have valid annotations that Airline can generate a CLI from
- A
- Parser Changes
ListValuesOptionParser
now 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 ofmaster
branch (#35) - New
airline-docs-VERSION-offline-site.zip
and.tar.gz
artifacts 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
AirlineUtils
in 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
ParserErrorHandler
interface 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 toHelpOption
for use with error handlers which collect errors e.g.CollectAll
(#53)
- Added
- Annotation Changes
- New
errorHandler
field on@Parser
annotation for specifying error handler, defaults toFailFast
for backwards compatible behaviour (#53) - New
flagNegationPrefix
field on@Parser
to allow specifying that if a flag option (zero arity option) name starts with that prefix the value should be set tofalse
as opposed to setting flags totrue
as is the normal behaviour (#63) - New
description
field on@Pattern
to provide human readable explanation of regular expression restriction intent (#48) - Noted in Javadoc that
@Version
supports both properties and Manifest files as data sources (#56) - Use new
typeConverterProvider
field on@Option
/@Arguments
to customise the type converter for a field (#54)- Variety of built in converters provided for supporting more complex number formats
- Alternative Bases:
Hexadecimal
,Octal
andBinary
- 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
arity
from@Arguments
, the@MaxOccurrences
restriction 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-man
orairline-help-markdown
instead)- This removes the
airline-help-ronn
module (Breaking)
- This removes the
- New
@Version
annotation 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
GlobalRestrictionsFactory
interface and corresponding registry inRestrictionsRegistry
- Uses
ServiceLoader
for automatic discovery, provide aMETA-INF/services/com.github.rvesse.airline.restrictions.factories.GlobalRestrictionFactory
file to specify global restriction factories
- Uses
- Global restrictions can now be specified by adding annotations to
@Cli
annotated classes - Improved
OptionRestriction
andArgumentsRestriction
interfaces- 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
@Option
or@Arguments
fields- Specified via
@Partial
/@Partials
annotations in addition
- Specified via
- New
- Parser Changes
- Improve how restrictions for options and arguments are enforced
- Options must always receive precisely their
arity
in values or aParseOptionMissingValueException
is thrown (at least with the built-in parsers)
- Bug Fixes
ManCommandUsageGenerator
could 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
@Arguments
annotation as deprecated - Marked various annotations as
@Documented
so they are included in JavaDoc output - All fields of
@Alias
annotation are now required
- Marked defunct fields of
- Parser Changes
- Made internal helper class
ConvertResult
public 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-man
moduleManSections
moved into this module (Breaking)
- RONN help generators moved to
airline-help-ronn
module (Breaking)- All RONN generators are marked as
@deprecated
since they are superseded by the Man and Markdown format generators
- All RONN generators are marked as
- HTML help generators moved to
airline-help-html
module (Breaking) - Bash help generators moved to
airline-help-bash
module (Breaking)CompletionBehaviour
moved into this module (Breaking)
- New
airline-help-markdown
module for generating Markdown help
- New
- Help Improvements
- New direct man page generation via
ManCommandUsageGenerator
,ManGlobalUsageGenerator
andManMultiPageGlobalUsageGenerator
provided 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
,MarkdownGlobalUsageGenerator
andMarkdownMultiPageGlobalUsageGenerator
- These are intended to replace use of the existing RONN generators for generating Markdown help
CommandUsageGenerator
has 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
ServiceLoader
to 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.HelpSectionFactory
file to specify help section factories HelpSectionRegistry
moved to packagecom.github.rvesse.airline.help.sections.factories
(Breaking)HelpSectionFactory
now required to implement asupportedAnnotations()
method to declare the annotations it can turn intoHelpSection
instances (Breaking)
- Provide a
- New
@Copyright
and@License
annotations for adding copyright and license statements to help - New
@ProseSection
annotation 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()
completionBehaviour
andcompletionCommand
are no longer fields on the@Option
and@Arguments
annotation. Instead use the@BashCompletion
annotation from theairline-help-bash
module
- User alias configuration are now preserved on a
- Restriction Improvements
- New
@Path
restriction 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
@MutuallyExclusiveWith
restriction 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
ServiceLoader
to 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.OptionRestrictionFactory
file to specify option restriction factories - Provide a
META-INF/services/com.github.rvesse.airline.restrictions.factories.ArgumentsRestrictionFactory
file to specify argument restriction factories
- New
- Bug Fixes
@Port
restriction would incorrectly reject valid values when applies to@Arguments
annotated fields- Restrictions could report incorrect argument title when applied to arguments with multiple titles
- Bug Fixes
- Fix
@MinLength
being 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
CliBuilder
are now moved toParserBuilder
which is access by calling.withParser()
on theCliBuilder
instance - Groups now support sub-groups and
GroupBuilder
provideswithSubGroup()
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
@Command
removesexamples
,discussion
,exitCodes
andexitCodeDescriptions
@Option
removesrequired
,allowedValues
andignoreCase
@Group
can now be used to create sub-groups by inserting spaces into group names e.g.@Group(name = "foo bar")
creates a groupfoo
with a sub-groupbar
and applies any other configuration given to the sub-group- New
@Cli
annotation can be used to define a CLI entirely declaratively - New
@Parser
annotation can be used to customise parser for CLIs created withSingleCommand
or as a field on a@Cli
annotation @Arguments
removesrequired
- New annotations for adding extended help to commands
@Discussion
to add discussion, this replaces thediscussion
field of the@Command
annotation@Examples
to add examples, this replaces theexamples
field of the `@Command annotation@ExitCodes
to add exit codes, this replaces theexitCodes
andexitCodeDescriptions
fields 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
@Required
to indicate required options/arguments, this replaces therequired
field on the@Option
and@Arguments
annotations- New
@RequiredOnlyIf
for conditionally requiring an option if another option is present - New
@RequireSome
for requiring at least one from some set of options - New
@RequireOnlyOne
for requiring exactly one from some set of options @AllowedRawValues
for limiting the raw string values an option can receive, this replaces theallowedValues
andignoreCase
fields on the@Option
annotation- New
@AllowedValues
for limiting the converted values an option can receive - New
@MaxLength
and@MinLength
for limiting the length of the raw string values an option can receive - New
@MinOccurrences
,@MaxOccurrences
and@Once
for limiting how many times an option can appear - New
@LongRange
,@IntegerRange
,@ShortRange
,@ByteRange
,@DoubleRange
,@FloatRange
and@LexicalRange
for indicating that arguments once converted to the appropriate value type must fall within a given range - New
@Port
for restricting options to some port range(s) - New
@NotEmpty
and@NotBlank
for requiring the raw string values be non-empty or non-blank (not all whitespace) - New
@Pattern
for requiring that the raw string values conform to some regular expression - New
@Unrestricted
to 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
TypeConverter
is 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,c
for higher arity options - Pair value style i.e.
--name a=b
for 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
ParserMetadata
class which is accessible viaGlobalMetadata.getParserConfiguration()
GlobalMetadata
is now a generic class taking the command type as the type parameter
- Parsing specific metadata moved to
- Help Improvements
- New
HelpHint
interface which is used by restrictions to provide help - New
HelpSection
interface 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=value
now also accepts colon separated values e.g.--name:value
allowedValues
on@Option
can now be set to use case insensitive comparisonTrueColor
can 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
@Group
can now be marked ashidden
discussion
parameter of@Command
is 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
builder
package - Parser Improvements
- All parser errors in the
parser
package 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
HelpOption
improved:- 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.io
package 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
Arguments
improvements- An
arity
can now be specified to set the maximum arity for arguments and throws aParseTooManyArgumentsException
if too many arguments are seen
- An
- New
DefaultOption
annotation- Allows a field already annotated with
@Option
to also be marked as the default option under certain circumstances. This allows one option to be specified arguments style i.e. the-n
or--name
can 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.parser
package
- Parser functionality moved into
- Help improvements
- Refactored various usage generators to make them easier to extend
- Annotation improvements
Command
improvements- Added
exitCodes
andexitDescriptions
for 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
exitCodes
andexitDescriptions
properties - Add new
RonnMultiPageGlobalUsageGenerator
which 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
allowedValues
to all help generators - Fix typo in presentation of
--
option in various help generators - Fix presentation of
examples
to 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
Option
improvements:allowedValues
properties is actually enforced and producesParseOptionIllegalValueException
if an invalid value is received- New
override
andsealed
properties allowing derived commands to change some properties of the annotation - Overridden options may change the type when it is a narrowing conversion
- New
completionBehaviour
andcompletionCommand
properties allowing defining behaviours for the purposes of completion script generators
Arguments
improvements- New
completionBehaviour
andcompletionCommand
properties allowing defining behaviours for the purposes of completion script generators
- New
Group
annotation for specifying groupsCommand
annotation supports discussion and examples
- Help system improvements
- Most portions moved to
io.airlift.airline.help
package - 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