FLUTTER ECOSYSTEM

build_cli

Parse command line arguments directly into an annotation class using the power of build_runner and source_gen.

Latest version
2.2.13
30-day downloads
33.2K
Likes
22
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

build_cli is a Flutter/Dart package that enables developers to parse command-line arguments directly into annotated Dart classes using build_runner and source_gen. It simplifies CLI development by generating boilerplate code for argument parsing, ensuring type safety and reducing manual parsing logic. The package integrates seamlessly with Dart’s build system, allowing clean, maintainable, and scalable command-line tools across multiple platforms.

Use cases
  • Building CLI tools for development workflows
  • Automating project setup or deployment scripts
  • Creating custom build or test runners
  • Generating configuration from command-line inputs
  • Integrating with CI/CD pipelines
Key features
  • Automatic code generation via build_runner
  • Type-safe argument parsing through annotations
  • Support for complex argument structures
  • Minimal boilerplate code
  • Cross-platform compatibility
Suitable for
  • Dart developers building CLI utilities
  • Teams needing robust argument handling in scripts
  • Projects requiring structured input parsing
Considerations
  • Requires build_runner and source_gen setup
  • Not suitable for runtime-only argument parsing
  • Build-time dependency may increase compilation time
Supported platformsAndroidiOSmacOSWindowsLinux

Install package

flutter pub add build_cli

Categories

Dependencies

Dependency list 8 items

Source repository

Related projects