Thuta Learning
AdvancedDevOps & Toolsintermediate

Installing the Firebase CLI

Relax. We'll talk through this in plain words — no textbook voice.

Installing the Firebase CLI

To deploy to Firebase Hosting, you need to install the Firebase CLI on your computer. Node.js needs to be installed first.

Code Example

javascript
npm install -g firebase-tools
firebase login
firebase init hosting

What do these commands do?

  • npm install -g firebase-tools — installs the Firebase CLI globally
  • firebase login — logs in with your Google/Firebase account
  • firebase init hosting — starts the hosting config inside your project

Common mistake

Pick the wrong build output folder and you'll deploy a blank page. For a Vite project, it's usually dist; for a plain HTML site, it's usually public.