CLI Reference
Complete reference for all flutter_compile commands. The fcp alias works everywhere flutter_compile does.
Global Flags
| Flag | Description |
|---|---|
--version, -v | Print the current version |
--verbose | Noisy logging, including all shell commands executed |
--help, -h | Print usage information |
Command Overview
| Command | Alias | Description |
|---|---|---|
build | b | Build engine development artifacts |
clean | c | Remove engine build output directories |
config | cf | View and modify configuration |
daemon | — | Start JSON-RPC 2.0 daemon for IDE communication |
doctor | dr | Check environment health |
install | i | Set up development environments |
migrate | — | Migrate shell PATH to dedicated env file |
run | r | Run Flutter app with local engine build |
sdk | — | Manage Flutter SDK versions |
status | st | Show engine configuration and builds |
switch | s | Switch between normal and compiled Flutter |
sync | sy | Sync contributor environments with upstream |
test | t | Run Flutter tests with local engine build |
ui | — | Open interactive terminal UI dashboard |
uninstall | delete, remove | Uninstall development environments |
update | up | Update the CLI |
sdk
Manage Flutter SDK versions. See the SDK Management guide for detailed workflows.
sdk install
flutter_compile sdk install <version|channel> [--force]
Install a specific Flutter SDK version or the latest from a channel (stable, beta, dev, master). The first SDK installed is automatically set as the global default.
| Flag | Description |
|---|---|
--force | Remove existing SDK and re-install from scratch |
sdk list
flutter_compile sdk list [--json]
List all installed Flutter SDK versions. Entries are annotated with (global) and (project) markers.
sdk global
flutter_compile sdk global [<version>]
Show or set the global default Flutter SDK version.
sdk use
flutter_compile sdk use [<version>]
Show or pin a Flutter SDK version for the current project. Creates a .flutter-version file in the project root.
sdk exec
flutter_compile sdk exec <command> [args...]
Run a command through the resolved SDK. Resolution order: project .flutter-version → global default.
# Examples
flutter_compile sdk exec flutter doctor
flutter_compile sdk exec dart analyze
flutter_compile sdk exec flutter pub get
sdk remove
flutter_compile sdk remove <version>
Remove an installed Flutter SDK. Guards against removing the global default or project-pinned SDK.
build
build engine
flutter_compile build engine [flags]
Build the Flutter engine from source. Automatically prepends depot_tools to PATH.
| Flag | Short | Default | Description |
|---|---|---|---|
--platform | -p | host | Target platform: android, ios, macos, linux, web, host |
--cpu | -c | — | Target CPU: arm, arm64, x64 |
--mode | -m | debug | Build mode: debug, profile, release |
--unoptimized | — | true | Build with --unoptimized (faster dev builds) |
--simulator | — | false | Build for iOS simulator |
--clean | — | false | Clean output before building |
--gn | — | — | Force re-running GN |
--no-gn | — | — | Skip GN step entirely |
run
flutter_compile run [flags] [-- extra_args]
Run a Flutter app with a local engine build. Extra args after -- are forwarded to flutter run.
| Flag | Short | Default | Description |
|---|---|---|---|
--platform | -p | host | Target platform |
--cpu | -c | — | Target CPU architecture |
--mode | -m | debug | Build mode |
--unoptimized | — | true | Use unoptimized engine build |
--simulator | — | false | Use iOS simulator engine build |
test
flutter_compile test [flags] [-- extra_args]
Run Flutter tests with a local engine build. Same flags as run. Extra args after -- are forwarded to flutter test.
install
Set up contributor development environments. See the Contributor Setup guide for walkthroughs.
install flutter
flutter_compile install flutter [--ide vscode|intellij]
Clone the Flutter framework repository and set up git remotes. Prompts for SSH vs HTTPS and GitHub username.
install engine
flutter_compile install engine [--platform <platform>] [--force]
Set up the engine build environment (depot_tools + gclient). Requires install flutter first.
install devtools
flutter_compile install devtools
Clone the DevTools repository and set up git remotes.
uninstall
flutter_compile uninstall <flutter|devtools|engine>
Remove a contributor environment. Cleans up directories, PATH exports, and config entries.
sync
flutter_compile sync [flutter|engine|devtools]
Sync contributor environments with upstream. Running sync without a subcommand syncs all three sequentially.
| Subcommand | Actions |
|---|---|
sync flutter | Fetch upstream, rebase master, update-packages |
sync engine | gclient sync, ninja build (add --force for reset) |
sync devtools | Fetch upstream, rebase master, pub get |
clean
flutter_compile clean [<build_name>] [--all]
Remove engine build output directories.
- No args: list available builds
clean <build_name>: delete a specific buildclean --all: delete all builds
status
flutter_compile status [--json]
Show engine configuration and available builds with disk sizes.
config
flutter_compile config [list|get|set] [--json]
View and modify ~/.flutter_compilerc settings. See Configuration for details.
doctor
flutter_compile doctor [--json]
Check the health of your Flutter contributor environment. Reports on required tools, engine tools, config validity, and contributor environments.
switch
flutter_compile switch [normal|compiled]
Switch between normal and compiled Flutter installations. Shortcuts: n for normal, c for compiled.
daemon
flutter_compile daemon
Start a JSON-RPC 2.0 daemon for real-time IDE communication over stdin/stdout. See Daemon API Reference.
ui
flutter_compile ui
Open an interactive terminal UI dashboard with tabs for SDKs, Environments, Builds, and Doctor.
migrate
flutter_compile migrate
Migrate shell PATH exports from shell RC files to the dedicated ~/.flutter_compile_env file. Rewrites SDK blocks with the FLUTTER_COMPILE_SDK guard.
update
flutter_compile update
Check for and install the latest version from pub.dev. Also runs auto-migration on shell config.