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
| Key | Friendly Alias | Description |
|---|---|---|
flutter_path | flutter | Path to Flutter contributor checkout (e.g. ~/flutter_compile/flutter/bin) |
engine_path | engine | Path to Flutter engine checkout |
devtools_path | devtools | Path to DevTools checkout |
depot_tools_path | depot_tools | Path to depot_tools installation |
global_sdk_version | global_sdk | Currently 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
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
| Category | Checks |
|---|---|
| Required Tools | git, python3, dart, flutter |
| Engine Tools | gclient, ninja, Xcode (macOS), Visual Studio (Windows) |
| Config | ~/.flutter_compilerc file validity |
| Environments | Flutter 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 contributor binary (
flutter/bin) - Dart SDK from contributor Flutter
- Depot tools
- Global SDK version (with conditional guard)
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:
- Moves PATH exports from
~/.zshrc/~/.bashrcto~/.flutter_compile_env - Rewrites SDK blocks with the
FLUTTER_COMPILE_SDKconditional guard - Adds a
sourceline to your shell RC file
The update command also runs auto-migration.
Environment Variables Reference
| Variable | Set By | Purpose |
|---|---|---|
FLUTTER_COMPILE_SDK | IDE extensions | Override SDK path in IDE terminals |
PUB_CACHE | sdk exec | Per-SDK pub cache directory |
PATH | ~/.flutter_compile_env | SDK and tool paths |
Special Files
| File | Purpose |
|---|---|
~/.flutter_compilerc | Main configuration file |
~/.flutter_compile_env | Shell PATH exports (sourced by shell RC) |
.flutter-version | Project-pinned SDK version (in project root) |
Windows Notes
- PATH exports use PowerShell profile instead of shell RC files
USERPROFILEis used instead ofHOMEwhereis used instead ofwhichfor command detectionPROCESSOR_ARCHITECTUREenv var resolves host CPU- Doctor checks for Visual Studio (
cl.exe) instead of Xcode