sincecutoff.com
← all changes

vercel flags rules CLI manages conditional feature flag rules

Introduced 2026-07-09 · score 0.98

HOW TO USE IT

When managing conditional rules for a feature in an environment, use `vercel flags rules` to list, add, update, move, or remove rules. Pass the environment and the rule’s conditions, variant or weights, and position as needed.

vercel flags rules ls <feature> --environment production --json
vercel flags rules add <feature> --environment production --condition '<entity>.<attribute>:<operator>:<value>' --variant <variant>
vercel flags rules add <feature> --environment production --condition '<entity>.<attribute>:<operator>:<value>' --by <entity>.<attribute> --weight <variant>=<weight> --weight <variant>=<weight> --position <position>

WHY THIS HELPS

Add or adjust conditional feature flag rules for an application's production environment.

REQUIREMENTS AND LIMITATIONS

  • Version: 55.0.0
  • <feature> (required): Feature flag slug argument; examples use `my-feature`.
  • <rule_id> (required): Rule identifier argument used by update, move, and remove; example: `rule_123`.
  • --environment (required): Target environment; release examples use `production`.
  • --json: For `ls`, request JSON output containing the full rule set.
  • --condition: Condition token in `<entity>.<attribute>:<operator>:<value>` form; repeat to add multiple conditions. Each rule needs at least one filter.
  • --variant: Variant ID to serve for a fixed rule outcome.
  • --by: Entity attribute used for weighted bucketing, e.g. `user.userId`.
  • --weight: Variant weight in `<variant>=<weight>` form; release example repeats this option for variants `off` and `on`.
  • --position: Rule position for add or move; examples use `1`.
  • Prerequisite: Authenticate to Vercel before accessing resources or performing administrative tasks; use `vercel login` in a terminal or a token in CI.
  • Prerequisite: Targeting rules require entities to be configured first; referenced variant IDs must exist in the flag’s variants.
  • Prerequisite: The CLI changelog says to update to the latest Vercel CLI version to use rule management.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card