Menu

Manage Vercel Flags segments with Vercel CLI - Vercel
📰

Manage Vercel Flags segments with Vercel CLI - Vercel

Vercel News·Chris Widmaier·5 days ago
#kP0xJa47
#vercel#flags#include#segments#segment
Reading 0:00
15s threshold

Vercel Flags segments can now be managed from the Vercel CLI with the new vercel flags segments command.

A segment is the targeting primitive a flag uses to decide who sees what. Membership composes from three repeatable tokens: include: , exclude: , and rule: . Pass them to --add or --remove for incremental edits. For full replacement, --data takes the entire segment definition as raw JSON.

# Create a segment and seed it with specific users

vercel flags segments create beta-users \

--label "Beta users" \

--add include:user.id = user_123 \

--add include:user.id = user_456

# Add a rule-based condition and remove a specific user

vercel flags segments update beta-users \

--add rule:user.plan:eq:enterprise \

--remove include:user.id = user_123

Combining include, exclude, and rule tokens across create and update

All segment commands support --json output, making them scriptable from CI, local workflows, and agent-driven pipelines that need to inspect or update flag targeting from the terminal.

Update…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.