Setting Up Flags Explorer
The Flags Explorer adds a panel to the Vercel Toolbar that lets you override flag values on preview deployments. Make sure you've set up the toolbar first. This is a one-time setup per project.
The Flags Explorer reads flag metadata from a well-known API route:
import { createFlagsDiscoveryEndpoint, getProviderData } from 'flags/next';
import * as flags from '../../../../flags';
export const GET = createFlagsDiscoveryEndpoint(async () => {
return getProviderData(flags);
});This endpoint uses the FLAGS_SECRET environment variable to authenticate requests. Make sure you've pulled it with vercel env pull.
vercel deployVisit the preview URL. The Flags Explorer panel appears in the Vercel Toolbar. Toggle any flag to override its value for your session without affecting other users.
See Flags Explorer for the full setup guide, including how to share overrides with teammates via URL.
Was this helpful?