commander
Advanced tools
Changelog
[9.4.0] (2022-07-15)
preSubcommand
hook called before direct subcommands ([#1763])InvalidOptionArgumentError
in esm ([#1756])Changelog
[9.3.0] (2022-05-28)
.summary()
for a short summary to use instead of description when listing subcommands in help ([#1726])Option.implies()
to set other option values when the option is specified ([#1724])string[]
to .options()
default value parameter type for use with variadic options ([#1721])-ws
) ([#1718])Changelog
[9.2.0] (2022-04-15)
String.prototype.substr
([#1706])Changelog
[9.1.0] (2022-03-19)
.conflicts()
to set conflicting options which can not be specified together ([#1678])Changelog
[9.0.0] (2022-01-28)
.executableDir()
for custom search for subcommands ([#1571])Option
to .option()
or .requiredOption()
([#1655])error()
for generating errors from client code just like Commander generated errors, with support for .configureOutput()
, .exitOverride()
, and .showHelpAfterError()
([#1675]).optsWithGlobals()
to return merged local and global options ([#1671])showSuggestionAfterError
is now on by default ([#1657])executableFile
([#1571])executableFile
([#1571]).choices()
([#1667]).parse()
, .parseAsync()
, .aliases()
([#1669])require.main.filename
when script not known from arguments passed to .parse()
(can supply details using .name()
, and .executableDir()
or executableFile
) ([#1571])Changelog
[8.3.0] (2021-10-22)
.getOptionValueSource()
and .setOptionValueWithSource()
, where expected values for source are one of 'default', 'env', 'config', 'cli' ([#1613]).command('*')
, use default command instead ([#1612])on('command:*')
, use .showSuggestionAfterError()
instead ([#1612])Changelog
[8.2.0] (2021-09-10)
.showSuggestionAfterError()
to show suggestions after unknown command or unknown option ([#1590])Option
support for values from environment variables using .env()
([#1587])Option
method argumentRejected