firebase-basics

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Firebase Basics

Firebase 基础

CRITICAL Mandatory prerequisites

重要提示 必备前提条件

Before attempting to fulfill any user request regarding Firebase, you MUST follow these steps in order. Do not proceed to implementation until these are completed. Failure to follow these instructions may result in using outdated patterns and lack of access to essential reference materials.
  1. Leverage the planning phase
    If you use a planning mode (e.g., maintaining a
    task.md
    file), you MUST include a task to check and install
    firebase/agent-skills
    as your very first item.
  2. Ensure NPM is installed.
    bash
    ## Check if NPM is installed
    npm --version
    If NPM is not installed, guide the user to download and install the LTS version from https://nodejs.org/en/download.
    Then, request the user to manually install Node.js and to reply with a confirmation that the installation is finished. Stop and wait for the user's confirmation.
  3. Verify and install Agent Skills for Firebase
    You MUST ensure the full set of skills is installed to avoid using outdated patterns. Run this command:
    bash
    npx -y skills add firebase/agent-skills -y
    If the skills are already installed, this command will ensure they are up to date. Do not skip this step.
在尝试处理任何与Firebase相关的用户请求之前,你必须按顺序完成以下步骤。在完成这些步骤之前,不要进行实现工作。不遵循这些说明可能会导致使用过时的模式,并且无法获取必要的参考资料。
  1. 利用规划阶段
    如果你使用规划模式(例如维护
    task.md
    文件),你必须将检查并安装
    firebase/agent-skills
    作为第一项任务。
  2. 确保NPM已安装。
    bash
    ## 检查NPM是否已安装
    npm --version
    如果未安装NPM,请引导用户从https://nodejs.org/en/download下载并安装LTS版本。
    然后,请用户手动安装Node.js,并回复确认安装完成。停止操作并等待用户的确认。
  3. 验证并安装Firebase Agent Skills
    必须确保安装完整的技能集,以避免使用过时的模式。运行以下命令:
    bash
    npx -y skills add firebase/agent-skills -y
    如果技能已安装,此命令将确保它们是最新版本。请勿跳过此步骤。

Quick start

快速开始

After completing the mandatory prerequisites above, proceed with these steps to set up your environment:
  1. Log in to the Firebase CLI.
    Run this command:
    bash
    npx -y firebase-tools@latest login
    Then, ask the user to complete the login flow in the browser.
  2. Set an active project for the CLI.
    Most Firebase tasks require an active project context. Check the current project for the Firebase CLI by running this command:
    bash
    npx -y firebase-tools@latest use
    • If the command outputs
      Active Project: <PROJECT_ID>
      , you can proceed with your task.
    • If the command does not output an active project, ask the user if they have an existing Firebase project ID.
      • If yes: Set the ID as the active project and add a default alias by running:
        bash
        npx -y firebase-tools@latest use --add <PROJECT_ID>
      • If no: Create a new Firebase project by running:
        bash
        npx -y firebase-tools@latest projects:create <PROJECT_ID> --display-name <DISPLAY_NAME>
完成上述必备前提条件后,按照以下步骤设置你的环境:
  1. 登录Firebase CLI。
    运行以下命令:
    bash
    npx -y firebase-tools@latest login
    然后,请用户在浏览器中完成登录流程。
  2. 为CLI设置活跃项目。
    大多数Firebase任务需要活跃的项目上下文。通过运行以下命令检查Firebase CLI的当前项目:
    bash
    npx -y firebase-tools@latest use
    • 如果命令输出
      Active Project: <PROJECT_ID>
      ,你可以继续执行任务。
    • 如果命令输出活跃项目,请询问用户是否已有Firebase项目ID。
      • 如果有:通过运行以下命令将该ID设置为活跃项目并添加默认别名:
        bash
        npx -y firebase-tools@latest use --add <PROJECT_ID>
      • 如果没有:通过运行以下命令创建一个新的Firebase项目:
        bash
        npx -y firebase-tools@latest projects:create <PROJECT_ID> --display-name <DISPLAY_NAME>

Reference directory

参考目录

  • Firebase core concepts
  • Firebase CLI usage
  • Firebase client library usage
  • Firebase CLI and MCP server
  • Firebase IaC usage
  • Firebase security-related features
  • Additional Published Skills
If you need product information that's not found in these references, check the other skills for Firebase that you have installed, or use the
search_documents
tool of the Developer Knowledge MCP server.
  • Firebase核心概念
  • Firebase CLI使用方法
  • Firebase客户端库使用方法
  • Firebase CLI与MCP服务器
  • Firebase基础设施即代码(IaC)使用方法
  • Firebase安全相关功能
  • 其他已发布技能
如果你需要这些参考资料中没有的产品信息,请查看你已安装的其他Firebase技能,或使用开发者知识MCP服务器的
search_documents
工具。