-
Notifications
You must be signed in to change notification settings - Fork 3
Shell Shim
The shell shim makes the plain flutter run command launch the flutter-cli TUI automatically — no wrapper script, no alias to remember.
The shim places a thin flutter script earlier in your PATH than the real Flutter SDK. When you type flutter run, the shim intercepts it and delegates to flutter-cli run. All other Flutter commands (flutter build, flutter doctor, etc.) are passed through unchanged to the real flutter binary.
flutter-cli shim installThe installer:
- Detects the real Flutter SDK location (
which flutter). - Creates
~/.local/share/flutter-cli/shim/flutter. - Prepends
~/.local/share/flutter-cli/shimtoPATHin your shell profile.
You'll be shown exactly what it will write before it does anything.
| Shell | File modified |
|---|---|
| bash |
~/.bashrc (Linux) / ~/.bash_profile (macOS) |
| zsh | ~/.zshrc |
| fish | ~/.config/fish/config.fish |
| Other | You'll be shown the export PATH=… line to add manually |
Reload your shell (or open a new tab) after installing:
source ~/.bashrc # bash
source ~/.zshrc # zsh
exec fish # fishwhich flutter
# → /Users/you/.local/share/flutter-cli/shim/flutter
flutter run # Opens the TUI dashboard
flutter build apk # Passes through to the real Flutterflutter-cli shim uninstallThis removes the shim directory and the PATH line from your profile. Your shell goes back to using the real flutter directly.
If you prefer not to modify your profile automatically:
flutter-cli shim install --no-profileThen add this line yourself wherever you manage PATH:
export PATH="$HOME/.local/share/flutter-cli/shim:$PATH"Does the shim affect flutter build, flutter doctor, etc.?
No. Only flutter run is intercepted. Everything else is forwarded to the real flutter binary unchanged.
What if I have multiple Flutter SDK versions (FVM, asdf)?
The shim calls the flutter that was on your PATH at install time. If you switch SDK versions, run flutter-cli shim install again to update the reference.