You can now manage targeting rules for Vercel Flags through the Vercel CLI. With the vercel flags rules command, you and your agents can add new rules, move existing ones, and inspect the current ordering without leaving your terminal.
Rules you create from the CLI use the same model as the dashboard. Conditions can target entities or reusable segments, outcomes can serve a single variant, a weighted split, or a progressive rollout, and rules evaluate top to bottom. For scripts and agents, vercel flags rules ls --json prints the full rule set.
vercel flags rules add checkout-redesign \ --environment production \ --condition "user.country:in:DE,FR,ES" \ --variant new-checkoutAdding a rule in production that serves the new-checkout variant to users in Germany, France, and Spain.
An environment can inherit its flag configuration from another environment. When you add or update a rule in an inheriting environment, the CLI switches that environment to its own configuration, so your rule applies there without changing the environment it inherited from.
Update to the latest Vercel CLI version and run vercel flags rules to get started. Learn more in the Vercel Flags CLI documentation.
Reference Architecture
Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.
- Agent stack: Build and operate agents with models, tools, and durable workflows.
- Web applications: Choose rendering, data, authentication, and caching approaches.
- Backends: Choose a runtime, connect services, and run background work.
Build with prompts
Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.