Skip to content

Commit f77b74f

Browse files
authored
update old kv syntax (#19720)
1 parent 42b7de5 commit f77b74f

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/content/docs/browser-rendering/get-started/screenshots.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ For the purpose of this guide, you are going to use a [KV store](/kv/concepts/kv
5050
Create two namespaces, one for production, and one for development.
5151

5252
```sh
53-
npx wrangler kv:namespace create BROWSER_KV_DEMO
54-
npx wrangler kv:namespace create BROWSER_KV_DEMO --preview
53+
npx wrangler kv namespace create BROWSER_KV_DEMO
54+
npx wrangler kv namespace create BROWSER_KV_DEMO --preview
5555
```
5656

5757
Take note of the IDs for the next step.

src/content/docs/workers-ai/function-calling/embedded/examples/kv.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ export default {
8585
To verify the results, run the following command
8686

8787
```sh
88-
npx wrangler kv:key get banana --binding KV --local
88+
npx wrangler kv key get banana --binding KV --local
8989
```

src/content/docs/workers/local-development.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ The following [Wrangler commands](/workers/wrangler/commands/) have a `--local`
8888
| Command |
8989
| ---------------------------------------------------- |
9090
| [`d1 execute`](/workers/wrangler/commands/#execute) |
91-
| [`kv:key`](/workers/wrangler/commands/#kv-key) |
92-
| [`kv:bulk`](/workers/wrangler/commands/#kv-bulk) |
91+
| [`kv key`](/workers/wrangler/commands/#kv-key) |
92+
| [`kv bulk`](/workers/wrangler/commands/#kv-bulk) |
9393
| [`r2 object`](/workers/wrangler/commands/#r2-object) |
9494

9595
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:
9696

9797
```sh
98-
npx wrangler kv:key put test 12345 --binding MY_KV_NAMESPACE --local --persist-to worker-local
98+
npx wrangler kv key put test 12345 --binding MY_KV_NAMESPACE --local --persist-to worker-local
9999
```
100100

101101
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.

src/content/docs/workers/tutorials/build-a-jamstack-app/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ For the remainder of this tutorial you will complete each task, iterating on you
8181

8282
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.
8383

84-
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:
84+
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:
8585

8686
```sh title="Create a new KV namespace"
87-
npx wrangler kv:namespace create "TODOS" --preview
87+
npx wrangler kv namespace create "TODOS" --preview
8888
```
8989

9090
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:

src/content/docs/workers/tutorials/workers-kv-from-rust/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In this tutorial, you will use Workers KV from Rust to build an app to store and
4747
In the terminal, use Wrangler to create a KV namespace for `cities`. This generates a configuration to be added to the project:
4848

4949
```sh
50-
npx wrangler kv:namespace create cities
50+
npx wrangler kv namespace create cities
5151
```
5252

5353
To add this configuration to your project, open the Wrangler file and create an entry for `kv_namespaces` above the build command:

0 commit comments

Comments
 (0)