• Add a mandatory argument to require the presence of an option.
  • Add aliases named argument to addFlag, addOption, and addMultiOption, as well as a public findByNameOrAlias method on ArgParser. This allows you to provide aliases for an argument name, which eases the transition from one argument name to another.


  • Stable null safety release.


  • Migrate to null safety.

  • BREAKING Remove APIs that had been marked as deprecated:

    • Instead of the allowMulti and splitCommas arguments to ArgParser.addOption(), use ArgParser.addMultiOption().
    • Instead of ArgParser.getUsage(), use ArgParser.usage.
    • Instead of Option.abbreviation, use Option.abbr.
    • Instead of Option.defaultValue, use Option.defaultsTo.
    • Instead of OptionType.FLAG/SINGLE/MULTIPLE, use OptionType.flag/single/multiple.
  • Add a more specific function type to the callback argument of addOption.


  • Remove help from the list of commands in usage.
  • Remove the blank lines in usage which separated the help for options that happened to span multiple lines.


  • Fix a bug with option names containing underscores.
  • Point towards CommandRunner in the docs for ArgParser.addCommand since it is what most authors will want to use instead.


  • Improve arg parsing performance: use queues instead of lists internally to get linear instead of quadratic performance, which is important for large numbers of args (>1000). And, use simple string manipulation instead of regular expressions for a 1.5x improvement everywhere.
  • No longer automatically add a ‘help’ option to commands that don't validate their arguments (fix #123).


  • Added support for usageLineLength in CommandRunner


  • Added more comprehensive word wrapping when usageLineLength is set.


  • Add usageLineLength to control word wrapping usage text.


  • Set max SDK version to <3.0.0, and adjust other dependencies.


  • Display the default values for options with allowedHelp specified.


  • Narrow the SDK constraint to only allow SDK versions that support FutureOr.


  • Fix the way default values for multi-valued options are printed in argument usage.


  • Deprecated OptionType.FLAG, OptionType.SINGLE, and OptionType.MULTIPLE in favor of OptionType.flag, OptionType.single, and OptionType.multiple which follow the style guide.

  • Deprecated Option.abbreviation and Option.defaultValue in favor of Option.abbr and Option.defaultsTo. This makes all of Option's fields match the corresponding parameters to ArgParser.addOption().

  • Deprecated the allowMultiple and splitCommas arguments to ArgParser.addOption() in favor of a separate ArgParser.addMultiOption() method. This allows us to provide more accurate type information, and to avoid adding flags that only make sense for multi-options in places where they might be usable for single-value options.


  • Type Command.run()'s return value as FutureOr<T>.


  • Type the callback parameter to ArgParser.addOption() as Function rather than void Function(value). This allows strong-mode users to write callback: (String value) { ... } rather than having to manually cast value to a String (or a List<String> with allowMultiple: true).


  • ArgParser.parse() now takes an Iterable<String> rather than a List<String>.

  • ArgParser.addOption()'s allowed option now takes an Iterable<String> rather than a List<String>.


  • Fix analyzer warning


  • Fix a fuzzy arrow type warning.


  • Breaking change: The allowTrailingOptions argument to new ArgumentParser() defaults to true instead of false.

  • Add new ArgParser.allowAnything(). This allows any input, without parsing any options.


  • Add explicit support for forwarding the value returned by Command.run() to CommandRunner.run(). This worked unintentionally prior to 0.13.6+1.

  • Add type arguments to CommandRunner and Command to indicate the return values of the run() functions.


  • When a CommandRunner is passed --help before any commands, it now prints the usage of the chosen command.


  • ArgParser.parse() now throws an ArgParserException, which implements FormatException and has a field that lists the commands that were parsed.

  • If CommandRunner.run() encounters a parse error for a subcommand, it now prints the subcommand's usage rather than the global usage.


  • Allow CommandRunner.argParser and Command.argParser to be overridden in strong mode.


  • Fix a minor documentation error.


  • Ensure that multiple-value arguments produce reified List<String>s.


  • By default, only the first line of a command‘s description is included in its parent runner’s usage string. This returns to the default behavior from before 0.13.3+1.

  • A Command.summary getter has been added to explicitly control the summary that appears in the parent runner's usage string. This getter defaults to the first line of the description, but can be overridden if the user wants a multi-line summary.


  • README fixes.


  • Make strong mode clean.


  • Use the proper usage getter in the README.


  • Add an explicit default value for the allowTrailingOptions parameter to new ArgParser(). This doesn't change the behavior at all; the option already defaulted to false, and passing in null still works.


  • Documentation fixes.


  • Print all lines of multi-line command descriptions.


  • Allow option values that look like options. This more closely matches the behavior of getopt, the de facto standard for option parsing.


  • Add ArgParser.addSeparator(). Separators allow users to group their options in the usage text.


  • Breaking change: An option that allows multiple values will now automatically split apart comma-separated values. This can be controlled with the splitCommas option.


  • Remove the dependency on the collection package.


  • Add syntax highlighting to the README.


  • Add an example of using command-line arguments to the README.


  • Fixed implementation of ArgResults.options to really use Iterable instead of Iterable cast to Iterable.


  • Updated dependency constraint on unittest.

  • Formatted source code.

  • Fixed use of deprecated API in example.


  • Fix the built-in help command for CommandRunner.


  • Add CommandRunner and Command classes which make it easy to build a command-based command-line application.

  • Add an ArgResults.arguments field, which contains the original argument list.


  • Replace ArgParser.getUsage() with ArgParser.usage, a getter. ArgParser.getUsage() is now deprecated, to be removed in args version 1.0.0.


  • Widen the version constraint on the collection package.


  • Remove the documentation link from the pubspec so this is linked to pub.dev by default.


  • Removed public constructors for ArgResults and Option.

  • ArgResults.wasParsed() can be used to determine if an option was actually parsed or the default value is being returned.

  • Replaced isFlag and allowMultiple fields in the Option class with a three-value OptionType enum.

  • Options may define valueHelp which will then be shown in the usage.


  • Move handling trailing options from ArgParser.parse() into ArgParser itself. This lets subcommands have different behavior for how they handle trailing options.


  • Usage ignores hidden options when determining column widths.