← 返回命令列表

Linux command

firebase 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Login to Firebase

firebase login

Initialize project

firebase init

Deploy all services

firebase deploy

Deploy only hosting

firebase deploy --only hosting

Deploy only functions

firebase deploy --only functions

Start local emulators

firebase emulators:start

List projects

firebase projects:list

说明

firebase is the CLI for Firebase, Google's mobile and web application platform. It manages deployments for Hosting, Cloud Functions, Firestore, Realtime Database, Authentication, and other Firebase services. The CLI handles project initialization, local development with emulators, and deployment workflows. It integrates with Google Cloud and supports multiple environments.

参数

login
Authenticate with Google account.
logout
Sign out.
init
Initialize Firebase project in directory.
deploy
Deploy to Firebase services.
--only _services_
Deploy specific services.
serve
Start local development server.
emulators:start
Start Firebase emulators.
projects:list
List available projects.
use _project_
Switch active project.
functions:log
View Cloud Functions logs.
hosting:disable
Disable hosting for project.

FAQ

What is the firebase command used for?

firebase is the CLI for Firebase, Google's mobile and web application platform. It manages deployments for Hosting, Cloud Functions, Firestore, Realtime Database, Authentication, and other Firebase services. The CLI handles project initialization, local development with emulators, and deployment workflows. It integrates with Google Cloud and supports multiple environments.

How do I run a basic firebase example?

Run `firebase login` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does login do in firebase?

Authenticate with Google account.