๐ raihan_cli โ Flutter Feature Scaffolding CLI Tool
`raihan_cli` is a Dart-based command-line tool designed to **automate feature creation and deletion** in Flutter projects using the **MVC** or **MVVM** architectural patterns with **GetX**, **Provider**, **Riverpod** and **BLoC** state management. It helps developers maintain a clean and consistent project structure while saving time on repetitive boilerplate setup.
๐ฆ Installation
To install globally from the Pub.dev package:
dart pub global activate raihan_cli
Alternatively, to install from the Git repository:
dart pub global activate --source git https://github.com/raihansikdar/raihan_cli.git
๐ What It Does
-
โ Scaffolds folders and files for new features (MVC or MVVM)
-
๐ ๏ธ Supports GetX, Provider, Riverpod and BLoC state management
-
๐๏ธ Removes entire feature folders safely
-
๐ง Saves architecture and path preferences to reduce prompts
-
๐ ๏ธ Supports custom folder paths (e.g., lib/core/feature_name) or default feature-based structure (lib/src/features/feature_name)
๐งช Basic Usage
โถ๏ธ Create a New Feature
raihan_cli <feature_name>
Example: raihan_cli product
Youโll be prompted to choose:
1๏ธโฃ Folder Structure Type:
1: Default (lib/src/features/<feature_name>)
2: Custom (lib/<custom_path>/<feature_name>)
Note: You must configure the path type on the first run. The package will remember your choice.
2๏ธโฃ State Management:
-
getx
-
provider
-
riverpod
-
bloc
-
others
Note: You must configure the state management on the first run. The package will remember your choice.
3๏ธโฃ Architecture type:
-
mvc
-
mvvm
Note: You must configure Architecture on the first run. The tool will remember your choice.
Then your feature folder will create successfully.
If folder is not showing then collapse your parent folder like this

๐๏ธ Remove an Existing Feature
raihan_cli remove <feature_name>
Example: raihan_cli remove product
Note: If folder is still showing then collapse your parent folder.
This confirms and deletes the feature directory based on your saved configuration..
๐ Reset Configuration (if did mistake)
# Windows
del tool\.cli_architecture_config
# macOS/Linux
rm tool/.cli_architecture_config
โ Deactivating the CLI Package:
dart pub global deactivate raihan_cli
๐ก Architecture + State Management Examples
๐ MVC Folder Structure
๐ MVC + GetX
lib/src/features/<feature_name>/ # if custom path is "features"
โโโ controllers/
โ โโโ <feature_name>_controller.dart
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVC + Provider
lib/src/features/<feature_name>/ # if custom path is "features"
โโโ provider/
โ โโโ <feature_name>_provider.dart
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVC + Riverpod
lib/src/features/<feature_name>/
โโโ provider/
โ โโโ <feature_name>_notifier.dart # StateNotifier / AsyncNotifier class
โ โโโ <feature_name>_provider.dart # Riverpod provider exposing the notifier
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVC + BLoC
lib/src/features/<feature_name>/ # if custom path is "features"
โโโ bloc/
โ โโโ <feature_name>_bloc.dart
โ โโโ <feature_name>_event.dart
โ โโโ <feature_name>_state.dart
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVVM Folder Structure
๐ MVVM + GetX
lib/features/<feature_name>/ # if custom path is "features"
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ view_model/
โ โโโ <feature_name>_view_model.dart
โโโ repository/
โ โโโ <feature_name>_repository.dart
โ โโโ <feature_name>_repository_impl.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVVM + Provider
lib/features/<feature_name>/ # if custom path is "features"
โโโ view_model_provider/
โ โโโ <feature_name>_view_model_provider.dart
โโโ repository/
โ โโโ <feature_name>_repository.dart
โ โโโ <feature_name>_repository_impl.dart
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVVM + Riverpod
lib/features/<feature_name>/
โโโ view_model_provider/
โ โโโ <feature_name>_notifier.dart # StateNotifier / AsyncNotifier class
โ โโโ <feature_name>_provider.dart # Riverpod provider exposing the notifier
โโโ repository/
โ โโโ <feature_name>_repository.dart
โ โโโ <feature_name>_repository_impl.dart
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVVM + BLoC
lib/features/<feature_name>/ # if custom path is "features"
โโโ bloc/
โ โโโ <feature_name>_bloc.dart
โ โโโ <feature_name>_event.dart
โ โโโ <feature_name>_state.dart
โโโ repository/
โ โโโ <feature_name>_repository.dart
โ โโโ <feature_name>_repository_impl.dart
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐จโ๐ป Author
Raihan Sikdar
Website: raihansikdar.com
Email: raihansikdar10@gmail.com
GitHub: raihansikdar
LinkedIn: raihansikdar
๐ License
This package is licensed under the MIT License.