SkillOpen
firebase-cli
Use the Firebase CLI to manage hosting, Cloud Functions, Firestore, Authentication, and deploy Firebase projects. Use this instead of the Firebase MCP server.
Front matter
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.
- Official repo: https://github.com/firebase/firebase-tools
- Docs: https://firebase.google.com/docs/cli
Authentication
firebase login # Browser-based login
firebase login --no-localhost # For remote/headless environments
firebase projects:list # List available projects
firebase use PROJECT_ID # Select active projectCommon Commands
Project Setup
firebase init # Interactive project setup
firebase init hosting functions firestore # Init specific features
firebase projects:list
firebase use --add # Add project aliasHosting
firebase deploy --only hosting # Deploy hosting
firebase hosting:channel:deploy preview # Preview channel
firebase hosting:channel:list
firebase hosting:disable # Take site offlineCloud Functions
firebase deploy --only functions # Deploy all functions
firebase deploy --only functions:myFunction # Deploy specific function
firebase functions:log # View function logs
firebase functions:shell # Interactive function testing
firebase emulators:start --only functions # Local emulatorFirestore
firebase firestore:indexes # List indexes
firebase firestore:delete --all-collections # Delete all data (careful!)
firebase emulators:start --only firestore # Local emulatorEmulators
firebase emulators:start # Start all emulators
firebase emulators:start --only auth,firestore # Specific emulators
firebase emulators:export ./backup # Export emulator data
firebase emulators:start --import=./backup # Import on startExtensions
firebase ext:install firebase/firestore-send-email
firebase ext:listAgent Best Practices
- Use
firebase emulators:startfor local development and testing - Deploy specific features with
--onlyto avoid unintended changes - Use
firebase deploy --only hostingfor frontend-only deploys - Check
firebase useto 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 deployStart local dev environment
firebase emulators:start --import=./emulator-data --export-on-exit=./emulator-dataSource: written by One Giant Leap.
Related entries
There are more like this in the members library
The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.