vercel flags split configures weighted flag variants
Introduced 2026-05-19 · score 0.98
HOW TO USE IT
When configuring weighted variants for a Vercel Flag in an environment, run `vercel flags split <flag>` with the environment, bucketing attribute, and a weight for every variant. For String, Number, or JSON flags, also set the fallback variant; use `--message` to record a revision message.
vercel flags split <flag> --environment <environment> --by <entity.attribute> --default-variant <variant> --weight <variant>=<weight> --weight <variant>=<weight> --message "<revision message>"vercel flags split <flag> --environment <environment> --by <entity.attribute> --weight <variant>=<weight> --weight <variant>=<weight>WHY THIS HELPS
Configure weighted variants for a Vercel Flag in an environment during development or testing.
REQUIREMENTS AND LIMITATIONS
- Version: 54.2.0
- <flag> (required): Flag slug to configure.
- --environment, -e (required): Selects the environment for the split.
- --by (required): Selects the entity attribute used for stable bucketing, in `<entity.attribute>` form. The entity and attribute must already be defined; timestamp attributes cannot be used.
- --weight, -w (required): Use once for every variant, in `VARIANT=WEIGHT` form. Weights are normalized as ratios; `0` excludes a variant from traffic, and at least one weight must be greater than zero.
- --default-variant: For String, Number, and JSON flags, chooses the fallback served when the bucketing attribute is unavailable. Boolean splits default to `false`. Accepts a variant ID or value.
- --message: Sets an optional revision message.
- Prerequisite: Define the entity and bucketing attribute in the Vercel Flags dashboard or with `vercel flags entities` before running the command.
- Prerequisite: In non-interactive environments, pass the required split options explicitly.
- The interactive flow prompts for the environment, bucketing attribute, weights, fallback variant, and revision message.
- A variant with weight `0` is excluded from receiving traffic.
FIRST-PARTY EVIDENCE
Check the installed version and the source before using it. Entry JSON