fire_pilot 1.0.4 copy "fire_pilot: ^1.0.4" to clipboard
fire_pilot: ^1.0.4 copied to clipboard

Elite Firebase setup orchestrator for Flutter. Automates Node.js install, multi-account login, project creation, and SHA registration.

🚀 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:

  1. Add necessary dependencies (firebase_remote_config, package_info_plus, and url_launcher) to your pubspec.yaml.
  2. Generate a ready-to-use RemoteConfigService class at the specified path.
  3. Auto-generate premium, beautiful dialogs (ForceUpdateDialog and OptionalUpdateDialog) inside update_dialogs.dart in 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:

  1. Initialize in main.dart:

    void main() async {
      WidgetsFlutterBinding.ensureInitialized();
      await Firebase.initializeApp();
         
      // Initialize the RemoteConfigService
      final remoteConfig = RemoteConfigService();
      await remoteConfig.initialize();
         
      runApp(const MyApp());
    }
    
  2. Trigger Dialog Checks on App Launch: Call the dialog trigger inside the initState of your main screen widget (e.g., HomeScreen or MyHomePage, not in the root MyApp widget, since the context needs to be a descendant of MaterialApp to 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.

0
likes
140
points
47
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Elite Firebase setup orchestrator for Flutter. Automates Node.js install, multi-account login, project creation, and SHA registration.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, interact

More

Packages that depend on fire_pilot