Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Firebase CLI

$ firebase Official High Risk
Google · Code & DevOps · MIT · macos / linux / windows

Official CLI for managing Firebase projects, Hosting, Cloud Functions, Firestore indexes/rules, and the local Emulator Suite. Exposes --json and --non-interactive flags for CI and agent workflows, though firebase init remains interactive.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
brew install firebase-cli
CLI vs MCP Decision Hybrid (CLI + MCP)

Use firebase CLI (--json --non-interactive) for emulators, builds, and targeted deploys; firebase-tools also ships an experimental MCP server (firebase mcp) when native tool calls are preferred.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports --json and --non-interactive across core commands, though firebase init is prompt-driven.

  • Global --json and --non-interactive flags available
  • firebase init lacks full non-interactive flag parity
Trust & Safety 18 / 25

Supports GOOGLE_APPLICATION_CREDENTIALS and Hosting preview channels, but production deploy and firestore:delete carry high billing and data-loss risk.

  • Service account auth via GOOGLE_APPLICATION_CREDENTIALS
  • Deploys security rules, functions, and deletions directly when invoked
Setup & Portability 14 / 15

Available via npm, Homebrew, and standalone binaries across macOS, Linux, and Windows.

  • Multiple distribution channels including standalone binary
Utility & Efficiency 14 / 15

Full lifecycle management including local Emulator Suite for safe offline testing.

  • Covers Hosting, Functions, Firestore, Auth, and local emulators
Maintenance & Lineage 10 / 10

Official Google Firebase CLI maintained actively under MIT license.

  • First-party firebase/firebase-tools repository
Docs & Verifiability 8 / 10

Extensive Firebase CLI reference docs and subcommand --help.

  • Official reference at firebase.google.com/docs/cli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Service Account Env API Key Config File
Credential Storage

Stores OAuth tokens in ~/.config/configstore/firebase-tools.json; supports GOOGLE_APPLICATION_CREDENTIALS service-account JSON for headless automation.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

MIT open-source CLI; deployed Firebase resources (Functions, Firestore, Hosting) incur Google Cloud usage charges.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Firebase CLI (firebase) Agent Rules
- Always pass `--non-interactive --json --project <project-id>` on read and deploy commands.
- Never run `firebase deploy` without `--only hosting:channel` or explicit user approval for production functions/rules.
- Never run `firebase firestore:delete` without explicit user confirmation.

Agent-Ready Command Recipes

Safe Read-Only Queries

List accessible Firebase projects as JSON
firebase projects:list --json --non-interactive

Returns project IDs and metadata in JSON without prompting.

List registered Firebase apps
firebase apps:list --project <project-id> --json --non-interactive

Inspects Web, iOS, and Android apps in a project as structured JSON.

Controlled Writes & Previews

Deploy to a temporary Hosting preview channel
firebase hosting:channel:deploy preview-check --project <project-id> --non-interactive --json

Publishes static assets to an isolated preview URL instead of the live Hosting channel.

Strengths for Agents

  • + Consistent --json and --non-interactive flags across project, app, and deploy commands.
  • + Local Emulator Suite allows offline verification of Firestore rules and Functions.
  • + hosting:channel:deploy enables isolated preview deployments.

Caveats & Pitfalls

  • ! firebase init requires interactive prompts and cannot be scripted easily.
  • ! Production deploys and firestore:delete carry significant security-rule and billing risk.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI