firebase-local-env-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Firebase Local Environment Setup

Firebase本地环境配置

This skill documents the bare minimum setup required for a full Firebase experience for the agent. Before starting to use any Firebase features, you MUST verify that each of the following steps has been completed.
本技能文档记录了让Agent完整使用Firebase所需的最小化配置步骤。在开始使用任何Firebase功能前,你必须确认以下每一步都已完成。

1. Verify Node.js

1. 验证Node.js

  • Action: Run
    node --version
    .
  • Handling: Ensure Node.js is installed and the version is
    >= 20
    . If Node.js is missing or
    < v20
    , install it based on the operating system:
    Recommended: Use a Node Version Manager This avoids permission issues when installing global packages.
    For macOS or Linux:
    1. Guide the user to the official nvm repository.
    2. Request the user to manually install
      nvm
      and reply when finished. Stop and wait for the user's confirmation.
    3. Make
      nvm
      available in the current terminal session by sourcing the appropriate profile:
      bash
      # For Bash
      source ~/.bash_profile
      source ~/.bashrc
      
      # For Zsh
      source ~/.zprofile
      source ~/.zshrc
    4. Install Node.js:
      bash
      nvm install 24
      nvm use 24
    For Windows:
    1. Guide the user to download and install nvm-windows.
    2. Request the user to manually install
      nvm-windows
      and Node.js, and reply when finished. Stop and wait for the user's confirmation.
    3. After the user confirms, verify Node.js is available:
      bash
      node --version
    Alternative: Official Installer
    1. Guide the user to download and install the LTS version from nodejs.org.
    2. Request the user to manually install Node.js and reply when finished. Stop and wait for the user's confirmation.
  • 操作:运行
    node --version
  • 处理方式:确保Node.js已安装且版本
    >= 20
    。若Node.js未安装或版本
    < v20
    ,请根据操作系统进行安装:
    推荐使用Node版本管理器 这可以避免安装全局包时出现权限问题。
    适用于macOS或Linux:
    1. 引导用户前往nvm官方仓库
    2. 要求用户手动安装
      nvm
      ,完成后回复确认。暂停并等待用户的确认信息。
    3. 通过加载对应的配置文件,让
      nvm
      在当前终端会话中可用:
      bash
      # 适用于Bash
      source ~/.bash_profile
      source ~/.bashrc
      
      # 适用于Zsh
      source ~/.zprofile
      source ~/.zshrc
    4. 安装Node.js:
      bash
      nvm install 24
      nvm use 24
    适用于Windows:
    1. 引导用户下载并安装nvm-windows
    2. 要求用户手动安装
      nvm-windows
      和Node.js,完成后回复确认。暂停并等待用户的确认信息。
    3. 用户确认后,验证Node.js是否可用:
      bash
      node --version
    替代方案:官方安装包
    1. 引导用户前往nodejs.org下载并安装LTS版本。
    2. 要求用户手动安装Node.js,完成后回复确认。暂停并等待用户的确认信息。

2. Verify Firebase CLI

2. 验证Firebase CLI

The Firebase CLI is the primary tool for interacting with Firebase services.
  • Action: Run
    npx -y firebase-tools@latest --version
    .
  • Handling: Ensure this command runs successfully and outputs a version number.
Firebase CLI是与Firebase服务交互的主要工具。
  • 操作:运行
    npx -y firebase-tools@latest --version
  • 处理方式:确保该命令能成功运行并输出版本号。

3. Verify Firebase Authentication

3. 验证Firebase身份验证

You must be authenticated to manage Firebase projects.
  • Action: Run
    npx -y firebase-tools@latest login
    .
  • Handling: If the environment is remote or restricted (no browser access), run
    npx -y firebase-tools@latest login --no-localhost
    instead.
你必须完成身份验证才能管理Firebase项目。
  • 操作:运行
    npx -y firebase-tools@latest login
  • 处理方式:若环境为远程或受限制(无浏览器访问权限),请改为运行
    npx -y firebase-tools@latest login --no-localhost

4. Install Agent Skills and MCP Server

4. 安装Agent技能与MCP服务器

To fully manage Firebase, the agent needs specific skills and the Firebase MCP server installed. Identify the agent environment you are currently running in and follow the corresponding setup document strictly.
Read the setup document for your current agent:
  • Gemini CLI: Review references/gemini_cli.md
  • Antigravity: Review references/antigravity.md
  • Claude Code: Review references/claude_code.md
  • Cursor: Review references/cursor.md
  • GitHub Copilot: Review references/github_copilot.md
  • Other Agents (Windsurf, Cline, etc.): Review references/other_agents.md

CRITICAL AGENT RULE: Do NOT proceed with any other Firebase tasks until EVERY step above has been successfully verified and completed.
要完整管理Firebase,Agent需要安装特定技能和Firebase MCP服务器。请确认当前运行的Agent环境,并严格遵循对应的配置文档。
查看当前Agent的配置文档:
  • Gemini CLI:参考references/gemini_cli.md
  • Antigravity:参考references/antigravity.md
  • Claude Code:参考references/claude_code.md
  • Cursor:参考references/cursor.md
  • GitHub Copilot:参考references/github_copilot.md
  • 其他Agent(Windsurf、Cline等):参考references/other_agents.md

AGENT重要规则: 在上述所有步骤均已成功验证并完成前,请勿进行任何其他Firebase相关任务。