raihan_cli 2.1.0
raihan_cli: ^2.1.0 copied to clipboard
raihan_cli generates clean Flutter feature folders with Clean Architecture principles, supporting MVC and MVVM patterns, and integrates seamlessly with GetX, Provider, Riverpod, and BLoC state management.
๐ฆ Changelog #
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
2.1.0 - 2025-11-21 #
โจ New Feature โ Clean Architecture Support #
-
๐ Clean Architecture Added
- CLI now supports full Clean Architecture scaffolding.
- Generates layered structure:
domainโ entities, repositories, use casesdataโ models, repository implementations, data sourcespresentationโ UI, controllers/state management
- Architecture adapts automatically based on selected state management (GetX, Provider, BLoC, Riverpod).
-
๐ Clean Architecture + State Management Integration
- BLoC โ auto-generates bloc, event, state under
presentation/. - Riverpod โ generates notifier + provider following domain-driven design.
- GetX โ controller generation with injected use cases.
- Provider โ ChangeNotifier generated using domain layer use cases.
- BLoC โ auto-generates bloc, event, state under
-
๐ CLI Updates
- Added Clean Architecture as a new selectable architecture option.
- Automatically creates layer-specific folders:
domain/usecases/domain/repositories/data/datasources/data/repositories/presentation/screens/presentation/controllers/
- Enhanced validation for feature names and duplicate layer checks.
๐ ๏ธ Code Quality #
- Modularized architecture generation logic.
- Separated MVC, MVVM, and Clean Architecture generators.
- Reduced duplicate file creation by implementing shared utilities.
2.0.0 - 2025-10-24 #
โจ Enhancements #
-
๐ State Management Support
- Added GetX, Provider, BLoC, and Riverpod options for feature scaffolding.
- CLI now prompts for state management on the first run and remembers the choice.
-
๐ Improved Folder Structure Handling
- Folder structures adapt automatically based on architecture + state management combination.
- Automatic creation of repository folders and files for MVVM features.
- BLoC scaffolding includes
<feature>_bloc.dart,<feature>_event.dart, and<feature>_state.dart. - Riverpod scaffolding now splits provider logic into notifier + provider files for clean separation.
-
๐ก Better CLI UX
- Refined prompts for path type, state management, and architecture.
- Clearer print statements for created folders and files.
- Enhanced handling of existing folders and files with appropriate warnings.
-
โก Configuration Improvements
- Saves state management choice in the config file.
- Handles custom paths more robustly.
- Reduced redundant config file reads.
๐ ๏ธ Code Quality #
- Refactored feature creation logic to handle all combinations of MVC/MVVM + GetX/Provider/BLoC/Riverpod.
- Improved maintainability of file/folder creation and prompts.
- Consolidated exception handling and validation checks.
1.1.0 - 2025-09-25 #
โจ Enhancements #
-
๐งน Simplified user prompts
- Path type input now strictly accepts
1or2, ensuring clearer validation and reducing accidental mis-entries. - Architecture selection refined to immediately validate input.
- Path type input now strictly accepts
-
โก Cleaner configuration handling
- Removed unnecessary re-reads of the config file after saving.
- Streamlined
_saveConfigand_readConfigfor better readability.
-
๐ก Improved CLI UX
- More consistent print statements and comments.
- Reduced redundant logic while preserving all existing features.
๐ ๏ธ Code Quality #
- Refactored code blocks for improved maintainability and readability.
- Consolidated repetitive checks and exception handling.
1.0.0 - 2025-09-23 #
๐ Initial release of raihan_cli!
โจ Features #
- ๐ Generate Flutter feature folders and files based on:
- MVC architecture
- MVVM architecture
- ๐ Supports two path types:
- Feature-based path:
lib/src/features/<feature_name> - Custom path:
lib/<custom_path>/<feature_name>
- Feature-based path:
- ๐ง Smart config saving for:
- Preferred path type
- Preferred architecture
- ๐๏ธ Remove existing feature folders with confirmation prompt
- ๐งฑ Auto-generate the following:
- Controllers / ViewModels
- Repository interfaces and implementations (for MVVM)
- Models
- Screens and widget directories
๐ Structure Examples #
lib/src/features/<feature_name>/(default)lib/<custom_path>/<feature_name>/(custom path)