Command-line argument parsing for Dart
open sourceBSD-3-Clausefree
args is the Dart team's package for parsing command-line arguments into options and values. You define options and flags on an ArgParser, with GNU and POSIX style syntax, single-letter abbreviations, defaults, allowed values and negatable flags, then parse the arguments and read the results. For tools with subcommands, CommandRunner and Command dispatch to the right command and add a help command and --help handling with generated usage text. It works in server-side and client-side Dart and is published on pub.dev from the dart-lang/core repository.
Problems it solves
- parse command-line flags in my Dart CLI tool
- add subcommands and --help to a Dart command-line app
- validate the values passed to my Dart script's options
Features
- GNU and POSIX style options and flags
- abbreviations, defaults and allowed values
- subcommands with CommandRunner
- generated usage and --help
Alternatives
The same job
These do what args (Dart) does.
- DCli Dart library and tooling for writing CLI apps and scripts
- CLI Completion Shell tab completion for Dart command-line apps built with CommandRunner
