CleanFlu CLI is a command-line tool designed to help you build clean and organized Flutter app structures quickly and efficiently. With Clean_Flu_CLI, you can streamline the development of your Flutter applications by generating key components, ensuring clean architecture, and improving code maintainability.
To install CleanFlu CLI, ensure that you have the latest version of Flutter/Dart SDK installed on your machine. Then, run the following command:
dart pub global activate clean_flu_cli
The init
command will initialize the project and guide you through the setup process. You will be able to choose data sources (local and/or remote) and create the necessary structure and configurations. Additionally, the required dependencies, such as Riverpod
for state management, Chopper
for HTTP requests, and Isar
for local database, will be automatically installed. (additional options may be available in the future).
clean_flu init
The model
command allows you to generate data models and domain entities easily. It helps you define the data structures required for your application.
clean_flu model --name profile --properties "String firstName, String lastName, String? avatar, DateTime createdAt"
The repository
command generates domain repository classes that facilitate clean data access.
clean_flu repository --name product
The usecase
command generates domain use case classes, encapsulating business logic.
clean_flu usecase --name product_fetch --group product
The screen
command is used to generate presentation screens or pages
for your Flutter app. It helps you create the user interface components for your application quickly.
clean_flu screen --name home
To start using Clean_Flu_CLI, follow these simple steps:
- Install Clean_Flu_CLI globally using the installation command provided above.
- Initialize your project with the init command to set up the clean architecture foundation.
- Use the other commands like model, repository, screen, and usecase to generate necessary components for your Flutter app.
Continue developing your app while following the principles of clean architecture.
To define options without being prompted with choices or questions, you can utilize command-line arguments. For more details on available arguments and their usage, refer to the help
command:
clean_flu --help
If you encounter any issues, have suggestions, or want to contribute to CleanFlu
, please visit the GitHub repository. We welcome your feedback and contributions to help make this tool even better.
This project is licensed under the MIT License. See the LICENSE file for details.