cleany 0.0.12
cleany: ^0.0.12 copied to clipboard
A CLI tool to generate Clean Architecture feature structure for Flutter projects
# Cleany: Flutter Clean Architecture Generator (Cubit)
Cleany is a powerful command-line interface (CLI) tool designed to streamline the feature creation process in your Flutter projects. It automatically scaffolds the complete directory structure and necessary files for a new feature, strictly adhering to Clean Architecture principles and utilizing Cubit for state management.
Say goodbye to tedious boilerplate creation and focus on your business logic!
## ✨ Features and Benefits
Cleany ensures your codebase remains **consistent**, **scalable**, and **testable** by instantly generating the following self-contained layers for every new feature:
## 📦 Clean Architecture Layers Generated
| Layer | Purpose | Components |
|------------------|------------------------------------------------------------|--------------------------------------------------|
| ✅ Presentation | Handles UI logic, state management, and displaying data. | cubit, states, pages, widgets |
| ✅ Domain | Contains core business rules and independent abstractions.| entities, repositories (abstract), usecases |
| ✅ Data | Manages data retrieval and storage. | datasources (remote/local), models, repositories |
## 🛠️ Installation
### 1. Global Activation (Recommended)
```sh
dart pub global activate cleany
2. Update #
dart pub global activate cleany
🚀 Usage #
cleany <feature_name> [options]
▶️ Basic Feature Generation #
cleany auth
📂 Specify a Custom Path #
cleany auth -p lib/modules
🔧 Available Options #
| Option | Short | Description | Example |
|---|---|---|---|
--path |
-p |
Defines a custom parent directory. | cleany user -p core/modules |
--help |
-h |
Displays the help message. | cleany -h |
💡 Example Output #
.
└── lib/
└── features/
└── auth/
├── data/
│ ├── datasources/
│ │ ├── auth_local_datasource.dart
│ │ └── auth_remote_datasource.dart
│ ├── models/
│ │ └── auth_model.dart
│ └── repositories/
│ └── auth_repository_impl.dart
├── domain/
│ ├── entities/
│ │ └── auth_entity.dart
│ ├── repositories/
│ │ └── auth_repository.dart
│ └── usecases/
│ └── sign_in_usecase.dart
└── presentation/
├── cubit/
│ ├── auth_cubit.dart
│ └── auth_state.dart
├── pages/
│ └── auth_page.dart
└── widgets/
└── auth_button_widget.dart