flutterfire
Configure Flutter projects for Firebase
TLDR
Initialize and configure Firebase for your current Flutter app
Specify platforms (iOS, Android, web) to support
Use a specific Firebase project
SYNOPSIS
flutterfire configure|list|doctor [--account|-a] [--project|-P] [--platforms] [--yes|-y] [--debug]
PARAMETERS
configure
Interactively configure Firebase project and generate config files for selected platforms
list
List Firebase projects for the logged-in account
doctor
Diagnose FlutterFire configuration issues
--account, -a <id>
Specify Firebase account ID (requires Firebase CLI)
--project, -P <id>
Firebase project ID to configure (skips selection)
--platforms <list>
Comma-separated platforms: android,ios,web,macos,windows,linux
--yes, -y
Auto-accept all prompts (non-interactive)
--debug
Enable verbose logging for troubleshooting
DESCRIPTION
FlutterFire CLI (flutterfire) is a command-line tool designed to simplify integrating Firebase services into Flutter applications across multiple platforms. It automates key setup tasks, such as discovering available Firebase projects, selecting the appropriate one, generating platform-specific configuration files (e.g., google-services.json for Android, GoogleService-Info.plist for iOS), and updating the project's firebase_options.dart file.
Run from the root directory of a Flutter project, the primary flutterfire configure command interactively guides users through project selection and platform configuration. It supports Android, iOS, Web, macOS, Windows, and Linux platforms, ensuring seamless Firebase authentication, Firestore, Cloud Messaging, and more.
Prerequisites include the Dart SDK (via Flutter), Node.js for Firebase CLI, and authentication via firebase login. The tool reduces manual errors in Firebase setup, making it ideal for developers targeting cross-platform apps. Additional commands like list and doctor aid in project management and diagnostics.
CAVEATS
Must run from Flutter project root; requires Firebase CLI (npm install -g firebase-tools) and firebase login; Linux platform support generates firebase_options.dart only.
INSTALLATION
dart pub global activate flutterfire_cli
Ensure PATH includes ~/.pub-cache/bin.
PREREQUISITES
Flutter SDK ≥2.0, Firebase CLI ≥10.0, Google account with Firebase access.
HISTORY
Released in 2021 by the FlutterFire team to replace manual Firebase config; evolved with Flutter 2.x+ for better multi-platform support; latest versions align with Firebase SDK updates.


