sincecutoff.com
← all changes

wrangler preview base-config secret commands manage shared Preview secrets

Introduced 2026-08-11 · score 0.97

HOW TO USE IT

When setting shared defaults for all of a Worker’s Previews, use `wrangler preview base-config secret` to put, delete, list, or bulk-manage secrets in the Preview base config. Use `list` to inspect configured secrets; the release note says values are masked.

npx wrangler preview base-config secret put <KEY>
npx wrangler preview base-config secret list [--worker-name <WORKER>] [--json]
npx wrangler preview base-config secret bulk <FILE>

WHY THIS HELPS

Set or inspect shared secret defaults for all Previews of a Worker.

REQUIREMENTS AND LIMITATIONS

  • Version: 4.121.0
  • <KEY> (required): Secret name accessible in the Worker; required by put and delete.
  • [FILE]: File of key-value pairs to upload, in JSON or .env format; bulk can omit it and read from stdin only where the command docs say so. JSON null deletion is stated in the release note.
  • --worker-name <WORKER>: Worker to target; defaults to the name in the local Wrangler config.
  • --skip-confirmation: Skip the confirmation prompt for delete.
  • --json: Return list output as JSON; default is false.

FIRST-PARTY EVIDENCE

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

Report a problem with this card