flutter_feature_cli 1.0.2 copy "flutter_feature_cli: ^1.0.2" to clipboard
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

0
likes
150
points
67
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A CLI tool for generating scalable Flutter feature architecture with configurable paths, barrel exports, and clean project organization.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

path, yaml

More

Packages that depend on flutter_feature_cli