KV (3)·续

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

kv key get

Read a single value by key from the given namespace

npmyarnpnpm

npx wrangler kv key get <KEY>
yarn wrangler kv key get <KEY>
pnpm wrangler kv key get <KEY>
  • <KEY> string required

The key value to get. - --text boolean default: false

Decode the returned value as a utf8 string - --binding string The binding name to the namespace to get from - --namespace-id string The id of the namespace to get from - --preview boolean default: false

Interact with a preview namespace - --local boolean Interact with local storage - --remote boolean Interact with remote storage - --persist-to string Directory for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

kv key delete

Remove a single key value pair from the given namespace

npmyarnpnpm

npx wrangler kv key delete <KEY>
yarn wrangler kv key delete <KEY>
pnpm wrangler kv key delete <KEY>
  • <KEY> string required

The key value to delete. - --binding string The binding name to the namespace to delete from - --namespace-id string The id of the namespace to delete from - --preview boolean Interact with a preview namespace - --local boolean Interact with local storage - --remote boolean Interact with remote storage - --persist-to string Directory for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

kv bulk

Manage multiple key-value pairs within a Workers KV namespace in batches.

Note

The kv ... commands allow you to manage your Workers KV resources in the Cloudflare network. Learn more about using Workers KV with Wrangler in the Workers KV guide.

Caution

Since version 3.60.0, Wrangler supports the kv ... syntax. If you are using versions below 3.60.0, the command follows the kv:... syntax. Learn more about the deprecation of the kv:... syntax in the Wrangler commands for KV page.

kv bulk get

Gets multiple key-value pairs from a namespace

npmyarnpnpm

npx wrangler kv bulk get <FILENAME>
yarn wrangler kv bulk get <FILENAME>
pnpm wrangler kv bulk get <FILENAME>
  • <FILENAME> string required

The file containing the keys to get - --binding string The binding name to the namespace to get from - --namespace-id string The id of the namespace to get from - --preview boolean default: false

Interact with a preview namespace - --local boolean Interact with local storage - --remote boolean Interact with remote storage - --persist-to string Directory for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

kv bulk put

Upload multiple key-value pairs to a namespace

npmyarnpnpm

npx wrangler kv bulk put <FILENAME>
yarn wrangler kv bulk put <FILENAME>
pnpm wrangler kv bulk put <FILENAME>
  • <FILENAME> string required

The file containing the key/value pairs to write - --binding string The binding name to the namespace to write to - --namespace-id string The id of the namespace to write to - --preview boolean Interact with a preview namespace - --ttl number Time for which the entries should be visible - --expiration number Time since the UNIX epoch after which the entry expires - --metadata string Arbitrary JSON that is associated with a key - --local boolean Interact with local storage - --remote boolean Interact with remote storage - --persist-to string Directory for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

kv bulk delete

Delete multiple key-value pairs from a namespace

npmyarnpnpm

npx wrangler kv bulk delete <FILENAME>
yarn wrangler kv bulk delete <FILENAME>
pnpm wrangler kv bulk delete <FILENAME>
  • <FILENAME> string required

The file containing the keys to delete - --force boolean alias: --f

Do not ask for confirmation before deleting - --binding string The binding name to the namespace to delete from - --namespace-id string The id of the namespace to delete from - --preview boolean Interact with a preview namespace - --local boolean Interact with local storage - --remote boolean Interact with remote storage - --persist-to string Directory for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

Was this helpful?

YesNo

On this page

KV (3)·续 - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/workers/wrangler/commands/kv/#page","headline":"KV","description":"Wrangler commands for managing Workers KV namespaces and key-value pairs.","url":"https://developers.cloudflare.com/workers/wrangler/commands/kv/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/wrangler/commands/kv/og.png?v=4876bc91e9008329","dateModified":"2026-04-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Wrangler commands for configuring Cloudflare Pages. title: Pages image: https://developers.cloudflare.com/workers/wrangler/commands/pages/og.png?v=3e4588ee7a0ecb51


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/workers/llms.txt
Use this file to discover all available pages before exploring further.