flutter_clean_arch_cli 1.0.4
flutter_clean_arch_cli: ^1.0.4 copied to clipboard
A CLI tool to generate Flutter Clean Architecture folder structure easily.
π§Ύ README.md
π§± flutter_clean_arch_cli #
A powerful and developer-friendly Flutter CLI tool to generate Clean Architecture folder structures automatically.
No more repetitive setup β focus on building features, not folders!
π Features #
β Automatically creates:
config/,core/, andfeature/directories (if missing)- Complete Clean Architecture folder tree for your feature
- Dart files with feature-prefixed names and class templates
- Smart βrecoveryβ mode β only missing files/folders are created
--forceoption to rebuild a feature completely- Beautiful CLI output with emojis and clean messages
π§© Folder Structure Example #
Command:
flutter_clean_arch create login
Output:
lib/
βββ config/
βββ core/
βββ feature/
βββ login/
βββ data/
β βββ data_source/login_api_service.dart
β βββ model/login_model.dart
β βββ repository/login_repository_impl.dart
βββ domain/
β βββ entities/login_entity.dart
β βββ repository/login_repository.dart
β βββ usecases/login_usecase.dart
βββ presentation/
βββ bloc/
β βββ login_bloc.dart
β βββ login_event.dart
β βββ login_state.dart
βββ screen/login_screen.dart
βββ widgets/login_widget.dart
βοΈ Installation #
1οΈβ£ Activate globally
- dart pub global activate flutter_clean_arch_cli
Creates config/, core/, and feature/ directories if missing.
β¨ Create a feature
- flutter pub run flutter_clean_arch_cli create login
π Repair missing files
If you delete any files, running the same command will recreate missing ones only.
β»οΈ Force recreate feature
- flutter pub run flutter_clean_arch_cli create login --force
Deletes and rebuilds the feature from scratch.
π§° Example Output βοΈ Checking base folders... π Created missing base folder: lib/config π Created missing base folder: lib/core π Created missing base folder: lib/feature π Created: lib/feature/login/data/model π Created: lib/feature/login/data/model/login_model.dart β Feature "login" created/updated successfully!