๐ 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. 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)
- ๐๏ธ 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:
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 tool will remember your choice.
Architecture type:
1: MVC
2: MVVM
Note: You must configure the state management 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.
Confirms and deletes the feature directory based on previously saved config.
๐ 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 Details
๐ MVC Folder Structure
lib/src/features/<feature_name>/
โโโ controllers/
โ โโโ <feature_name>_controller.dart
โโโ model/
โ โโโ <feature_name>_model.dart
โโโ views/
โโโ screen/
โ โโโ <feature_name>_screen.dart
โโโ widget/
๐ MVVM Folder Structure
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/
๐จโ๐ป Author
Raihan Sikdar
Website: raihansikdar.com
Email: [email protected]
GitHub: raihansikdar
LinkedIn: raihansikdar
๐ License
This package is licensed under the MIT License.