Set a secret non-interactively from CI
secrets & env vars
// what it does
Pipes the value on stdin instead of prompting, so GitHub Actions or any CI can rotate secrets unattended. Pull the raw value from a CI secret/env var and stream it straight into `secret put`.
// shell
$ echo -n "$SECRET_VALUE" | wrangler secret put API_KEY --env production// gotcha
`echo "$VALUE"` appends a trailing newline that becomes part of the stored secret and silently breaks auth. Use `echo -n` or `printf %s` to send the exact bytes.