flutter_feature_cli 1.0.2
flutter_feature_cli: ^1.0.2 copied to clipboard
A CLI tool for generating scalable Flutter feature architecture with configurable paths, barrel exports, and clean project organization.
π Flutter Feature CLI #
Generate scalable Flutter feature architecture in seconds.
A lightweight CLI tool that helps Flutter developers create consistent feature modules with a single command.
β¨ Features #
- Generate complete feature structure instantly
- Creates Data Sources, Entities, Repositories, View Models, and Widgets
- Configurable output path via
pubspec.yaml - Supports command-level path overrides
- Auto-generates barrel exports (
index.dart) - Reduces repetitive boilerplate code
- Fully tested and production-ready
π¦ Installation #
Add the package to your Flutter project:
dev_dependencies:
flutter_feature_cli: ^1.0.2
Install dependencies:
flutter pub get
βοΈ Configuration (Optional) #
Configure a default feature generation path in your project's pubspec.yaml.
Example #
flutter_feature_cli:
path: lib/src/features
or
flutter_feature_cli:
path: lib/src/ai_features
If omitted, the package falls back to:
lib/features
π Create a Feature #
Generate a feature:
dart run flutter_feature_cli create authentication
Generated structure:
lib/
βββ features/
βββ authentication/
βββ data/
β βββ data_sources/
β βββ entities/
β βββ repository/
β βββ index.dart
βββ presentation/
β βββ view_models/
β βββ widgets/
β βββ index.dart
βββ index.dart
π― Override the Configured Path #
You can override the configured path directly from the command:
dart run flutter_feature_cli create authentication --path=lib/src/ai_features
The command-line path always takes precedence over the path configured in pubspec.yaml.
π Example #
Using:
flutter_feature_cli:
path: lib/src/features
and running:
dart run flutter_feature_cli create user_profile
creates:
lib/
βββ src/
βββ features/
βββ user_profile/
π» Commands #
Create a feature:
dart run flutter_feature_cli create <feature_name>
Create a feature in a custom path:
dart run flutter_feature_cli create <feature_name> --path=<path>
Examples:
dart run flutter_feature_cli create authentication
dart run flutter_feature_cli create user_profile
dart run flutter_feature_cli create ai_chat --path=lib/src/ai_features
π£ Roadmap #
- Project setup command
- Bulk feature generation
- Custom templates
- Architecture validation
- Feature merge utilities
π€ Contributing #
Contributions, issues, and feature requests are welcome.
π License #
MIT License
Copyright (c) 2026 Hasan Shaikh - HasneticLabs