🚀 FirePilot
FirePilot is the elite command-line companion for Flutter developers who want to skip the frustration of Firebase setup. It's a "one-click" orchestrator that automates everything from Node.js installation to SHA key registration.
🔥 Why FirePilot?
The official Firebase CLI is powerful, but it requires many manual steps. FirePilot bridges the gap by automating the boring parts:
- 🛠️ Self-Healing Environment: Automatically detects and installs Node.js/NPM (via Winget on Windows or Homebrew on macOS).
- 💉 Smart PATH Injection: No terminal restarts required. Newly installed tools work instantly.
- 👥 Multi-Account Support: Effortlessly switch between multiple client Google accounts directly from an interactive menu.
- 🔑 Automatic SHA Extraction: Automatically finds and registers SHA-1 and SHA-256 certificates for your Android apps.
- 🛰️ Intelligent Orchestration: Combines Firebase project creation, FlutterFire configuration, and dependency setup into a single flow.
- 🔍 Real-Time Diagnostics: Interactive error reporting that actually tells you why a project creation failed (e.g., Quota exceeded).
🚀 Usage
Activate FirePilot globally using Dart:
dart pub global activate fire_pilot
Usage
Run the full setup wizard inside your Flutter project:
fire_pilot firebase setup --full
Available Commands
| Command | Description |
|---|---|
firebase setup --full |
The complete "Pilot" experience: Tools -> Login -> Project -> FlutterFire -> Deps -> SHA. |
firebase sha add |
Automatically extract and add SHA keys to your Firebase project. |
firebase login |
Manage and switch between multiple Google accounts. |
firebase enable <feature> |
Quickly enable Firebase features (auth, firestore, etc). |
firebase force-update |
Generate a Remote Config Force Update service and UI Dialogs. |
🚀 Firebase Force Update Setup
Setting up a force-update or optional-update mechanism is as simple as running:
fire_pilot firebase force-update --path=lib/services/remote_config_service.dart
This command will:
- Add necessary dependencies (
firebase_remote_config,package_info_plus, andurl_launcher) to yourpubspec.yaml. - Generate a ready-to-use
RemoteConfigServiceclass at the specified path. - Auto-generate premium, beautiful dialogs (
ForceUpdateDialogandOptionalUpdateDialog) insideupdate_dialogs.dartin the same directory.
🛰️ Firebase Console Setup
In your Firebase Console, navigate to Remote Config and add the following parameters:
| Parameter Key | Type | Default Value | Description |
|---|---|---|---|
is_force_update |
Boolean | false |
If true, a non-dismissible force update is triggered when the app version is below the minimum version. |
min_version_android |
String | 1.0.0 |
The minimum required version for Android below which force update is triggered (if is_force_update is enabled). |
min_version_ios |
String | 1.0.0 |
The minimum required version for iOS below which force update is triggered (if is_force_update is enabled). |
current_version_android |
String | 1.0.0 |
The latest available version for Android. Triggers optional update if the app version is below this but not forcing update. |
current_version_ios |
String | 1.0.0 |
The latest available version for iOS. Triggers optional update if the app version is below this but not forcing update. |
store_url_android |
String | https://play.google.com/store/apps/details?id=your.package |
Play Store URL of your app. |
store_url_ios |
String | https://apps.apple.com/app/idyour-app-id |
App Store URL of your app. |
💻 Integration Code Snippet
To use the generated service in your Flutter application:
-
Initialize in
main.dart:void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); // Initialize the RemoteConfigService final remoteConfig = RemoteConfigService(); await remoteConfig.initialize(); runApp(const MyApp()); } -
Trigger Dialog Checks on App Launch: Call the dialog trigger inside the
initStateof your main screen widget (e.g.,HomeScreenorMyHomePage, not in the rootMyAppwidget, since the context needs to be a descendant ofMaterialAppto access the navigator and localizations):@override void initState() { super.initState(); WidgetsBinding.instance.addPostFrameCallback((_) { // Automatically checks configuration and shows the correct dialog RemoteConfigService().checkAndShowUpdateDialog(context); }); }
🛠️ Required Tools
FirePilot is smart enough to help you install these if they are missing:
- Flutter & Dart SDK
- Node.js & NPM
- Firebase CLI
- FlutterFire CLI
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Made with ❤️ for the Flutter community.
Libraries
- commands/firebase_setup
- commands/force_update
- services/env_service
- Documentation for the environment service library.
- services/feature_service
- Documentation for the feature service library.
- services/firebase_service
- Documentation for the Firebase service library.
- services/flutter_service
- Documentation for the Flutter service library.
- services/prompt_service
- Documentation for the prompt service library.
- utils/code_generator_helper
- utils/process_runner
- Documentation for the process runner utility library.