Wrangler KV commands
Manage Workers KV namespaces.
npx wrangler kv namespace create [NAMESPACE]pnpm wrangler kv namespace create [NAMESPACE]yarn wrangler kv namespace create [NAMESPACE]-
--namespacestring requiredThe name of the new namespace
-
--previewbooleanInteract with a preview namespace
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv namespace listpnpm wrangler kv namespace listyarn wrangler kv namespace listGlobal flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv namespace deletepnpm wrangler kv namespace deleteyarn wrangler kv namespace delete-
--bindingstringThe binding name to the namespace to delete from
-
--namespace-idstringThe id of the namespace to delete
-
--previewbooleanInteract with a preview namespace
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv namespace rename [OLD-NAME]pnpm wrangler kv namespace rename [OLD-NAME]yarn wrangler kv namespace rename [OLD-NAME]-
--old-namestringThe current name (title) of the namespace to rename
-
--namespace-idstringThe id of the namespace to rename
-
--new-namestring requiredThe new name for the namespace
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Manage key-value pairs within a Workers KV namespace.
npx wrangler kv key put [KEY] [VALUE]pnpm wrangler kv key put [KEY] [VALUE]yarn wrangler kv key put [KEY] [VALUE]-
--keystring requiredThe key to write to
-
--valuestringThe value to write
-
--bindingstringThe binding name to the namespace to write to
-
--namespace-idstringThe id of the namespace to write to
-
--previewbooleanInteract with a preview namespace
-
--ttlnumberTime for which the entries should be visible
-
--expirationnumberTime since the UNIX epoch after which the entry expires
-
--metadatastringArbitrary JSON that is associated with a key
-
--pathstringRead value from the file at a given path
-
--localbooleanInteract with local storage
-
--remotebooleanInteract with remote storage
-
--persist-tostringDirectory for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv key listpnpm wrangler kv key listyarn wrangler kv key list-
--bindingstringThe binding name to the namespace to list
-
--namespace-idstringThe id of the namespace to list
-
--previewboolean default: falseInteract with a preview namespace
-
--prefixstringA prefix to filter listed keys
-
--localbooleanInteract with local storage
-
--remotebooleanInteract with remote storage
-
--persist-tostringDirectory for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv key get [KEY]pnpm wrangler kv key get [KEY]yarn wrangler kv key get [KEY]-
--keystring requiredThe key value to get.
-
--bindingstringThe binding name to the namespace to get from
-
--namespace-idstringThe id of the namespace to get from
-
--previewboolean default: falseInteract with a preview namespace
-
--textboolean default: falseDecode the returned value as a utf8 string
-
--localbooleanInteract with local storage
-
--remotebooleanInteract with remote storage
-
--persist-tostringDirectory for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv key delete [KEY]pnpm wrangler kv key delete [KEY]yarn wrangler kv key delete [KEY]-
--keystring requiredThe key value to delete.
-
--bindingstringThe binding name to the namespace to delete from
-
--namespace-idstringThe id of the namespace to delete from
-
--previewbooleanInteract with a preview namespace
-
--localbooleanInteract with local storage
-
--remotebooleanInteract with remote storage
-
--persist-tostringDirectory for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Manage multiple key-value pairs within a Workers KV namespace in batches.
npx wrangler kv bulk get [FILENAME]pnpm wrangler kv bulk get [FILENAME]yarn wrangler kv bulk get [FILENAME]-
--filenamestring requiredThe file containing the keys to get
-
--bindingstringThe binding name to the namespace to get from
-
--namespace-idstringThe id of the namespace to get from
-
--previewbooleanInteract with a preview namespace
-
--localbooleanInteract with local storage
-
--remotebooleanInteract with remote storage
-
--persist-tostringDirectory for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv bulk put [FILENAME]pnpm wrangler kv bulk put [FILENAME]yarn wrangler kv bulk put [FILENAME]-
--filenamestring requiredThe file containing the key/value pairs to write
-
--bindingstringThe binding name to the namespace to write to
-
--namespace-idstringThe id of the namespace to write to
-
--previewbooleanInteract with a preview namespace
-
--ttlnumberTime for which the entries should be visible
-
--expirationnumberTime since the UNIX epoch after which the entry expires
-
--metadatastringArbitrary JSON that is associated with a key
-
--localbooleanInteract with local storage
-
--remotebooleanInteract with remote storage
-
--persist-tostringDirectory for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
npx wrangler kv bulk delete [FILENAME]pnpm wrangler kv bulk delete [FILENAME]yarn wrangler kv bulk delete [FILENAME]-
--filenamestring requiredThe file containing the keys to delete
-
--bindingstringThe binding name to the namespace to delete from
-
--namespace-idstringThe id of the namespace to delete from
-
--previewbooleanInteract with a preview namespace
-
--forceboolean alias: --fDo not ask for confirmation before deleting
-
--localbooleanInteract with local storage
-
--remotebooleanInteract with remote storage
-
--persist-tostringDirectory for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
-
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--experimental-remote-bindingsboolean aliases: --x-remote-bindingsExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
The following global flags work on every command:
--helpboolean- Show help.
--configstring (not supported by Pages)- Path to your Wrangler configuration file.
--cwdstring- Run as if Wrangler was started in the specified directory instead of the current working directory.
Below are deprecations to Wrangler commands for Workers KV.
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.
The kv:... syntax is deprecated in versions 3.60.0 and beyond and will be removed in a future major version.
For example, commands using the kv ... syntax look as such:
wrangler kv namespace listwrangler kv key get <KEY>wrangler kv bulk put <FILENAME>The same commands using the kv:... syntax look as such:
wrangler kv:namespace listwrangler kv:key get <KEY>wrangler kv:bulk put <FILENAME>Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark