{
  "slug": "vercel-env-add-accepts-multiple-target-environments-c32d3784de8d",
  "title": "vercel env add accepts multiple target environments",
  "tools": [
    "vercel"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-14T17:48:27.000Z",
  "announced_at": "2026-07-14T17:48:27.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating one Environment Variable entry for multiple targets, pass a comma-separated target list to `vercel env add`. Supply the value through stdin or `--value`; a Git branch is allowed only when Preview is the sole target.",
    "examples": [
      "printf '%s' '<value>' | vercel env add API_URL production,preview,development"
    ],
    "gotchas": [
      "Version: 56.2.0",
      "name (positional) (required): Environment Variable name, such as `API_URL`.",
      "environment (positional) (required): One target or a comma-separated target list; documented targets include standard targets and custom Environment slugs/ids. Unknown tokens fail locally; slugs normalize to ids.",
      "value (stdin or `--value`) (required): Variable value; provide through stdin or `--value`.",
      "--git-branch <name>: Set a branch-specific Preview variable; branch is allowed only when Preview is the sole target.",
      "Prerequisite: Run in a directory linked to a Vercel project; the documented flow requires an existing project link.",
      "Prerequisite: Provide the variable value via stdin or `--value` in non-interactive use.",
      "A Git branch is rejected unless Preview is the only target.",
      "Docs conflict: The current official CLI env reference documents a single `[environment]` positional and separate commands for multiple targets; it does not document the comma-separated form. The official CLI UX contract on the repository's current main branch does document that form, but the page does not establish that it is at version 56.2.0."
    ]
  },
  "why_it_matters": "Create one Environment Variable entry for multiple deployment targets.",
  "before": "Run `vercel env add` separately for each target environment to create entries for multiple environments.",
  "sources": [
    "https://github.com/vercel/vercel/releases/tag/vercel%4056.2.0",
    "https://github.com/vercel/vercel/blob/main/packages/cli/.agents/skills/cli-ux/references/command-contracts.md",
    "https://github.com/vercel/vercel/blob/main/skills/vercel-cli/references/environment-variables.md",
    "https://vercel.com/docs/environment-variables/manage-across-environments"
  ],
  "rank": 0.98048,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-33b336a429b30bcb-0:gate",
    "evidence_hash": "aca2d8a7af3e5d17f2d98f0f76111404ce57aa47d80e8e93799eb73b095035c9"
  },
  "review": {
    "draft_hash": "a7bd77dcbdf40c049fa3a4d506750c9eea6d4169c3ceabe94ed2e0a5b88ef414",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.79 (>= 0.6 needed)."
  }
}
