npx wrangler kv key put config.json --path ./config.json --namespace-id 2f1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d

Category: Cloudflare

npx wrangler kv key put config.json --path ./config.json --namespace-id 2f1b3c4d5e6f7a8b9c0d1e2f3a4b5c6d

Write a file's contents as a KV value

Reads the value from ./config.json instead of the command line, which keeps large or multi-line payloads out of your shell history. The key is still positional, here config.json. Use --ttl or --expiration to make the entry expire, or --metadata to attach JSON metadata.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.