firebase-local-env-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFirebase 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. If Node.js is missing or
>= 20, install it based on the operating system:< v20Recommended: Use a Node Version Manager This avoids permission issues when installing global packages.For macOS or Linux:- Guide the user to the official nvm repository.
- Request the user to manually install and reply when finished. Stop and wait for the user's confirmation.
nvm - Make available in the current terminal session by sourcing the appropriate profile:
nvmbash# For Bash source ~/.bash_profile source ~/.bashrc # For Zsh source ~/.zprofile source ~/.zshrc - Install Node.js:
bash
nvm install 24 nvm use 24
For Windows:- Guide the user to download and install nvm-windows.
- Request the user to manually install and Node.js, and reply when finished. Stop and wait for the user's confirmation.
nvm-windows - After the user confirms, verify Node.js is available:
bash
node --version
Alternative: Official Installer- Guide the user to download and install the LTS version from nodejs.org.
- Request the user to manually install Node.js and reply when finished. Stop and wait for the user's confirmation.
-
操作:运行。
node --version -
处理方式:确保Node.js已安装且版本。若Node.js未安装或版本
>= 20,请根据操作系统进行安装:< v20推荐使用Node版本管理器 这可以避免安装全局包时出现权限问题。适用于macOS或Linux:- 引导用户前往nvm官方仓库。
- 要求用户手动安装,完成后回复确认。暂停并等待用户的确认信息。
nvm - 通过加载对应的配置文件,让在当前终端会话中可用:
nvmbash# 适用于Bash source ~/.bash_profile source ~/.bashrc # 适用于Zsh source ~/.zprofile source ~/.zshrc - 安装Node.js:
bash
nvm install 24 nvm use 24
适用于Windows:- 引导用户下载并安装nvm-windows。
- 要求用户手动安装和Node.js,完成后回复确认。暂停并等待用户的确认信息。
nvm-windows - 用户确认后,验证Node.js是否可用:
bash
node --version
替代方案:官方安装包- 引导用户前往nodejs.org下载并安装LTS版本。
- 要求用户手动安装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 instead.
npx -y firebase-tools@latest login --no-localhost
你必须完成身份验证才能管理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相关任务。