{
  "slug": "wrangler-deploy-and-versions-upload-accept-secrets-file-911064e5fc18",
  "title": "wrangler deploy and versions upload accept --secrets-file",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-16T11:51:37.000Z",
  "announced_at": "2026-03-16T11:51:37.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When deploying Worker code with secrets from a file, pass `--secrets-file <FILE>` to `wrangler deploy` or `wrangler versions upload`. The file can be JSON or `.env`; secrets it omits are preserved from the previous version.",
    "examples": [
      "npx wrangler deploy --secrets-file <PATH_TO_JSON_OR_ENV_FILE>",
      "npx wrangler versions upload --secrets-file <PATH_TO_JSON_OR_ENV_FILE>"
    ],
    "gotchas": [
      "Version: 4.74.0",
      "--secrets-file <string>: Path to a JSON or `.env` file containing secrets to upload alongside the deployment; secrets omitted from the file are preserved from the previous version.",
      "The file format matches `wrangler versions secret bulk` and supports JSON and .env formats.",
      "Secrets not included in the file are inherited from the previous version."
    ]
  },
  "why_it_matters": "Deploy Worker code with secrets from a JSON or .env file in one operation.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.74.0",
    "https://developers.cloudflare.com/workers/configuration/secrets/",
    "https://developers.cloudflare.com/workers/wrangler/commands/workers/"
  ],
  "rank": 0.9706,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-9a1c33b505944406-0:gate",
    "evidence_hash": "14c1a76e0bb01e57390a903ed0d07095dac649cba37dc97ac1f0150996513db9"
  },
  "review": {
    "draft_hash": "a310f3adb5c64c820f8e115e246987d893f0ebe3c246b30ee9f1a2b88ce20d0e",
    "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.97 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
