Load secrets for local dev without deploying them
secrets & env vars
// what it does
`.dev.vars` holds `KEY=VALUE` overrides that `wrangler dev` injects as `env` during local development, so you can run against local/dev credentials without touching the remote secret store. This is the local counterpart to `secret put`.
// shell
$ echo "API_KEY=local-dev-value" >> .dev.vars$ wrangler dev// gotcha
`.dev.vars` is only read by local dev — it's ignored on `wrangler deploy` and never uploaded, so gitignore it. `wrangler dev --env staging` reads `.dev.vars.staging` instead of the base file.