WranglerCommand
The WranglerCommand component is used 18 times on 2 pages.
See all examples of pages that use WranglerCommand
Used 18 times.
Pages
Partials
The WranglerCommand component documents the available options for a given command.
This is generated using the Wrangler version in the cloudflare-docs repository ↗.
import { WranglerCommand } from "~/components";Deploy a Worker
npx wrangler deploy [SCRIPT]pnpm wrangler deploy [SCRIPT]yarn wrangler deploy [SCRIPT]-
--scriptstringThe path to an entry point for your Worker
-
--namestringName of the Worker
-
--no-bundleboolean default: falseSkip internal build steps and directly deploy Worker
-
--outdirstringOutput directory for the bundled Worker
-
--outfilestringOutput file for the bundled worker
-
--compatibility-datestringDate to use for compatibility checks
-
--compatibility-flagsstring alias: --compatibility-flagFlags to use for compatibility checks
-
--latestboolean default: falseUse the latest version of the Workers runtime
-
--assetsstringStatic assets to be served. Replaces Workers Sites.
-
--varstringA key-value pair to be injected into the script as a variable
-
--definestringA key-value pair to be substituted in the script
-
--aliasstringA module pair to be substituted in the script
-
--triggersstring aliases: --schedule, --schedulescron schedules to attach
-
--routesstring alias: --routeRoutes to upload
-
--domainsstring alias: --domainCustom domains to deploy to
-
--jsx-factorystringThe function that is called for each JSX element
-
--jsx-fragmentstringThe function that is called for each JSX fragment
-
--tsconfigstringPath to a custom tsconfig.json file
-
--minifybooleanMinify the Worker
-
--dry-runbooleanDon't actually deploy
-
--metafilestringPath to output build metadata from esbuild. If flag is used without a path, defaults to 'bundle-meta.json' inside the directory specified by --outdir.
-
--keep-varsboolean default: falseWhen not used (or set to false), Wrangler will delete all vars before setting those found in the Wrangler configuration. When used (and set to true), the environment variables are not deleted before the deployment. If you set variables via the dashboard you probably want to use this flag. Note that secrets are never deleted by deployments.
-
--logpushbooleanSend Trace Events from this Worker to Workers Logpush. This will not configure a corresponding Logpush job automatically.
-
--upload-source-mapsbooleanInclude source maps when uploading this Worker.
-
--old-asset-ttlnumberExpire old assets in given seconds rather than immediate deletion.
-
--dispatch-namespacestringName of a dispatch namespace to deploy the Worker to (Workers for Platforms)
-
--containers-rollout"immediate" | "gradual"Rollout strategy for Containers changes. If set to immediate, it will override
rollout_percentage_stepsif configured and roll out to 100% of instances in one step.
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-bindings default: trueExperimental: 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-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
import { WranglerCommand } from "~/components";
<WranglerCommand command="deploy" description={"Deploy a [Worker](/workers/)"}/>
<WranglerCommand command="d1 execute" />commandstring required- The name of the command, i.e
d1 execute.
- The name of the command, i.e
headingLevelboolean (default: 2) optional- The heading level that the command name should be added at on the page, i.e
2for ah2.
- The heading level that the command name should be added at on the page, i.e
descriptionstring optional- A description to render below the command heading. If not set, defaults to the value specified in the Wrangler help API.
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