| name | firebase-cli |
| description | Use the Firebase CLI to manage hosting, Cloud Functions, Firestore, Authentication, and deploy Firebase projects. Use this instead of the Firebase MCP server. |
Firebase CLI
Official CLI for Firebase. Manage hosting, functions, Firestore, auth, and storage.
Authentication
firebase login
firebase login --no-localhost
firebase projects:list
firebase use PROJECT_ID
Common Commands
Project Setup
firebase init
firebase init hosting functions firestore
firebase projects:list
firebase use --add
Hosting
firebase deploy --only hosting
firebase hosting:channel:deploy preview
firebase hosting:channel:list
firebase hosting:disable
Cloud Functions
firebase deploy --only functions
firebase deploy --only functions:myFunction
firebase functions:log
firebase functions:shell
firebase emulators:start --only functions
Firestore
firebase firestore:indexes
firebase firestore:delete --all-collections
firebase emulators:start --only firestore
Emulators
firebase emulators:start
firebase emulators:start --only auth,firestore
firebase emulators:export ./backup
firebase emulators:start --import=./backup
Extensions
firebase ext:install firebase/firestore-send-email
firebase ext:list
Agent Best Practices
- Use
firebase emulators:start for local development and testing
- Deploy specific features with
--only to avoid unintended changes
- Use
firebase deploy --only hosting for frontend-only deploys
- Check
firebase use to confirm active project before deploying
- Use preview channels for testing:
firebase hosting:channel:deploy staging
- Export/import emulator data to preserve test state
Example Workflows
Deploy full project
firebase deploy
Start local dev environment
firebase emulators:start --import=./emulator-data --export-on-exit=./emulator-data