cleany 0.0.24 copy "cleany: ^0.0.24" to clipboard
cleany: ^0.0.24 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 #


dart pub global activate cleany

2. Update #

dart pub global activate cleany

🚀 Usage ti create new feature #

cleany <feature_name> 

▶️ 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 | | --add_dependencies | -d | add base dependencies. | cleany -h | | --generate_core | -c | Generate core folders with base class and method. | cleany -h |

💡 Example Output #

.
└── lib/
    └── features/
        └── {feature_name}/
            ├── data/
            │   ├── datasources/
            │   │   ├── {feature_name}_local_datasource.dart
            │   │   └── {feature_name}_remote_datasource.dart
            │   ├── models/
            │   │   └── {feature_name}_model.dart
            │   └── repositories/
            │       └── {feature_name}_repository_impl.dart
            ├── domain/
            │   ├── entities/
            │   │   └── {feature_name}_entity.dart
            │   ├── repositories/
            │   │   └── {feature_name}_repository.dart
            │   └── use_cases/
            │       └── {feature_name}_use_cases.dart
            └── presentation/
                ├── cubit/
                │   ├── {feature_name}_cubit.dart
                │   └── {feature_name}_state.dart
                ├── pages/
                │   └── {feature_name}_page.dart
                └── widgets/
                    └── {feature_name}_button_widget.dart


5
likes
115
points
241
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool to generate Clean Architecture feature structure for Flutter projects

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, logger, path

More

Packages that depend on cleany