Vercel Flags 允許跨專案評估旗標,無需共享 SDK 金鑰
Evaluate Vercel Flags from another project without sharing SDK keys.
Vercel Flags 允許同一團隊內不同專案之間讀取旗標,無需手動管理 SDK 金鑰。
- 連線功能:在 Connections 頁面可新增/移除專案連結,授予只讀許可權,支援所有環境。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
Project Connections let applications evaluate flags defined in another Vercel project within the same team, without managing SDK keys.


Previously, sharing flags between projects required copying a server SDK key into an environment variable and managing it manually. Connected projects authenticate using their deployment’s identity. For local development, vercel env pull retrieves your project’s OIDC token.
Manage access from the Connections page under your project's Flags section, or with vercel flags connections in the CLI. Connections grant read-only access across all environments. The consumer deployment determines the flag environment (production deployments evaluate production flags).
In the consumer application, create an adapter with the source project’s ID.
flags.ts
import { flag } from 'flags/next';
import { createVercelAdapter } from '@flags-sdk/vercel';
const sharedFlagsAdapter = createVercelAdapter({
projectId: 'prj_source',
});
export const newCheckout = flag<boolean>({
key: 'new-checkout',
defaultValue: false,
adapter: sharedFlagsAdapter(),
});
Evaluate a flag defined in the connected source project.
Access can be revoked without redeploying.
Project Connections are available on all plans and require @flags-sdk/vercel 1.6.0 or later, or @vercel/flags-core 1.11.0 or later when using the core library directly. Managing connections from the CLI requires Vercel CLI 63.0.0 or later.
Learn more in the Vercel Flags documentation