Manage Vercel Flags segments with Vercel CLI
New vercel flags segments command lets you create and edit flag-targeting segments from the terminal; --json output makes targeting scriptable from CI and agent-driven pipelines.
**The gist** The Vercel CLI adds a **vercel flags segments** command for managing flag targeting from the terminal. A segment decides who sees a flag; membership composes from three repeatable tokens — **include:, exclude:, and rule:** — passed via **--add and --remove** for incremental edits, while **--data** replaces a whole segment definition with raw JSON.
**Why it matters** Flag targeting was dashboard work; now it is terminal-scriptable. Every segment command supports **--json** output, so a CI job or coding agent can inspect and update who sees a feature — say, add an enterprise-plan rule to a beta segment — without leaving the pipeline. Vercel explicitly pitches this for **agent-driven pipelines**.
**The gist** The Vercel CLI adds a **vercel flags segments** command for managing flag targeting from the terminal. A segment decides who sees a flag; membership composes from three repeatable tokens — **include:, exclude:, and rule:** — passed via **--add and --remove** for incremental edits, while **--data** replaces a whole segment definition with raw JSON. **Why it matters** Flag targeting was dashboard work; now it is terminal-scriptable. Every segment command supports **--json** output, so a CI job or coding agent can inspect and update who sees a feature — say, add an enterprise-plan rule to a beta segment — without leaving the pipeline. Vercel explicitly pitches this for **agent-driven pipelines**. **Watch out** You need the **latest Vercel CLI** to get the command, and the changelog mentions no extra guardrails: a scripted or agent-run segment edit changes production targeting as directly as a dashboard change, so gate these commands in automation.