CLI Reference

Complete reference for all flutter_compile commands. The fcp alias works everywhere flutter_compile does.

Global Flags

FlagDescription
--version, -vPrint the current version
--verboseNoisy logging, including all shell commands executed
--help, -hPrint usage information

Command Overview

CommandAliasDescription
buildbBuild engine development artifacts
cleancRemove engine build output directories
configcfView and modify configuration
daemonStart JSON-RPC 2.0 daemon for IDE communication
doctordrCheck environment health
installiSet up development environments
migrateMigrate shell PATH to dedicated env file
runrRun Flutter app with local engine build
sdkManage Flutter SDK versions
statusstShow engine configuration and builds
switchsSwitch between normal and compiled Flutter
syncsySync contributor environments with upstream
testtRun Flutter tests with local engine build
uiOpen interactive terminal UI dashboard
uninstalldelete, removeUninstall development environments
updateupUpdate 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.

FlagDescription
--forceRemove 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.

FlagShortDefaultDescription
--platform-phostTarget platform: android, ios, macos, linux, web, host
--cpu-cTarget CPU: arm, arm64, x64
--mode-mdebugBuild mode: debug, profile, release
--unoptimizedtrueBuild with --unoptimized (faster dev builds)
--simulatorfalseBuild for iOS simulator
--cleanfalseClean output before building
--gnForce re-running GN
--no-gnSkip 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.

FlagShortDefaultDescription
--platform-phostTarget platform
--cpu-cTarget CPU architecture
--mode-mdebugBuild mode
--unoptimizedtrueUse unoptimized engine build
--simulatorfalseUse 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.

SubcommandActions
sync flutterFetch upstream, rebase master, update-packages
sync enginegclient sync, ninja build (add --force for reset)
sync devtoolsFetch upstream, rebase master, pub get

clean

flutter_compile clean [<build_name>] [--all]

Remove engine build output directories.

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.