flutter_clean_arch_cli 0.0.1
flutter_clean_arch_cli: ^0.0.1 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
2οΈβ£ Verify installation
flutter_clean_arch
You should see:
π§± Flutter Clean Architecture CLI
Usage:
flutter_clean_arch init
flutter_clean_arch create <feature>
flutter_clean_arch create <feature> -f
π§ Usage
ποΈ Initialize project
flutter_clean_arch init
Creates config/, core/, and feature/ directories if missing.
β¨ Create a feature
flutter_clean_arch create login
π Repair missing files
If you delete any files, running the same command will recreate missing ones only.
β»οΈ Force recreate feature
flutter_clean_arch 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!