flutter/flutter
User-facing surface is dominated by the `flutter` CLI: generateCommands() registers ~35 FlutterCommand subclasses covering the whole app lifecycle (create, run, build, test, analyze, doctor, drive, install, screenshot, symbolize, upgrade/downgrade, channel, precache, clean, config, devices, emulators, logs, attach, daemon, debug-adapter, widget-preview, shell-completion, gen-l10n, assemble, plus hidden dev commands like update-packages and ide-config). Build subcommands fan out per platform (apk, appbundle, aar, ios, ios-framework, macos, macos-framework, linux, windows, web, swift-package). The framework packages provide the runtime libraries (material, cupertino, widgets, services, etc.) and companion packages (flutter_test, flutter_driver, integration_test, flutter_goldens, flutter_localizations, flutter_web_plugins, fuchsia_remote_debug_protocol).
- generateCommands() in executable.dart is the full CLI command table: AnalyzeCommand, AssembleCommand, AttachCommand, BuildCommand, ChannelCommand, CleanCommand, ConfigCommand, CustomDevicesCommand, CreateCommand, DaemonCommand, DebugAdapterCommand, DevicesCommand, DoctorCommand, DowngradeCommand, DriveCommand, EmulatorsCommand, GenerateCommand, GenerateLocalizationsCommand, InstallCommand, LogsCommand, PackagesCommand, PrecacheCommand, RunCommand, ScreenshotCommand, ShellCompletionCommand, TestCommand, WidgetPreviewCommand, UpgradeCommand, SymbolizeCommand, IdeConfigCommand, UpdatePackagesCommand.
- RunCommandBase (shared by `flutter run` and `flutter drive`) exposes dozens of debugging flags: build modes, --dart-define, flavors, DDS options, DevTools options, trace-* profilers, --enable-impeller, --wasm, web renderer selection, wireless device refresh, and start-paused.
- `flutter run` picks HotRunner when shouldUseHotMode(buildInfo) is true (and not web), otherwise ColdRunner; the choice determines whether hot reload/restart keybindings are offered.
- `flutter test` is implemented by TestCommand (commands/test.dart) and runs tests through the flutter_tester device or Chrome for web tests; it can build native assets via TestCompilerNativeAssetsBuilder.
- `flutter doctor` runs a list of DoctorValidators (android_workflow, xcode, etc.) and prints diagnostics; DoctorCommand receives the shared globals.doctor singleton until migration to DI completes.
- `flutter daemon` exposes a JSON-over-stdio protocol for IDEs: messages are bracketed [json] frames parsed into DaemonMessage/DaemonEventData, support binary payloads via _binaryLength, and dispatch to registered Domain handlers (device, app, devtools, emulator, daemon domains).
- `flutter create` scaffolds projects from Mustache templates in packages/flutter_tools/templates (app, module, package, plugin, add_to_app, package_ffi, etc.) rendered via MustacheTemplateRenderer.
- `flutter build` is a BuildCommand umbrella whose subcommands are defined in commands/build_*.dart; Android builds go through AndroidGradleBuilder (android/gradle.dart), Apple builds through Xcode wrappers, web through Dart->JS/Wasm compilers.
- Feature flags gate platform support: FeatureFlags.allFeatures lists ~21 flags (web, linux/macos/windows desktop, android, ios, fuchsia, custom devices, native assets, swift package manager, windowing, lldb debugging, UIScene migration, riscv64, hcpp, tool extensions) toggled via `flutter config` and Feature.configSetting.
- `flutter precache` downloads DevelopmentArtifacts (android_gen_snapshot, android_maven, ios, web, macos, windows, linux, fuchsia, flutter_runner, universal, informative) into bin/cache/artifacts.
- packages/flutter is the framework library exporting widgets/material/cupertino/services/rendering/etc.; packages/flutter_test provides the test harness, flutter_driver and integration_test drive apps end-to-end, flutter_goldens compares golden images against Skia Gold.
- Hidden/dev-only commands include AssembleCommand (direct build-system target invocation used by Xcode/Gradle backends), UpdatePackagesCommand, IdeConfigCommand, DebugAdapterCommand (DAP server for editors), and ShellCompletionCommand.