npx wrangler kv namespace create GREETINGS --binding GREETINGS

Category: Cloudflare

npx wrangler kv namespace create GREETINGS --binding GREETINGS

Create a KV namespace and bind it in the config

Creates the namespace and automatically adds the binding to wrangler.toml, skipping the copy-paste step. A binding is the name your Worker code uses to reach the store, e.g. env.GREETINGS. Re-run `npx wrangler types` afterward to refresh the Env type.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.