Bulk-upload many secrets from a file

secrets & env vars

// what it does

Uploads a whole batch of secrets in one call — perfect for seeding a new Worker or environment. Accepts a `.env` file of `KEY=VALUE` lines or flat JSON in the form `{"KEY": "value"}`.

// shell

$ wrangler secret bulk .env
$ wrangler secret bulk ./secrets.json

// gotcha

The JSON must be a flat object of string values — non-string or nested values are rejected. Omit the file argument to pipe the JSON from stdin instead (e.g. `cat secrets.json | wrangler secret bulk`).