FLUTTER ECOSYSTEM

args

Library for defining parsers for parsing raw command-line arguments into a set of options and values using GNU and POSIX style options.

Latest version
2.7.0
30-day downloads
6.8M
Likes
423
Pub points
150

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

The args package provides a robust way to parse command-line arguments in Dart applications, supporting GNU and POSIX-style options. It enables developers to define structured parsers for flags, switches, and positional arguments, converting raw input into a clean, usable format. Ideal for CLI tools, scripts, and console applications, it simplifies argument handling with intuitive APIs and strong type safety. The package is lightweight, well-documented, and compatible across all major platforms including mobile, web, and desktop.

Use cases
  • Building CLI tools
  • Parsing user input in scripts
  • Configuring applications via command line
  • Automating tasks with arguments
  • Developing development utilities
  • Creating command-line interfaces for apps
Key features
  • Supports GNU and POSIX option styles
  • Flexible argument parsing with types
  • Built-in help generation
  • Handles flags, switches, and values
  • Type-safe result output
  • Easy integration with Flutter and Dart apps
Suitable for
  • CLI application developers
  • Script authors
  • Tool builders
  • DevOps automation
  • Cross-platform command-line tools
  • Dart/Flutter projects needing input parsing
Considerations
  • Requires manual setup of argument definitions
  • Limited to command-line input only
  • No built-in validation beyond parsing
  • Not suitable for GUI-based input
  • Best used in standalone or script contexts
  • Depends on correct usage of argument syntax
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add args

Categories

Source repository

Related projects