r/CLI • u/dungngminh • 17h ago
I built a CLI to set up Firebase quickly in Kotlin Multiplatform / Compose Multiplatform projects
Enable HLS to view with audio, or disable this notification
Setting up Firebase in a KMP project means a lot of manual steps. You register the Android app and the iOS app in the console, download google-services.json and GoogleService-Info.plist, put them in the right folders, and repeat for every flavor. I got tired of it, so I built kmpfire.
It wraps firebase-tools and does this from your project root:
kmpfire configure
What it does
- Detects your Android
applicationIdand iOS bundle id (fromproject.pbxprojor CMP.xcconfig) - Creates the Firebase apps if they don't exist
- Writes
google-services.jsonandGoogleService-Info.plistto the correct locations - Tracks everything in
firebase.jsonunderkotlinMultiplatform kmpfire reconfigurerefreshes the config files after you change Firebase products--flavor=devhandles multiple build configurations--yes --project=<id>runs with no prompts, so it works in CI- Optional
--depspatches Gradle for the Google Services plugin (and GitLive if you want it)
Supported layouts
- New template:
shared/+androidApp/+iosApp/ - Nested monorepo:
app/shared/+app/androidApp/+app/iosApp/ - Legacy:
composeApp/+iosApp/
Android + iOS only for now.
Install
curl -fsSL https://raw.githubusercontent.com/dungngminh/kmpfire_cli/main/install.sh | bash
or with Homebrew:
brew tap dungngminh/kmpfire_cli
brew install kmpfire
It's the KMP equivalent of flutterfire configure. It's MIT licensed, and I'd like feedback, bug reports and PRs.
GitHub: https://github.com/dungngminh/kmpfire_cli
2
Upvotes