flutter_blueprint
A TUI-based Flutter scaffolding CLI — bootstrap production-ready Flutter apps with clean architecture, state management, routing, CI/CD, and more in seconds.
flutter_blueprint new
Features
- Interactive TUI wizard — step-by-step prompts, no YAML editing required
- Clean architecture — feature-first folder structure out of the box
- State management — Riverpod or BLoC boilerplate
- Routing — go_router with optional deep-link support
- API client — Dio + optional repository interface (DIP)
- UI feedback — Snackbar helpers
- App flavors — dev/prod environment split
- Code generation — Freezed & json_serializable wired up
- Testing — unit, widget, and integration test scaffolding
- CI/CD — GitHub Actions workflows for analyze, Android, and iOS builds
- Dry-run mode — preview every planned action before writing a single file
- Config-file mode — repeatable, version-controllable
blueprint.yaml
Installation
dart pub global activate flutter_blueprint
Make sure ~/.pub-cache/bin is on your PATH:
export PATH="$PATH:$HOME/.pub-cache/bin"
Then check your setup:
flutter_blueprint doctor
Quick start
Interactive wizard
flutter_blueprint new
Walk through 13 prompts, preview the plan, confirm — done.
Config-file workflow
# 1. Preview what will be generated
flutter_blueprint plan --config blueprint.yaml
# 2. Generate
flutter_blueprint apply --config blueprint.yaml --output ./my_app
# 3. Run
cd my_app && flutter pub get && flutter run
Commands
| Command | Description |
|---|---|
new |
Launch the interactive TUI wizard |
plan --config <file> |
Dry-run — show planned actions, write nothing |
apply --config <file> |
Apply a config file to scaffold the app |
doctor |
Check Flutter, Dart, Git, and engine binary |
upgrade |
Download the latest engine binary |
Example blueprint.yaml
name: my_app
org: com.example
architecture:
style: feature_first
state_management:
package: riverpod # riverpod | bloc
routing:
package: go_router
deep_links: true
schemes: [myapp]
hosts: [open.example.com]
api:
enabled: true
dip: true
features:
ui_feedback: true
flavors: true
notifications: false
codegen:
freezed: true
json_serializable: true
testing:
unit: true
widget: true
integration: false
ci:
provider: github_actions # github_actions | none
Generated project structure
my_app/
lib/
core/
api/ api_client.dart
config/ app_config.dart
di/ injector.dart
router/ app_router.dart
ui/snack/ snack.dart
features/
example/
data/ example_service.dart
domain/ example_model.dart
presentation/
example_screen.dart
example_provider.dart (riverpod)
test/
unit/ example_test.dart
widget/ example_widget_test.dart
.github/workflows/
analyze.yml
build_android.yml
build_ios.yml
pubspec.yaml (dependencies auto-added)
.env.dev
.env.prod
How it works
flutter_blueprint is a Dart TUI frontend that spawns a Go execution engine (flutter_blueprint_engine) as a subprocess and communicates via JSON-Lines (NDJSON) over stdin/stdout. The engine handles all file generation and YAML patching. Run flutter_blueprint upgrade to download the engine binary automatically.
Requirements
- Dart SDK ≥ 3.0
- The
flutter_blueprint_enginebinary — installed byflutter_blueprint upgrade
License
MIT — see LICENSE.
Libraries
- bridge/engine_bridge
- bridge/engine_messages
- commands/apply_command
- commands/doctor_command
- commands/new_command
- commands/plan_command
- commands/upgrade_command
- flutter_archify
- FlutterBlueprint — a TUI-based Flutter scaffolding CLI.
- models/blueprint_config
- tui/plan_display
- tui/steps/api_step
- tui/steps/architecture_step
- tui/steps/ci_step
- tui/steps/codegen_step
- tui/steps/flavors_step
- tui/steps/project_info_step
- tui/steps/routing_step
- tui/steps/state_management_step
- tui/steps/testing_step
- tui/steps/ui_feedback_step
- tui/wizard
- utils/yaml_writer