WranglerNamespace
WranglerNamespace is used 2 times on 2 pages.
Pages which use WranglerNamespace
 Used 2 times.
Pages
Partials
The WranglerNamespace component documents the available commands for a given namespace.
This is generated using the Wrangler version in the cloudflare-docs repository ↗.
import { WranglerNamespace } from "~/components";List D1 databases
npx wrangler d1 listpnpm wrangler d1 listyarn wrangler d1 list-  
--jsonboolean default: falseReturn output as clean JSON
 
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
 
Get information about a D1 database, including the current database size and state
npx wrangler d1 info [NAME]pnpm wrangler d1 info [NAME]yarn wrangler d1 info [NAME]-  
--namestring requiredThe name of the DB
 -  
--jsonboolean default: falseReturn output as clean JSON
 
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
 
Get information about the queries run on a D1 database.
npx wrangler d1 insights [NAME]pnpm wrangler d1 insights [NAME]yarn wrangler d1 insights [NAME]-  
--namestring requiredThe name of the DB
 -  
--timePeriodstring default: 1dFetch data from now to the provided time period
 -  
--sort-typestring default: sumChoose the operation you want to sort insights by
 -  
--sort-bystring default: timeChoose the field you want to sort insights by
 -  
--sort-directionstring default: DESCChoose a sort direction
 -  
--limitnumber default: 5fetch insights about the first X queries
 -  
--jsonboolean default: falsereturn output as clean JSON
 
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
 
Create D1 database
npx wrangler d1 create [NAME]pnpm wrangler d1 create [NAME]yarn wrangler d1 create [NAME]-  
--namestring requiredThe name of the new DB
 -  
--locationstringA hint for the primary location of the new DB. Options: weur: Western Europe eeur: Eastern Europe apac: Asia Pacific oc: Oceania wnam: Western North America enam: Eastern North America
 
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
 
Delete D1 database
npx wrangler d1 delete [NAME]pnpm wrangler d1 delete [NAME]yarn wrangler d1 delete [NAME]-  
--namestring requiredThe name or binding of the DB
 -  
--skip-confirmationboolean alias: --y default: falseSkip confirmation
 
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
 
Execute a command or SQL file
npx wrangler d1 execute [DATABASE]pnpm wrangler d1 execute [DATABASE]yarn wrangler d1 execute [DATABASE]-  
--databasestring requiredThe name or binding of the DB
 -  
--yesboolean alias: --yAnswer "yes" to any prompts
 -  
--localbooleanExecute commands/files against a local DB for use with wrangler dev
 -  
--remotebooleanExecute commands/files against a remote DB for use with wrangler dev
 -  
--filestringA .sql file to ingest
 -  
--commandstringA single SQL statement to execute
 -  
--persist-tostringSpecify directory to use for local persistence (for --local)
 -  
--jsonboolean default: falseReturn output as clean JSON
 -  
--previewboolean default: falseExecute commands/files against a preview D1 DB
 
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
 
Export the contents or schema of your database as a .sql file
npx wrangler d1 export [NAME]pnpm wrangler d1 export [NAME]yarn wrangler d1 export [NAME]-  
--namestring requiredThe name of the DB
 -  
--localbooleanExport from your local DB you use with wrangler dev
 -  
--remotebooleanExport from your live D1
 -  
--no-schemabooleanOnly output table contents, not the DB schema
 -  
--no-databooleanOnly output table schema, not the contents of the DBs themselves
 -  
--tablestringSpecify which tables to include in export
 -  
--outputstring requiredWhich .sql file to output to
 
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
 
Retrieve information about a database at a specific point-in-time using Time Travel
npx wrangler d1 time-travel info [DATABASE]pnpm wrangler d1 time-travel info [DATABASE]yarn wrangler d1 time-travel info [DATABASE]-  
--databasestring requiredThe name or binding of the DB
 -  
--timestampstringAccepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for
 -  
--jsonboolean default: falseReturn output as clean JSON
 
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
 
Restore a database back to a specific point-in-time
npx wrangler d1 time-travel restore [DATABASE]pnpm wrangler d1 time-travel restore [DATABASE]yarn wrangler d1 time-travel restore [DATABASE]-  
--databasestring requiredThe name or binding of the DB
 -  
--bookmarkstringBookmark to use for time travel
 -  
--timestampstringAccepts a Unix (seconds from epoch) or RFC3339 timestamp (e.g. 2023-07-13T08:46:42.228Z) to retrieve a bookmark for
 -  
--jsonboolean default: falseReturn output as clean JSON
 
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
 
List your D1 migrations
npx wrangler d1 migrations list [DATABASE]pnpm wrangler d1 migrations list [DATABASE]yarn wrangler d1 migrations list [DATABASE]-  
--databasestring requiredThe name or binding of the DB
 -  
--localbooleanExecute commands/files against a local DB for use with wrangler dev
 -  
--remotebooleanExecute commands/files against a remote DB for use with wrangler dev --remote
 -  
--previewboolean default: falseExecute commands/files against a preview D1 DB
 -  
--persist-tostringSpecify directory to use for local persistence (you must use --local with this flag)
 
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
 
Create a new migration
npx wrangler d1 migrations create [DATABASE] [MESSAGE]pnpm wrangler d1 migrations create [DATABASE] [MESSAGE]yarn wrangler d1 migrations create [DATABASE] [MESSAGE]-  
--databasestring requiredThe name or binding of the DB
 -  
--messagestring requiredThe Migration message
 
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
 
Apply D1 migrations
npx wrangler d1 migrations apply [DATABASE]pnpm wrangler d1 migrations apply [DATABASE]yarn wrangler d1 migrations apply [DATABASE]-  
--databasestring requiredThe name or binding of the DB
 -  
--localbooleanExecute commands/files against a local DB for use with wrangler dev
 -  
--remotebooleanExecute commands/files against a remote DB for use with wrangler dev --remote
 -  
--previewboolean default: falseExecute commands/files against a preview D1 DB
 -  
--persist-tostringSpecify directory to use for local persistence (you must use --local with this flag)
 
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
 
import { WranglerNamespace } from "~/components";
<WranglerNamespace namespace="d1" />namespacestring required- The namespace to pull the related commands from (
d1,hyperdrive). 
- The namespace to pull the related commands from (
 headingLevelboolean (default: 2) optional- The heading level that the commands should be added at on the page, i.e 
2forh2. 
- The heading level that the commands should be added at on the page, i.e 
 
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