Skip to main content

Manage Vercel Flags segments with Vercel CLI

By Steven Van ·

The new vercel flags segments command lets teams add, remove, or replace flag targeting rules straight from the CLI.

Vercel Flags segments can now be managed from the Vercel CLI with a new vercel flags segments command. A segment is the targeting primitive a flag uses to decide who sees what, and membership is built from three repeatable tokens: include:, exclude:, and rule:.

  • Pass tokens to --add or --remove for incremental edits to a segment's membership.
  • Use --data with raw JSON to replace a segment's entire definition at once.
  • All segment commands support --json output, so they can be scripted from CI, local workflows, or agent-driven pipelines that need to inspect or update flag targeting from the terminal.

The commands require updating to the latest version of the Vercel CLI. More detail is in the Vercel Flags CLI documentation.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read Manage Vercel Flags segments with Vercel CLI on Creators Toolbox