Skip to content
'; user_status_content.firstChild.appendChild(avatarContainer); } else { // Placeholder for LoggedOutUserMenu let loggedOutContainer = document.createElement('div'); // if LoggedOutUserMenu fallback let userBtn = document.createElement('button'); userBtn.style.width = "33px"; userBtn.style.height = "33px"; userBtn.style.display = "flex"; userBtn.style.alignItems = "center"; userBtn.style.justifyContent = "center"; userBtn.style.color = "var(--ds-gray-900)"; userBtn.style.border = "1px solid var(--ds-gray-300)"; userBtn.style.borderRadius = "100%"; userBtn.style.cursor = "pointer"; userBtn.style.background = "transparent"; userBtn.style.padding = "0"; // user icon ( from geist) let svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('data-testid', 'geist-icon'); svg.setAttribute('height', '16'); svg.setAttribute('stroke-linejoin', 'round'); svg.setAttribute('style', 'color:currentColor'); svg.setAttribute('viewBox', '0 0 16 16'); svg.setAttribute('width', '16'); let path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); path.setAttribute('fill-rule', 'evenodd'); path.setAttribute('clip-rule', 'evenodd'); path.setAttribute('d', 'M7.75 0C5.95507 0 4.5 1.45507 4.5 3.25V3.75C4.5 5.54493 5.95507 7 7.75 7H8.25C10.0449 7 11.5 5.54493 11.5 3.75V3.25C11.5 1.45507 10.0449 0 8.25 0H7.75ZM6 3.25C6 2.2835 6.7835 1.5 7.75 1.5H8.25C9.2165 1.5 10 2.2835 10 3.25V3.75C10 4.7165 9.2165 5.5 8.25 5.5H7.75C6.7835 5.5 6 4.7165 6 3.75V3.25ZM2.5 14.5V13.1709C3.31958 11.5377 4.99308 10.5 6.82945 10.5H9.17055C11.0069 10.5 12.6804 11.5377 13.5 13.1709V14.5H2.5ZM6.82945 9C4.35483 9 2.10604 10.4388 1.06903 12.6857L1 12.8353V13V15.25V16H1.75H14.25H15V15.25V13V12.8353L14.931 12.6857C13.894 10.4388 11.6452 9 9.17055 9H6.82945Z'); path.setAttribute('fill', 'currentColor'); svg.appendChild(path); userBtn.appendChild(svg); loggedOutContainer.appendChild(userBtn); loggedOutContainer.style.display = 'flex'; loggedOutContainer.style.gap = '8px'; loggedOutContainer.style.alignItems = 'center'; user_status_content.firstChild.appendChild(loggedOutContainer); } })();
Menu

vercel flags

Last updated March 17, 2026

The vercel flags command manages Vercel Flags for a project directly from the command line. You can create, list, inspect, open, update, set, enable, disable, archive, and delete feature flags, as well as manage SDK keys.

terminal
vercel flags list

Using the vercel flags command to list all active feature flags.

terminal
vercel flags create [slug]

Using the vercel flags create command to create a new feature flag.

terminal
vercel flags inspect [flag]

Using the vercel flags command to display information about a feature flag.

terminal
vercel flags open [flag]

Opening the project feature flags dashboard, or a specific feature flag, in the Vercel dashboard.

terminal
vercel flags update [flag]

Using the vercel flags command to update a flag's variants.

terminal
vercel flags set [flag]

Using the vercel flags command to set the served variant in an environment.

terminal
vercel flags enable [flag]

Using the vercel flags command to enable a boolean feature flag in an environment.

terminal
vercel flags disable [flag]

Using the vercel flags command to disable a boolean feature flag in an environment.

terminal
vercel flags archive [flag]

Using the vercel flags command to archive a feature flag.

terminal
vercel flags rm [flag]

Using the vercel flags command to delete a feature flag.

Boolean flags are created by default. The vercel flags create command creates a new feature flag.

terminal
vercel flags create welcome-message --kind string --description "Homepage welcome copy" \
  --variant control="Welcome back" --variant treatment="Start for free"

Creating a string feature flag with explicit variants.

For string and number flags, repeat --variant VALUE[=LABEL] to define the exact variants you want to create. If you omit --variant in a terminal, the CLI prompts you to add variants interactively. In non-interactive environments, you must pass --variant.

Boolean flags always use the built-in false and true variants, labelled Off and On.

New boolean flags serve true in development and false in preview and production. The create output shows the initial environment behavior for the flag you just created.

Use vercel flags open to jump straight to the Vercel dashboard.

terminal
vercel flags open welcome-message

Opening a specific feature flag in the Vercel dashboard.

Use vercel flags update to change an existing variant's value, label, or both. If you omit one of the update flags, the CLI can guide you interactively.

terminal
vercel flags update welcome-message --variant control --value welcome-back \
  --label "Welcome back" --message "Refresh control copy"

Updating a variant and recording a revision message.

--variant matches a variant ID or current value. Run vercel flags inspect if you want to confirm the available variants before updating them.

For boolean flags, vercel flags update can rename the true or false variant labels, but it cannot change the boolean values themselves.

Use vercel flags set to choose which variant a specific environment serves.

terminal
vercel flags set welcome-message --environment preview --variant control \
  --message "Serve the control copy in preview"

Setting the variant served in preview for a string flag.

The enable and disable commands are shortcuts for boolean flags. They control whether an environment serves the true variant or the false variant. If you do not provide the --environment option, the CLI prompts you to select one interactively.

terminal
vercel flags enable my-feature --environment production --message "Resume rollout"

Enabling a boolean flag in production and recording why the change was made.

terminal
vercel flags disable my-feature -e production --variant false \
  --message "Pause rollout in production"

Disabling a boolean flag and serving the false variant in production.

The enable and disable commands only work with boolean flags. For string or number flags, use vercel flags set to change the served variant in an environment and vercel flags update to change variant values or labels.

A flag must be archived before it can be deleted. Archived flags stop evaluating and can be restored from the dashboard.

terminal
vercel flags archive my-feature --yes

Archiving a flag without a confirmation prompt.

terminal
vercel flags rm my-feature --yes

Deleting an archived flag without a confirmation prompt.

The vercel flags sdk-keys subcommand manages SDK keys for your project. SDK keys authenticate your application when evaluating flags. You can create keys for different environments and key types.

terminal
vercel flags sdk-keys ls

Using the vercel flags sdk-keys ls command to list all SDK keys.

terminal
vercel flags sdk-keys add --type server --environment production

Creating a server SDK key for the production environment.

terminal
vercel flags sdk-keys rm [hash-key]

Using the vercel flags sdk-keys rm command to delete an SDK key.

When you create an SDK key, the output includes:

  • Hash key: A truncated identifier shown in the key list
  • SDK key: The full key value, shown only at creation time
  • Connection string: A flags: URI containing all configuration needed to connect to Vercel Flags

Save the SDK key when it's created. It won't be shown again.

If you don't provide the --environment option, you'll be prompted to select one interactively.

These are options that only apply to the vercel flags command.

The --state option, shorthand -s, filters the list of flags by state when using vercel flags list. Valid values are active and archived. Defaults to active.

terminal
vercel flags ls --state archived

Using the vercel flags ls command with the --state option to list archived flags.

The --kind option, shorthand -k, specifies the type of a new flag when using vercel flags create. Valid values are boolean, string, and number. Defaults to boolean.

terminal
vercel flags create my-feature --kind string

Using the vercel flags create command with the --kind option to create a string flag.

The --description option, shorthand -d, sets a description for a new flag when using vercel flags create.

terminal
vercel flags create my-feature --description "Controls the new onboarding flow"

Using the vercel flags create command with the --description option.

The --environment option, shorthand -e, specifies the target environment for vercel flags set, vercel flags enable, vercel flags disable, and vercel flags sdk-keys add. Valid values are production, preview, and development.

terminal
vercel flags set welcome-message --environment production --variant control

Using the vercel flags set command with the --environment option.

The --variant option, shorthand -v, defines variants on vercel flags create, and selects a variant by ID or value on vercel flags update, vercel flags set, and vercel flags disable.

terminal
vercel flags create welcome-message --kind string \
  --variant control="Welcome back" --variant treatment="Start for free"

Using repeated --variant options to create a string flag with explicit variants.

The --value option sets the new value for a variant when using vercel flags update. Boolean variants can keep their existing true or false value, but they cannot be changed to a different boolean value.

terminal
vercel flags update welcome-message --variant control --value welcome-back

Using the vercel flags update command with the --value option.

The --label option, shorthand -l, sets a variant label when using vercel flags update, or an SDK key label when using vercel flags sdk-keys add.

terminal
vercel flags update welcome-message --variant control --label "Welcome back"

Using the vercel flags update command with the --label option.

The --message option sets an optional revision message when using vercel flags update, vercel flags set, vercel flags enable, or vercel flags disable.

terminal
vercel flags set welcome-message -e preview --variant control \
  --message "Keep preview on control"

Using the vercel flags set command with the --message option.

The --type option specifies the type of SDK key when using vercel flags sdk-keys add.

terminal
vercel flags sdk-keys add --type server --environment production

Using the vercel flags sdk-keys add command with the --type option.

The --yes option, shorthand -y, skips the confirmation prompt when archiving or deleting a flag, or when deleting an SDK key.

terminal
vercel flags archive my-feature --yes

Using the vercel flags archive command with the --yes option to skip confirmation.

The following global options can be passed when using the vercel flags command:

For more information on global options and their usage, refer to the options section.


Was this helpful?

supported.