First Time Installation
Once you have Node.js and npm installed, you can install the Firebase command line tools via npm:
$ npm install -g firebase-tools # or use sudo (with caution) if required by your system permissions # sudo npm install -g firebase-tools
This installs the globally available
Updating Previously Installed Firebase Tools
If you have a previously installed version of Firebase command line tools, you can easily update them to the latest version:
$ npm update -g firebase-tools # or use sudo (with caution) if required by your system permissions # sudo npm update -g firebase-tools
Initializing an Application
firebase init - Run this command in your project directory to initialize it for
Firebase Hosting. Initializing a project will create a
containing the configuration information needed for Hosting.
firebase deploy - Deploys the current project (both assets and Security Rules) to Firebase Hosting and creates
your subdomain on
firebaseapp.com if it doesn't already exist.
Specifying the optional command line parameter
allow you to include an optional version message, for example
firebase deploy -m
For extra granularity you can specify
firebase deploy:hosting to deploy only your site's static assets or
firebase deploy:rules to deploy only Security Rules.
Removing a Site
firebase disable:hosting - Removes Firebase Hosting from a specific Firebase and
displays a "Site Not Found" page as if the site had never been deployed to.
firebase login - Account login for the command line tool. Logging in will
automatically open a browser for you to authenticate.
firebase logout - Logs the command line tool out of Firebase.
firebase list - Lists the Firebase apps available to the currently logged in user.
firebase --non-interactive - Run in non-interactive mode for use in CI and headless environments. Will provide non-zero exit code on error instead of prompting for user response.
firebase --version - Displays the current version of the command line tool. Can
also be written as
firebase --help - Shows a help screen. Can also be written as
firebase <command> --help - Shows detailed help for a specific command.