echo "sk-live-9f2a" | npx wrangler secret put API_KEY
Set a secret from piped input
Feeds the secret value through stdin so the put runs non-interactively, the standard pattern for CI pipelines and scripts. The trailing newline from echo is stripped. For many secrets at once, prefer `npx wrangler secret bulk secrets.json`.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.