The Firebase CLI is a tool that helps you manage and deploy your Firebase projects from the command line, making it easier to work with Firebase services like hosting, functions, and databases.
Click to reveal answer
beginner
How do you install the Firebase CLI?
You install the Firebase CLI by running npm install -g firebase-tools in your terminal. This installs the CLI globally so you can use it anywhere on your computer.
Click to reveal answer
beginner
What command do you use to log in to Firebase using the CLI?
Use the command firebase login to sign in to your Firebase account through the CLI. This connects your local setup to your Firebase projects.
Click to reveal answer
beginner
What does the command firebase init do?
The firebase init command sets up Firebase features in your project folder. It helps you choose which Firebase services to use and creates necessary config files.
Click to reveal answer
beginner
Why is it important to run firebase logout when done?
Running firebase logout signs you out of the Firebase CLI, which helps keep your account secure, especially on shared or public computers.
Click to reveal answer
Which command installs the Firebase CLI globally?
Afirebase setup
Bfirebase install
Cnpm install -g firebase-tools
Dnpm firebase install
✗ Incorrect
The correct command is npm install -g firebase-tools to install the Firebase CLI globally.
What is the first step after installing Firebase CLI to connect it to your account?
Afirebase init
Bfirebase deploy
Cfirebase start
Dfirebase login
✗ Incorrect
You must run firebase login to sign in and connect the CLI to your Firebase account.
Which command helps you set up Firebase features in your project folder?
Afirebase init
Bfirebase deploy
Cfirebase start
Dfirebase config
✗ Incorrect
firebase init initializes Firebase services in your project folder.
Why should you run firebase logout after finishing work?
ATo secure your account on shared computers
BTo clear project files
CTo update Firebase CLI
DTo delete your Firebase project
✗ Incorrect
Logging out helps keep your Firebase account secure, especially on shared or public machines.
Which of these is NOT a Firebase CLI command?
Afirebase login
Bfirebase install
Cfirebase deploy
Dfirebase init
✗ Incorrect
firebase install is not a valid Firebase CLI command.
Explain the steps to set up Firebase CLI from installation to initializing a project.
Think about commands you run in order to start using Firebase CLI.
You got /3 concepts.
Why is it important to log out from Firebase CLI after your work session?
Consider what happens if someone else uses your computer.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of the Firebase CLI tool?
easy
A. To create Firebase projects online automatically
B. To write Firebase database rules only
C. To manage Firebase projects from your computer
D. To replace the Firebase console website
Solution
Step 1: Understand Firebase CLI role
The Firebase CLI is a command-line tool that lets you control Firebase projects locally on your computer.
Step 2: Compare options
Options B, C, and D describe limited or incorrect roles. Only To manage Firebase projects from your computer correctly states the main purpose.
Final Answer:
To manage Firebase projects from your computer -> Option C
Quick Check:
Firebase CLI = Manage projects locally [OK]
Hint: Firebase CLI controls projects from your PC, not just online [OK]
Common Mistakes:
Thinking Firebase CLI only edits database rules
Believing it creates projects automatically online
Confusing it with the Firebase web console
2. Which command correctly installs the Firebase CLI using npm?
easy
A. install firebase-cli -npm
B. npm install -g firebase-tools
C. npm firebase install -g
D. firebase install npm-tools
Solution
Step 1: Recall npm install syntax
The correct npm command to install a global package is 'npm install -g package-name'.
Step 2: Match with Firebase CLI package
The Firebase CLI package name is 'firebase-tools', so the correct command is 'npm install -g firebase-tools'.