flutter_clean_arch_cli 0.0.1 copy "flutter_clean_arch_cli: ^0.0.1" to clipboard
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/, and feature/ 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
  • --force option 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!
1
likes
0
points
183
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool to generate Flutter Clean Architecture folder structure easily.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

args, flutter, path

More

Packages that depend on flutter_clean_arch_cli