FlutterStart

Create your Flutter project, your way.

FlutterStart is a review-first CLI that generates deterministic, production-ready Flutter projects. Nothing is written to disk until you have seen the exact plan and explicitly approved it. Every choice — architecture, state management, routing, and the full application foundation — is resolved from a versioned Capability Catalog with catalog-driven compatibility checks, so the same inputs always produce the same project.

Current release: 0.3.0 — deterministic, review-first project creation with a configurable Application Foundation.

Installation

dart pub global activate flutterstart

Make sure the pub global bin directory is on your PATH, then confirm:

flutterstart doctor

Quick start

# 1. Check your environment is ready to generate
flutterstart doctor

# 2. Create a project interactively — pick a setup mode, review, approve
flutterstart create my_app

create walks you through:

  1. Environment preflight — Flutter/Dart toolchain health.
  2. Setup mode — Recommended, Customize, or Minimal.
  3. Configuration — identity plus any capability selections.
  4. Compatibility — catalog-driven validation of your selections.
  5. Plan review — the full list of files and operations, with the destination still untouched.
  6. Approval — type yes to materialize the project.

How it works

FlutterStart never mutates your destination directly. It stages the project in a temporary location, produces a reviewable Change Plan, and only writes to the destination after explicit approval. You can split review and apply:

# Produce a reviewable plan and stop
flutterstart create my_app --plan

# Inspect it
flutterstart plan show <planId>

# Apply only after explicit approval
flutterstart apply <planId> --approve <planId>

# Or throw it away
flutterstart plan discard <planId>

Commands

Command Description
flutterstart doctor Report Flutter/Dart toolchain and environment health.
flutterstart create <name> Build a reviewable project plan and optionally apply it.
flutterstart plan show <planId> Render a persisted Change Plan for review.
flutterstart plan discard <planId> Discard a persisted Change Plan.
flutterstart apply <planId> --approve <planId> Apply an explicitly approved Change Plan.
flutterstart validate Validate a generated FlutterStart project.

create options

Option Purpose
--plan Stop after saving a reviewable plan (no apply).
--config <file> Resolve the Blueprint from a versioned YAML config file.
--non-interactive Fail instead of prompting when a decision is missing.
--output text|json Select human or machine-readable output.
--description <text> Project description.
--organization <id> Reverse-DNS organization identifier (e.g. com.example).
--destination <path> Output directory.
--platform <name> Target platform; repeat for several (android, ios, web, macos, windows, linux).
--git yes|no Initialize a git repository.
--validation-profile standard Post-apply validation profile.

Setup modes

Mode What it does
Recommended Applies a curated, production-ready stack after you review project identity.
Customize Opens the full section-based configurator, including the optional Application Foundation.
Minimal A lean baseline with the smallest set of opinionated defaults.

All three modes converge on the same schema_version: 3 Blueprint.

Application Foundation

Customize mode presents one optional Application Foundation section. Every capability is single-select and independently skippable, and the section as a whole can be skipped. Skipped capabilities are absent from the Blueprint — no none sentinel is stored, so "None" and "skip" are identical.

Capability Options
App Initialization Simple · Bootstrap · Production Bootstrap Pipeline
Environment Configuration Dart Define · Flutter Dotenv · Envied
Flavors Basic · Advanced
Logging Logger · Talker
Error Handling Basic · Failure / Result Pattern · Global Error Boundary
Theme System Basic ThemeData · Material 3 · Design Tokens
Localization Flutter gen-l10n · Easy Localization
Project Structure Feature First · Layer First · Hybrid

Project Structure is storage-only in 0.3. The convention is validated and stored in the Blueprint but does not change generated files yet — feature generation consumes it from 0.4 on, so output is identical across the three choices today.

Project Organization

The Release 0.2 capability selections remain available in Customize mode:

Capability Options
Architecture Simple · Clean Architecture
State Management Bloc / Cubit · Riverpod · setState / Minimal
Routing GoRouter · Navigator / Minimal · Skip
Backend REST with Dio · REST with package:http · Supabase
Local Storage SharedPreferences · Flutter Secure Storage · Drift / SQLite
Data Modeling freezed + json_serializable · json_serializable only · Manual models
Dependency Injection GetIt · Riverpod-based · Manual injection

Some options carry compatibility prerequisites (platform support, code generation) that are surfaced during validation. Options declared but not yet generatable (e.g. a Firebase backend) are not selectable.

Non-interactive configuration

Drive create from a versioned YAML config file for CI and reproducible setups:

schema_version: 3
project_name: demo_app
description: A demo app.
organization: com.example
destination: demo_app
target_platforms: [android, ios]
git: true
setup_mode: customize
single_selections:
  # Application Foundation
  foundation.app_initialization: bootstrap
  foundation.logging: logger
  foundation.error_handling: global_boundary
  foundation.project_structure: feature_first
  # Project Organization
  org.state_management: bloc
  org.routing: go_router
  org.dependency_injection: get_it
flutterstart create demo_app --config demo_app.yaml --plan

Migration: version 1 and 2 config files upgrade on read, and relocated Organization/Localization selections retain stable IDs. In version 3 the retired org.project_organization and org.localization keys are rejected with a structured LEGACY_RELOCATED_KEY error rather than silently remapped.

JSON output

Every command accepts --output json and emits a stable envelope suitable for scripting and CI:

flutterstart create my_app --config my_app.yaml --plan --output json

The create plan envelope includes the resolved Blueprint, structured compatibility findings (status + per-finding severity/code/message), and the list of target paths — all before anything is written.

Exit codes

Code Meaning
0 Success
1 Unexpected internal error
2 Usage error (invalid arguments)
3 Environment preflight failure
4 Blueprint invalid or compatibility blocker
5 Planning or staging failure
6 Plan not found, or state forbids the operation
7 Plan stale, or staging integrity failure
8 Approval required and absent
9 Apply failed — rolled back
10 Apply failed — partial or manual recovery required
11 Validation failed
12 Cancelled by user
13 Session lock held by another FlutterStart operation

Supported platforms

  • macOS & Linux — supported release targets, enforced by blocking CI gates.
  • WindowsProvisional and non-blocking.

Roadmap

Upcoming releases (not yet available):

  • 0.4 — Feature generation. Generate features and folder structures from the Project Structure convention stored in 0.3.
  • Visual web configurator.
  • Authentication starter.
  • CI/CD templates.

Repository

https://github.com/MohamedAbd0/flutterstart

Libraries

components/flutterstart_apply/flutterstart_apply
components/flutterstart_apply/src/apply_phase1
components/flutterstart_apply/src/file_system
components/flutterstart_apply/src/git_init
components/flutterstart_apply/src/invariant
components/flutterstart_apply/src/materialize
components/flutterstart_apply/src/preflight
components/flutterstart_apply/src/recovery
components/flutterstart_apply/src/recovery_report
components/flutterstart_apply/src/regen_failure
components/flutterstart_apply/src/regen_guard
components/flutterstart_apply/src/regenerate
components/flutterstart_cli/src/commands/apply
components/flutterstart_cli/src/commands/apply_pipeline
components/flutterstart_cli/src/commands/apply_success
components/flutterstart_cli/src/commands/create
components/flutterstart_cli/src/commands/doctor
components/flutterstart_cli/src/commands/plan_discard
components/flutterstart_cli/src/commands/plan_show
components/flutterstart_cli/src/commands/validate
components/flutterstart_cli/src/mode/config_file
components/flutterstart_cli/src/mode/exit_reporter
components/flutterstart_cli/src/mode/non_interactive
components/flutterstart_cli/src/render/blueprint_json
components/flutterstart_cli/src/render/doctor_json
components/flutterstart_cli/src/render/doctor_text
components/flutterstart_cli/src/render/envelope
components/flutterstart_cli/src/render/plan_availability
components/flutterstart_cli/src/render/plan_json
components/flutterstart_cli/src/render/plan_text
components/flutterstart_cli/src/render/welcome_banner
components/flutterstart_cli/src/wizard/blueprint_builder
components/flutterstart_cli/src/wizard/configurator
components/flutterstart_cli/src/wizard/section
components/flutterstart_cli/src/wizard/setup_mode_prompt
components/flutterstart_cli/src/wizard/summary
components/flutterstart_cli/src/wizard/validators
components/flutterstart_cli/src/wizard/wizard
components/flutterstart_cli/src/wizard/wizard_io
components/flutterstart_core/flutterstart_core
Core models, primitives, and utilities for FlutterStart.
components/flutterstart_core/src/approval/approval_binding
components/flutterstart_core/src/compatibility/blueprint_validator
components/flutterstart_core/src/compatibility/catalog_validator
components/flutterstart_core/src/doctor/doctor_probe
components/flutterstart_core/src/exit_codes
components/flutterstart_core/src/hashing/canonical_json
components/flutterstart_core/src/hashing/hashing
components/flutterstart_core/src/lock/session_lock
components/flutterstart_core/src/logging/log_record
components/flutterstart_core/src/logging/redaction
components/flutterstart_core/src/logging/retention
components/flutterstart_core/src/model/applied_plan_history_record
components/flutterstart_core/src/model/approval_record
components/flutterstart_core/src/model/blueprint
components/flutterstart_core/src/model/catalog_entry
components/flutterstart_core/src/model/change_plan
components/flutterstart_core/src/model/command_record
components/flutterstart_core/src/model/doctor_report
components/flutterstart_core/src/model/observed
components/flutterstart_core/src/model/operation
components/flutterstart_core/src/model/ownership_class
components/flutterstart_core/src/model/plan_location_record
components/flutterstart_core/src/model/plan_state
components/flutterstart_core/src/model/recipe_lock
components/flutterstart_core/src/model/recovery_report
components/flutterstart_core/src/model/setup_mode
components/flutterstart_core/src/model/staging_manifest
components/flutterstart_core/src/model/toolchain_exception
components/flutterstart_core/src/model/validation_report
components/flutterstart_core/src/paths/paths
components/flutterstart_core/src/process/process
components/flutterstart_core/src/staleness/staleness
components/flutterstart_core/src/store/applied_history_store
components/flutterstart_core/src/store/plan_store
components/flutterstart_core/src/store/staging_store
components/flutterstart_recipes/flutterstart_recipes
components/flutterstart_recipes/src/app_scaffold_resource
components/flutterstart_recipes/src/blueprint_migration
components/flutterstart_recipes/src/catalog_loader
components/flutterstart_recipes/src/composer/blueprint_contributions
components/flutterstart_recipes/src/composer/composer
components/flutterstart_recipes/src/composer/contribution
components/flutterstart_recipes/src/foundation_brick_resource
components/flutterstart_recipes/src/generated_resources
components/flutterstart_recipes/src/preset_resolver
components/flutterstart_recipes/src/recipe_lock_loader
components/flutterstart_recipes/src/template_variable_schema
components/flutterstart_render/flutterstart_render
components/flutterstart_render/src/mason_renderer
components/flutterstart_render/src/renderer
components/flutterstart_stage/flutterstart_stage
components/flutterstart_stage/src/manifest_builder
components/flutterstart_stage/src/ownership_classifier
components/flutterstart_stage/src/plan_builder
components/flutterstart_stage/src/project_artifacts
components/flutterstart_stage/src/stager
components/flutterstart_validate/flutterstart_validate
Project validation gates and protected-file verification.
components/flutterstart_validate/src/gates
components/flutterstart_validate/src/protected
components/flutterstart_validate/src/validate
flutterstart