Configuration

flutter_compile uses a simple key-value configuration file and a dedicated shell environment file to manage paths and settings.

Configuration File

The main configuration file is ~/.flutter_compilerc. It uses a key:value format with one entry per line.

Configuration keys

KeyFriendly AliasDescription
flutter_pathflutterPath to Flutter contributor checkout (e.g. ~/flutter_compile/flutter/bin)
engine_pathenginePath to Flutter engine checkout
devtools_pathdevtoolsPath to DevTools checkout
depot_tools_pathdepot_toolsPath to depot_tools installation
global_sdk_versionglobal_sdkCurrently set global Flutter SDK version

Example file

flutter_path:~/flutter_compile/flutter/bin
engine_path:~/flutter_compile/engine
devtools_path:~/flutter_compile/devtools
depot_tools_path:~/flutter_compile/depot_tools
global_sdk_version:stable
Note: Key-value splitting uses the first colon only, so Windows drive-letter paths (e.g. C:\Users\...) work correctly.

Config Command

List all settings

flutter_compile config
flutter_compile config list
flutter_compile config list --json

Get a specific setting

# Using friendly alias
flutter_compile config get flutter
flutter_compile config get engine

# Using raw key
flutter_compile config get flutter_path
flutter_compile config get global_sdk_version

Set a value

flutter_compile config set flutter_path ~/my/custom/flutter/bin
flutter_compile config set global_sdk_version 3.24.0

Doctor

The doctor command checks the health of your entire environment:

flutter_compile doctor
flutter_compile doctor --json

Check categories

CategoryChecks
Required Toolsgit, python3, dart, flutter
Engine Toolsgclient, ninja, Xcode (macOS), Visual Studio (Windows)
Config~/.flutter_compilerc file validity
EnvironmentsFlutter contributor, DevTools contributor, Engine contributor

Doctor also probes known depot_tools locations beyond PATH for gclient detection.

Shell Environment File

Since v0.10.0, flutter_compile uses a dedicated env file at ~/.flutter_compile_env to manage PATH exports. This file is sourced from your shell RC file (~/.zshrc or ~/.bashrc).

How it works

The env file contains PATH export blocks for:

FLUTTER_COMPILE_SDK guard (v0.12.0+)

The SDK block in ~/.flutter_compile_env uses a conditional guard:

# When FLUTTER_COMPILE_SDK is set (by an IDE extension):
#   → Use the IDE-provided SDK path
# When FLUTTER_COMPILE_SDK is not set (regular terminal):
#   → Use the global default SDK path

This means IDE terminals automatically use the project-pinned SDK while regular terminals use the global default.

Migration

If you upgraded from an older version that wrote PATH exports directly to your shell RC file:

flutter_compile migrate

This command:

  1. Moves PATH exports from ~/.zshrc / ~/.bashrc to ~/.flutter_compile_env
  2. Rewrites SDK blocks with the FLUTTER_COMPILE_SDK conditional guard
  3. Adds a source line to your shell RC file

The update command also runs auto-migration.

Environment Variables Reference

VariableSet ByPurpose
FLUTTER_COMPILE_SDKIDE extensionsOverride SDK path in IDE terminals
PUB_CACHEsdk execPer-SDK pub cache directory
PATH~/.flutter_compile_envSDK and tool paths

Special Files

FilePurpose
~/.flutter_compilercMain configuration file
~/.flutter_compile_envShell PATH exports (sourced by shell RC)
.flutter-versionProject-pinned SDK version (in project root)

Windows Notes