新增「在 Firebase Studio 中開啟」按鈕
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
有了 Firebase Studio,新手就能簡化設定開發環境的步驟,並快速投入工作。
例如:
如果您與其他貢獻者一起進行團隊作業,可以為專案精確自訂環境,然後將 .idx/dev.nix
檔案提交至專案的 Git 存放區。這樣一來,當團隊成員在 Firebase Studio 中匯入你的 Git 存放區時,他們的新工作區就會與你的工作區完全相同,包括相同的系統套件、IDE 擴充功能、啟動指令碼等。
如果您建構架構或程式庫供他人使用,可以在範例程式碼存放區中加入 .idx/dev.nix
檔案,這樣使用者將範例匯入 Firebase Studio 時,就能略過環境設定,直接試用您的架構。您甚至可以建立自己的自訂範本,做為使用者可自訂的起點。
完成環境自訂作業後,您可以在專案的 README.md
檔案等文件中加入「在 Firebase Studio 中開啟」按鈕,讓其他人更輕鬆地將專案匯入 Firebase Studio。
常見的「在 Firebase Studio 中開啟」進入點
「在『Firebase Studio』中開啟」按鈕可使用下列幾種網址模式:
如要連結至匯入 Git 存放區流程,並預先填入 Git 存放區網址,請使用下列網址模式:
https://studio.firebase.google.com/import?url=https://github.com/my-org/my-repo
目前僅支援 GitHub 存放區 (包括私人和公開存放區)。
如要連結至預先定義的工作區範本,請在 Firebase Studio 的「範本」頁面中找到所需範本,然後複製其網址。網址應符合下列模式:
https://studio.firebase.google.com/new/gemini
如要連結至預先填入範本 GitHub 網址的自訂範本,請使用下列網址模式:
https://studio.firebase.google.com/new?template=https://github.com/my-org/my-template
如要開啟 App Prototyping agent 並預先填入提示,請使用下列網址模式:
https://studio.firebase.google.com/?prototypePrompt=Create an app that transforms sketches into a high-quality photograph with Gemini
新增「在『Firebase Studio』中開啟」按鈕
安裝「Open in Firebase Studio SDK」,或使用這項工具產生 Firebase Studio 按鈕的 HTML:
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["With Firebase Studio, you can simplify the steps for someone new to\nyour codebase to set up their development environment and get productive.\n\nFor example:\n\n- If you're **working on a team with other contributors** , you can\n [customize your environment](/docs/studio/customize-workspace)\n precisely for your project and then commit your `.idx/dev.nix` file to\n your project's Git repository. That way, when a teammate imports your\n Git repository in Firebase Studio, their new workspace will have\n the exact same configuration as yours, complete with the same system\n packages, IDE extensions, starter scripts, and more.\n\n- If you're **building a framework or library** for others to use, you\n can include a `.idx/dev.nix` file in your sample code repositories, so\n that when a user imports your samples into Firebase Studio, they\n can skip the environment setup and jump straight into trying out your\n framework. You can even [build your own, custom\n template](/docs/studio/custom-templates) as an opinionated,\n customizable starting point for your users.\n\nAfter you're happy with your environment customizations, you can make it\neven easier for others to import your project into Firebase Studio by\nadding an \"Open in Firebase Studio\" button to your documentation, such\nas your project's `README.md` file.\n\nCommon \"Open in Firebase Studio\" entry points\n\nThere are several URL patterns available for an \"Open in\nFirebase Studio\" button:\n\n- To link to the **import a Git repository** flow, prefilled with your Git\n repository URL, use this URL pattern:\n\n https://studio.firebase.google.com/import?url=https://github.com/my-org/my-repo\n\n At this time, only GitHub repositories are supported (both private and\n public).\n- To link to a **predefined workspace template** , find the template\n you're looking for in the\n [Templates](https://studio.firebase.google.com/templates) page in\n Firebase Studio, and copy its URL, which should follow this URL pattern:\n\n https://studio.firebase.google.com/new/gemini\n\n- To link to a **custom template**, prefilled with your template's GitHub URL,\n use this URL pattern:\n\n https://studio.firebase.google.com/new?template=https://github.com/my-org/my-template\n\n- To open the App Prototyping agent with a pre-filled prompt, use this URL\n pattern:\n\n https://studio.firebase.google.com/?prototypePrompt=Create an app that transforms sketches into a high-quality photograph with Gemini\n\nAdd an \"Open in Firebase Studio\" button\n\nInstall the [Open in Firebase Studio\nSDK](https://www.npmjs.com/package/@firebase-studio/open-sdk) or\nuse this tool to generate the HTML for a Firebase Studio button:"]]