The Firebase CLI is Google's tool for managing and deploying Firebase projects.
Install it with npm, sign in with firebase login, and five commands take you from a clean machine to a confirmed working setup, ready to wire into whatever Activepieces or other automation you run later.
Firebase CLI installation and login by platform
- Check that Node is version 20, 22 or 24 with
node --version. - Run
npm install -g firebase-tools. - Run
firebase loginand approve access in the browser. - Run
firebase projects:listto confirm the login reached your account. - Run
firebase --versionand note the number, because CI will need to match it.
These figures were checked on 2026-12-06.
Install with npm, the binary or the install script
Most first installs go wrong on an unsupported Node version, which is why step 1 comes before the install. The npm route itself is the same on macOS, Linux and Windows.
You can skip Node on the machine with the standalone binaries. According to Firebase, they're published on the GitHub release page for v15.34.2.
Per GitHub, the binaries are large: 255.4 MB on macOS, 253.1 MB on Linux and 241.4 MB on Windows.
That's roughly a quarter of a gigabyte per download, so on a CI runner you should cache it or bake it into the image.
On macOS and Linux, Firebase also publishes an install script, run as curl -sL https://firebase.tools | bash. It's the shortest path on a fresh laptop, but it pipes a remote script into your shell, so read it first on a machine you care about.

Sign in with firebase login
On a laptop, you run firebase login, approve the Google account in the browser, and the CLI stores the credential locally. That works, but it fails on a server with no browser and is the wrong model for unattended jobs.

If you later run deploys from Activepieces, or from plain CI, you need non-interactive credentials, which get their own section.
Run firebase projects:list and it prints every project your account can see. A table means the login is valid and the network path to Google works. An empty result or an auth error means you approved the wrong account, so run firebase login again.
This takes minutes, not a project: automate it in Activepieces free.
Firebase CLI access, pricing and limits by plan
You sign in as a Google user or a service account, and billing comes from the plan on the project you deploy to.
The Firebase CLI has no API key and no per-unit price of its own. Which project a command targets also decides what it costs.
Auth: user login or service account
On a laptop, firebase login opens a browser, and the CLI acts as your Google account with whatever roles you hold on each project.
That's fine for you and wrong for a pipeline, because the pipeline then runs with your permissions and breaks when you leave the team.
For CI, point GOOGLE_APPLICATION_CREDENTIALS at a service account key file. The CLI picks it up with no login step, and you grant that account only the roles the deploy needs.
The older firebase login:ci token and the --token flag still turn up in tutorials, but they're the legacy route. Don't build anything new on them.
Firebase CLI deploys on Spark versus Blaze plans
Spark is the free plan and Blaze is pay-as-you-go. The CLI is identical on both; what changes is which deploy targets the project will accept.
Functions is the dividing line, and Hosting is the same on both. If your project needs Functions, you need a billing account before the first deploy.
Spark doesn't allow Functions deploys, needs no billing and has no free invocations.
Blaze allows Functions deploys and needs billing. It includes 2M invocations a month free, charges $0.40 per million beyond that, and allows 1,000 functions per region, so you incur charges when monthly invocations exceed 2M.
The largest Hosting file is 2 GB on both plans, meaning plan choice doesn't affect your maximum file size.
On Spark, a Functions deploy fails with a message that the project must be on the Blaze plan. Upgrading is the fix; no flag will bypass it.
Because the overage is cheap per call, a runaway loop shows up as a bill, not an outage. Set a budget alert on the billing account when you upgrade.
Because the overage is cheap per call, a runaway loop shows up as a bill, not an outage.
A Hosting file over the size cap fails the release, so check build output for large assets before the pipeline does.
Deploy and API quotas before production
Deploys also draw on Google Cloud API quotas, which sit outside the plan limits. A busy CI setup with parallel jobs deploying many functions at once can hit rate limits and fail with a 429 or quota-exceeded error.

The fix is design, not retries: serialize deploys per project, and deploy only the targets that changed with --only.
Ten Firebase CLI commands with working examples
Skip firebase use and you get Error: No currently active project. or, worse, a deploy to the wrong project. Ten commands cover most daily work, and firebase use decides where every other one lands, so learn the alias first.
Setup: init, login, use
firebase login
firebase init
firebase projects:list
firebase use --add
firebase use staging
login opens a browser for OAuth. init asks which products you want. It writes firebase.json and .firebaserc. projects:list shows the project IDs your account can reach. use --add binds one of them to an alias, and use staging switches the active alias.
For CI there's no browser, so use Application Default Credentials; firebase login:ci still prints a token you can store as FIREBASE_TOKEN, but it is deprecated. Treat that token as a credential that can deploy to every project you can reach.

Firebase CLI deploy --only and preview channels
firebase deploy --only hosting
firebase deploy --only functions:myFunction
firebase hosting:channel:deploy pr-42
A bare firebase deploy ships everything in firebase.json, including functions and rules you may not have meant to touch.
--only narrows the target, so use it by default. hosting:channel:deploy publishes to a temporary preview URL instead of your live site, which makes it the right command for pull request checks.
firebase emulators:start
firebase functions:log
firebase functions:log --only myFunction
You can test without writing to production data, because emulators:start runs the products enabled in your config on your machine.
functions:log reads deployed function output, and --only filters it to one function.
Config: firebase.JSON and .firebaserc
firebase.json describes what to deploy: hosting public directory, rewrites, functions source, emulator ports. .firebaserc maps aliases to project IDs:
{
"projects": {
"default": "my-app-dev",
"staging": "my-app-staging",
"production": "my-app-prod"
}
}
Commit both files.
Environment variables sit on top of this: FIREBASE_TOKEN supplies CI credentials, and GOOGLE_APPLICATION_CREDENTIALS can point the CLI at a service account key file. Keep both in your CI secret store, never in the repository.
You can follow the rest of this with the builder open. Start free, no card.
Common Firebase CLI errors in production and fixes
In production, most Firebase CLI failures fall into three groups. Either the credential is wrong, the plan or quota is exhausted, or the machine running the CLI doesn't match the project.
The table below lists the seven errors that show up most often. Messages are paraphrased from memory of what the CLI prints, so check the wording against the current Firebase docs before you grep logs for it.
| Error | Typical message | Cause | Fix |
|---|---|---|---|
| Expired auth | "Authentication Error: Your credentials are no longer valid" | The login or token was revoked or has lapsed | Run firebase login --reauth locally; in CI, replace the stored credential |
| Project not found | "Failed to get Firebase project" or "project not found" | Wrong project ID, a stale alias, or an account without access | Run firebase projects:list, then fix the alias with firebase use |
| IAM permission denied | "HTTP Error: 403, The caller does not have permission" | The account or service account lacks a role for that product | Grant the role the failing deploy needs in IAM, then retry |
| Blaze required | "Your project must be on the Blaze (pay-as-you-go) plan" | Functions or another service needs billing enabled | Upgrade the project plan in the console |
| Node mismatch | "Functions require Node.js version…" or an engines warning | Local or CI Node differs from the runtime in package.json |
Align the engines field and the runner's Node version |
| 429 quota | "HTTP Error: 429, Quota exceeded" | Too many API calls or deploys in a short window | Back off and retry, and cut redundant deploys |
| Old CLI version | Odd failures on newer features or unknown flags | A pinned or cached CLI that predates the feature | Upgrade with npm install -g firebase-tools |
Firebase CLI authentication and permission errors
With expired auth, project not found and IAM denied, the CLI reached Firebase and was refused. Expired auth is a credential problem.
Project not found is usually an alias pointing at a project the signed-in account can't see, so confirm which account the CI job is using before you edit .firebaserc.
With IAM denied, the identity is valid but under-privileged. Grant the narrowest role that covers the failing deploy, not project owner.
Firebase CLI plan, quota and rate-limit errors
No flag works around Blaze required; it is a billing gate, not a bug. A 429 is different: it's transient. Retry with exponential backoff and a little jitter, and stop after a fixed number of attempts so a stuck pipeline fails loudly instead of looping.
When your laptop and the runner drift apart, you get Node mismatch and old CLI versions.
Pin the Node version in CI, pin the firebase-tools version you tested against, and upgrade on purpose. An unpinned latest makes a green pipeline fail on a day nobody touched the code.

Firebase CLI execution in CI and scheduled jobs
Run it in GitHub Actions with a service account key and a pinned firebase-tools version. An unattended run without them dies with Error: Failed to authenticate, have you run firebase login?. You're not the audience for a login prompt at 3am.
The pattern is well trodden. Firebase's weekly npm downloads put firebase-tools at 5,177,365, ahead of vercel at 4,007,304 and roughly twelve times netlify-cli at 437,632, so most CI problems you hit already have answers.
At 50,992,990 weekly downloads Wrangler sits far ahead, and aws-cdk is at 7,287,253, which means Firebase is mid-pack: popular enough to be documented, not so dominant that every runner image ships it.
The steps below run in this order, and each one removes a prompt or a guess that would otherwise stall the job.
- Create a service account in Google Cloud and give it the narrowest role that covers what you deploy, such as Firebase Hosting Admin for a hosting-only site. A leaked key then can't touch your database.
- Store the JSON key as a GitHub Actions secret. In the job, write it to a file and point
GOOGLE_APPLICATION_CREDENTIALSat that path. - Install with an exact version,
npm install -g firebase-tools@followed by the version you tested, so a new release can't change behavior mid-week. - Run
firebase deploy --only hosting --non-interactive --projectwith your project alias. Without--only, you ship every target infirebase.json. - Add a final step with
if: always()that posts the result to Slack.
Keep --non-interactive on, so a missing credential or confirmation fails the job with a non-zero exit instead of hanging until the runner times out.
Where Activepieces fits around a deploy
For the Slack post, Activepieces takes the message out of your YAML. Have the workflow's last step call a webhook trigger, then let the flow format the message and post it to the right channel, so the notification logic lives outside your YAML.
Moving it out of the YAML doesn't take it out of review: Activepieces' documentation covers Git Sync, which puts flows in git, and Release Management, which promotes them from a test environment to production, so a change to the Slack message is versioned and reviewed like any other change.
Both come in the same product on cloud or self-hosted, and MoneyGram, Moneypenny, Alan and FundingSocieties run it in production. The firebase CLI still does the deploying; the flow only reports on it.
The second use is for AI coding agents. Activepieces serves its integrations as MCP tools, cloud or self-hosted, at activepieces.com/mcp, which gives an agent your team's apps as tools.
MCP doesn't make the agent a safe deployer, though. Keep the deploy itself in CI with the scoped service account, and let the agent open the pull request.
Frequently asked questions
These are the questions that come up once the deploy runs in CI, answered against the Firebase docs as checked on 2026-12-06.
Cost and updates
Is the Firebase CLI free to use? Yes, the CLI itself costs nothing to install or run. What you pay for is the project it talks to.
The no-cost Spark plan covers basic use, and anything that needs the pay-as-you-go Blaze plan, such as deploying Cloud Functions, fails at deploy time on a Spark project. Check the plan before you debug the error.
How do I update the Firebase CLI? Re-run whatever installed it. For an npm install, npm install -g firebase-tools@latest; for the standalone binary, run the install script again. Confirm with firebase --version.

In CI, pin a version instead of using latest, so a release you didn't choose can't change your deploy.
Projects and headless use
How do I switch between Firebase projects? Run firebase use <alias> to change the active project, or firebase use --add to create an alias in .firebaserc.
For one-off commands and CI, pass --project <id> explicitly so a stale local selection can't send a deploy to production.
Can I use the Firebase CLI on a server without a browser? Yes. firebase login --no-localhost handles a headless interactive login. For unattended jobs, use a service account through GOOGLE_APPLICATION_CREDENTIALS.
firebase login:ci still produces a token for FIREBASE_TOKEN. The service account is the better default because you can scope its permissions and revoke it without touching anyone's personal login.
Does the Firebase CLI have an MCP server for AI agents?
Yes. firebase mcp starts one from firebase-tools, so an agent can call Firebase operations as tools. It inherits the CLI's login and the project directory it runs in, which means it doesn't solve CI auth for you.
Give it the same scoped credentials you would give a deploy job, and keep the production deploy in CI.
Three questions are still unsettled or undocumented, and a one-line answer is all the evidence supports:
- Do
login:citokens expire? The docs say no, but issue 10169 reports otherwise, so keep a rotation path rather than assuming a token lasts forever. - Is there a published Hosting deploy rate limit? No, so you can't plan around a documented ceiling and should treat a throttled deploy as something to retry, not predict.
- Which Node versions are supported? It changes by release, so read the engines field of the
firebase-toolsversion you pin, and match your CI image to it.
Related reading
Build it
Set this up in minutes.
No code required. Connect your accounts, and Activepieces runs it from there.
Start free Talk to sales


