diff --git a/src/content/docs/browser-rendering/get-started/screenshots.mdx b/src/content/docs/browser-rendering/get-started/screenshots.mdx index 1c886af21d5049..61f7c397819a85 100644 --- a/src/content/docs/browser-rendering/get-started/screenshots.mdx +++ b/src/content/docs/browser-rendering/get-started/screenshots.mdx @@ -50,8 +50,8 @@ For the purpose of this guide, you are going to use a [KV store](/kv/concepts/kv Create two namespaces, one for production, and one for development. ```sh -npx wrangler kv:namespace create BROWSER_KV_DEMO -npx wrangler kv:namespace create BROWSER_KV_DEMO --preview +npx wrangler kv namespace create BROWSER_KV_DEMO +npx wrangler kv namespace create BROWSER_KV_DEMO --preview ``` Take note of the IDs for the next step. diff --git a/src/content/docs/workers-ai/function-calling/embedded/examples/kv.mdx b/src/content/docs/workers-ai/function-calling/embedded/examples/kv.mdx index a14b0f0475122f..af0b96b9d03336 100644 --- a/src/content/docs/workers-ai/function-calling/embedded/examples/kv.mdx +++ b/src/content/docs/workers-ai/function-calling/embedded/examples/kv.mdx @@ -85,5 +85,5 @@ export default { To verify the results, run the following command ```sh -npx wrangler kv:key get banana --binding KV --local +npx wrangler kv key get banana --binding KV --local ``` diff --git a/src/content/docs/workers/local-development.mdx b/src/content/docs/workers/local-development.mdx index 06264dd2e47264..6327cdb8b0362a 100644 --- a/src/content/docs/workers/local-development.mdx +++ b/src/content/docs/workers/local-development.mdx @@ -87,14 +87,14 @@ The following [Wrangler commands](/workers/wrangler/commands/) have a `--local` | Command | | ---------------------------------------------------- | | [`d1 execute`](/workers/wrangler/commands/#execute) | -| [`kv:key`](/workers/wrangler/commands/#kv-key) | -| [`kv:bulk`](/workers/wrangler/commands/#kv-bulk) | +| [`kv key`](/workers/wrangler/commands/#kv-key) | +| [`kv bulk`](/workers/wrangler/commands/#kv-bulk) | | [`r2 object`](/workers/wrangler/commands/#r2-object) | If using `--persist-to` to specify a custom folder with `wrangler dev` you should also add `--persist-to` with the same directory name along with the `--local` flag when running the commands above. For example, to put a custom KV key into a local namespace via the CLI you would run: ```sh -npx wrangler kv:key put test 12345 --binding MY_KV_NAMESPACE --local --persist-to worker-local +npx wrangler kv key put test 12345 --binding MY_KV_NAMESPACE --local --persist-to worker-local ``` Running `wrangler kv key put` will create a new key `test` with a value of `12345` on the local namespace specified via the binding `MY_KV_NAMESPACE` in the [Wrangler configuration file](/workers/wrangler/configuration/). This example command sets the local persistence directory to `worker-local` using `--persist-to`, to ensure that the data is created in the correct location. If `--persist-to` was not set, it would create the data in the `.wrangler` folder. diff --git a/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx b/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx index 90185cfa47af77..5c1a352be8d1f8 100644 --- a/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx +++ b/src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx @@ -81,10 +81,10 @@ For the remainder of this tutorial you will complete each task, iterating on you To begin, you need to understand how to populate your todo list with actual data. To do this, use [Cloudflare Workers KV](/kv/) — a key-value store that you can access inside of your Worker to read and write data. -To get started with KV, set up a namespace. All of your cached data will be stored inside that namespace and, with configuration, you can access that namespace inside the Worker with a predefined variable. Use Wrangler to create a new namespace called `TODOS` with the [`kv:namespace create` command](/workers/wrangler/commands/#kv-namespace-create) and get the associated namespace ID by running the following command in your terminal: +To get started with KV, set up a namespace. All of your cached data will be stored inside that namespace and, with configuration, you can access that namespace inside the Worker with a predefined variable. Use Wrangler to create a new namespace called `TODOS` with the [`kv namespace create` command](/workers/wrangler/commands/#kv-namespace-create) and get the associated namespace ID by running the following command in your terminal: ```sh title="Create a new KV namespace" -npx wrangler kv:namespace create "TODOS" --preview +npx wrangler kv namespace create "TODOS" --preview ``` The associated namespace can be combined with a `--preview` flag to interact with a preview namespace instead of a production namespace. Namespaces can be added to your application by defining them inside your Wrangler configuration. Copy your newly created namespace ID, and in your [Wrangler configuration file](/workers/wrangler/configuration/), define a `kv_namespaces` key to set up your namespace: diff --git a/src/content/docs/workers/tutorials/workers-kv-from-rust/index.mdx b/src/content/docs/workers/tutorials/workers-kv-from-rust/index.mdx index 1b5f7374088569..b22a3f72701bb9 100644 --- a/src/content/docs/workers/tutorials/workers-kv-from-rust/index.mdx +++ b/src/content/docs/workers/tutorials/workers-kv-from-rust/index.mdx @@ -47,7 +47,7 @@ In this tutorial, you will use Workers KV from Rust to build an app to store and In the terminal, use Wrangler to create a KV namespace for `cities`. This generates a configuration to be added to the project: ```sh -npx wrangler kv:namespace create cities +npx wrangler kv namespace create cities ``` To add this configuration to your project, open the Wrangler file and create an entry for `kv_namespaces` above the build command: