Flutter CA CLI 🚀

A CLI tool to quickly generate Flutter projects with Clean Architecture + Bloc setup, including core folders, utils, network, and feature scaffolding.

This tool helps Flutter developers save time and follow best practices.


Features

  • Create a new Flutter project with Clean Architecture structure.
  • Automatic folder structure: presentation, domain, data, core.
  • Includes Bloc state management setup.
  • Add new feature modules easily with add-feature.
  • Pre-configured core/config, core/network, core/utils, core/error folders.

Installation

  1. Make the CLI executable:
chmod +x /full/path/to/flutter_ca/bin/flutter_ca
Add CLI folder to your PATH (Mac/Linux):
echo 'export PATH="$PATH:/full/path/to/flutter_ca/bin"' >> ~/.zshrc
source ~/.zshrc
Replace /full/path/to/flutter_ca/bin with the actual path to your CLI bin folder.
Usage
Create a new Flutter project
flutter_ca create <project_name>
Example:
flutter_ca create todo_app
This will generate:
todo_app/
 ├─ lib/
 │   ├─ core/
 │   ├─ features/
 │   ├─ main.dart
Add a new feature
flutter_ca add-feature <project_name> <feature_name>
Example:
flutter_ca add-feature todo_app auth
This will create the auth feature module with presentation, domain, data folders and Bloc scaffold.
Folder Structure
lib/
 ├─ core/
 │   ├─ config/
 │   ├─ network/
 │   ├─ utils/
 │   ├─ error/
 ├─ features/
 │   └─ <feature_name>/
 │       ├─ presentation/
 │       ├─ domain/
 │       └─ data/
 └─ main.dart