Stripe 项目
概览 #
🌐 Overview
Stripe Projects 是 Stripe CLI 中的一个工作流,可以通过一个命令生成真实服务并返回可用凭证。Supabase 已经在目录中可用,所以一个命令就能创建一个 Postgres 数据库以及整个 Supabase(认证、存储、Edge Functions 和实时功能),无需打开控制面板。
Stripe Projects 是为人类和人工智能代理设计的。无论你自己操作还是由代理为你操作,配置步骤都是确定的且可重复的。
🌐 Stripe Projects is designed for both humans and AI agents. The provisioning steps are deterministic and repeatable whether you run them yourself or an agent runs them for you.
Stripe Projects 目前处于开发者预览阶段。如果遇到问题,请在 Discord 上联系,或在 GitHub 上提交问题。
🌐 Stripe Projects is currently a developer preview. If you run into issues, reach out on Discord or open an issue on GitHub.
快速入门 #
🌐 Quickstart
安装 Stripe CLI,然后运行:
stripe plugin install projectsstripe projects init my-appstripe projects add supabase/projectstripe projects env --sync这些命令会在你的账户中创建一个新的 Supabase 项目,并配备一个可以连接的 Postgres 数据库,同时将项目凭据写入本地的 .env 文件。如果你已经有 Supabase 账户,流程会提示你直接关联账户,而不是创建新账户。
🌐 These commands create a new Supabase project in your account with a Postgres database ready to connect and write the project credentials to a local .env file. If you already have a Supabase account, the flow prompts you to link it instead of creating a new one.
直接打开 Supabase 仪表板:
🌐 To open the Supabase dashboard directly:
stripe projects open supabase要轮换你的数据库凭证:
🌐 To rotate your database credentials:
stripe projects rotate supabase/project有关完整的命令参考,请参见 Stripe 的 Stripe Projects 文档。
🌐 For the full command reference, see Stripe's Stripe Projects docs.
正在授权请求 #
🌐 Authorizing the request
当你第一次以这种方式配置项目时,Supabase 会显示一个授权界面,让你在创建任何东西之前确认请求:
🌐 The first time you provision a project this way, Supabase shows an authorization screen so you can confirm the request before anything is created:
- 如果你没有用 Stripe 保存的邮箱登录 Supabase,系统会要求你先登出,然后用那个账号重新登录。
- 如果 Stripe 账户已经关联到 Supabase 组织,你确认这个请求。
- 否则,确认操作会代表你创建一个新的 Supabase 组织。
你的 Supabase 项目和组织的工作方式和你直接创建的完全一样:你可以完全访问仪表板、连接字符串和数据。没有任何内容被代理或白标化。
🌐 Your Supabase project and organization work exactly like ones you create directly: you keep full access to the dashboard, your connection strings, and your data. Nothing is proxied or white-labeled.
限制 #
🌐 Limitations
- Stripe Projects 处于开发者预览阶段,因此行为可能会有所变化。
- 通过将 Stripe 账户上的邮箱与 Supabase 账户匹配来为 Supabase 组织提供链接;CLI 流程中没有选择其他已有组织的选项。
- 要访问通过 Stripe Projects 创建的新组织的 Supabase 仪表板,请使用
open命令(stripe projects open supabase)。如果想直接登录 Supabase 仪表板而不使用 CLI,请按照该账户的重置密码流程操作。