A scaffolding CLI for Flutter projects with feature-first architecture and BLoC/Cubit state management.
Tip: Please use fbloc_cli v2.0.0 or newer — it's stable and error‑free.
- Creates a new Flutter app with opinionated structure
- Generates default features:
homeandauth - Scaffolds additional features and views on demand
- Prints concise, user-friendly output with icons
From pub.dev:
dart pub global activate fbloc_cliFrom source (local path):
dart pub get
dart pub global activate --source path .Ensure your pub cache bin is on PATH so fbloc is available.
fbloc create project my_appor the shorthand:
fbloc create my_appProject creation will:
- Prompt for configuration (Network, State Management, Navigation, Equatable)
- Create Flutter project structure
- Generate default
homefeature (withhome_screen) and the fullauthfeature - Save preferences in
.cli_config.json
Final output looks like:
📦 Project "my_app" created successfully!
✨ Features generated:
🧩 home, auth
📁 Generated folders:
📂 app/features/home/ (with home_screen)
📂 app/features/auth/
📂 app/core/theme/
📂 app/core/utils/
📂 app/core/service/
📂 app/routes/
➡️ Next steps:
➤ cd my_app
➤ flutter pub get
➤ flutter run
fbloc create feature author
fbloc feature authFinal output (concise):
✨ Feature generated: auth
fbloc view login on authFinal output (concise):
🖼️ View generated: login on auth
On first project creation, you'll be prompted to configure:
- Network package: http (default) or dio
- State management: bloc (default) or cubit
- Navigation: go_router (default) or navigator
- Equatable: yes (default) or no
Configuration is saved in .cli_config.json and used for all subsequent feature/view generation.
lib/
└── app/
├── features/
│ ├── home/
│ │ ├── bloc/ or cubit/
│ │ ├── repository/
│ │ ├── model/
│ │ └── view/
│ └── auth/
│ ├── bloc/ or cubit/
│ ├── repository/
│ ├── model/
│ └── view/
├── core/
│ ├── theme/
│ ├── utils/
│ └── service/
└── routes/