wrangler dev options for routing and assets
The `wrangler dev` command includes options for routing and assets: `--routes` or `--route` (string[], optional) specifies routes to upload (example: `--route example.com/*`); `--host` (string, optional) specifies the host to forward requests to (defaults to the zone of project); `--assets` (string, optional, beta) specifies a folder of static assets to be served, replacing Workers Sites; `--site` (string, optional, deprecated, use `--assets` instead) specifies folder of static assets for Workers Sites; `--site-include` (string[], optional, deprecated) specifies array of .gitignore-style patterns that match file or directory names from the sites directory, with only matched items uploaded; `--site-exclude` (string[], optional, deprecated) specifies array of .gitignore-style patterns that match file or directory names from the sites directory, with matched items not uploaded.
wrangler dev options for bundling and code injection
The `wrangler dev` command includes options for bundling and code injection: `--no-bundle` (boolean, default false, optional) skips Wrangler's build steps, useful when using custom builds; `--var` (key:value[], optional) specifies an array of key:value pairs to inject as variables into the Worker code, always passed as strings to the Worker's env; `--define` (key:value[], optional) specifies an array of key:value pairs to replace global identifiers in code at build time; `--tsconfig` (string, optional) specifies the path to a custom tsconfig.json file; `--minify` (boolean, optional) minifies the Worker; `--alias` (Array<string>) specifies modules to alias using module aliasing.
wrangler dev options for persistence, remote resources, and testing
The `wrangler dev` command includes options for persistence and remote resources: `--persist-to` (string, optional) specifies directory to use for local persistence; `--remote` (boolean, default false, optional) develops against remote resources and data stored on Cloudflare's network; `--tunnel` (boolean, default false, optional) exposes local dev server over a Cloudflare Tunnel; `--tunnel-name` (string, optional) uses an existing named Cloudflare Tunnel (combine with `--tunnel` to open it automatically at startup); `--test-scheduled` (boolean, default false, optional) exposes a `/__scheduled` fetch route which triggers a scheduled event for testing cron triggers, with optional cron query parameter simulation.
wrangler dev options for logging and local mode
The `wrangler dev` command includes options for logging and execution mode: `--log-level` (debug|info|log|warn|error|none, default log, optional) specifies Wrangler's logging level; `--show-interactive-dev-session` (boolean, default true if terminal supports interactivity, optional) shows the interactive dev session; `--types` (boolean, default false, optional) generates types from Worker configuration; `--local` (boolean, default false, optional) runs in local mode where the Worker code runs locally on the machine and all remote bindings are disabled as if configured with `remote: false`.
wrangler deploy command for publishing Workers
The `wrangler deploy` command deploys a Worker to Cloudflare. Syntax: `wrangler deploy [<PATH>] [OPTIONS]`. PATH (string, optional) specifies either the path to an entry point for the Worker (only required if Wrangler configuration file does not include a `main` key) or the path to an assets directory for deployment of a static site. When run in a project directory without a Wrangler configuration file, Wrangler automatically detects the framework and configures the project. To deploy from an AI agent or other environment before Cloudflare authentication is available, use `wrangler deploy --temporary` (requires Wrangler 4.102.0 or later), which creates or reuses a temporary preview account and prints a claim URL.
wrangler deploy options for configuration and bundling
The `wrangler deploy` command includes options: `--name` (string, optional) specifies the Worker name; `--no-bundle` (boolean, default false, optional) skips Wrangler's build steps; `--env` (string, optional) specifies a specific environment; `--outdir` (string, optional) specifies path to directory where Wrangler will write bundled Worker files; `--compatibility-date` (string, optional, format yyyy-mm-dd) determines which version of the Workers runtime is used; `--compatibility-flags` or `--compatibility-flag` (string[], optional) specifies flags for compatibility checks; `--latest` (boolean, default true, optional) uses the latest version of the Workers runtime.
wrangler types command path and environment options
The `wrangler types` command includes path and environment options: PATH (string, default `./worker-configuration.d.ts`) specifies where types for the Worker will be written; the path must have a `.d.ts` extension. `--env` (string, optional) generates types for bindings in a specific environment only rather than aggregating bindings from all environments.
wrangler deploy options for assets and variables
The `wrangler deploy` command includes options for assets and code injection: `--assets` (string, optional, beta) specifies folder of static assets to be served; `--site` (string, optional, deprecated, use `--assets` instead) specifies folder of static assets for Workers Sites; `--site-include` (string[], optional, deprecated) specifies array of .gitignore-style patterns for site directory items to upload; `--site-exclude` (string[], optional, deprecated) specifies array of .gitignore-style patterns for site directory items to exclude; `--var` (key:value[], optional) specifies array of key:value pairs to inject as variables into code; `--define` (key:value[], optional) specifies array of key:value pairs to replace global identifiers in code at build time.
wrangler deploy options for triggers, routes, and domains
The `wrangler deploy` command includes options: `--triggers`, `--schedule`, or `--schedules` (string[], optional) specifies cron schedules to attach to the deployed Worker; `--routes` or `--route` (string[], optional) specifies routes where the Worker will be deployed (example: `--route example.com/*`); `--domain` (string[], optional) specifies custom domains where the Worker will be deployed (example: `--domain example.com`).
wrangler deploy options for TypeScript and minification
The `wrangler deploy` command includes options: `--tsconfig` (string, optional) specifies path to a custom tsconfig.json file; `--minify` (boolean, optional) minifies the bundled Worker before deploying.
wrangler deploy options for dry-run and variable management
The `wrangler deploy` command includes options: `--dry-run` (boolean, default false, optional) compiles a project without actually deploying to live servers, useful for testing output with `--outdir` and uploading sourcemaps before going live; `--keep-vars` (boolean, default false, optional) prevents Wrangler from overriding environment variables changed in the Cloudflare dashboard on next deployment (secrets are never deleted regardless of this flag).
wrangler deploy options for secrets and dispatch namespace
The `wrangler deploy` command includes options: `--secrets-file` (string, optional) specifies path to a file containing secrets to upload alongside deployment, accepts JSON or .env format (same formats used by wrangler secret bulk), with existing secrets not included in file preserved from previous version; `--dispatch-namespace` (string, optional) specifies the Workers for Platforms dispatch namespace to upload the Worker to.
wrangler deploy options for build metadata and containers rollout
The `wrangler deploy` command includes options: `--metafile` (string, optional) specifies a file to write build metadata from esbuild to; if used without a path string, defaults to `bundle-meta.json` inside directory specified by `--outdir`, useful for understanding bundle size; `--containers-rollout` (immediate|gradual|none, optional) specifies the rollout strategy for Containers associated with the Worker (immediate: 100% update in one step overriding rollout_step_percentage config, none: deploys Worker without building/updating Containers, defaults to gradual with 10% then 100% of instances).
wrangler deploy options for strict mode and metadata
The `wrangler deploy` command includes options: `--strict` (boolean, default false, optional) turns on strict mode for deployment command, making it more defensive and preventing deployments that could introduce potential issues, particularly preventing deployments that would override remote settings in non-interactive environments; `--tag` (string, optional) specifies a tag for this Worker version, matches behavior of `wrangler versions upload --tag`; `--message` (string, optional) specifies a descriptive message for this Worker version and deployment, matches behavior of `wrangler versions upload --message`, applied to both version and deployment.
wrangler deploy options for automation and temporary deployments
The `wrangler deploy` command includes options: `--yes` (boolean, default false, optional) skips confirmation prompts and runs automatic project configuration non-interactively using detected settings, only applicable when no Wrangler configuration file exists; `--temporary` (boolean, optional) deploys with temporary preview account when no Cloudflare credentials available, requires Wrangler 4.102.0 or later, prints claim URL allowing deployment claim within 60 minutes, intended for AI agents and first-time deployment flows, returns error if Wrangler can already use OAuth, CLOUDFLARE_API_TOKEN, or global API key.
wrangler delete command to remove Workers
The `wrangler delete` command deletes a Worker and all associated Cloudflare developer platform resources. Syntax: `wrangler delete [<SCRIPT>] [OPTIONS]`. SCRIPT (string, optional) is the path to an entry point for the Worker, only required if Wrangler configuration file does not include a `main` key. Options include: `--name` (string, optional) specifies the Worker name; `--env` (string, optional) specifies a specific environment to perform on; `--dry-run` (boolean, default false, optional) does not actually delete the Worker, useful for testing the output of `wrangler delete`.
wrangler setup command configures project without deploying
The `wrangler setup` command configures a project for Cloudflare Workers without deploying. It performs the same automatic project configuration as `wrangler deploy` but does not deploy. This is useful when you want to review the generated configuration before deploying.
wrangler tail command streams live logs
The `wrangler tail` command provides a live feed of console and exception logs for each request a Worker receives. If the Worker has high volume traffic, the tail may enter sampling mode, causing some messages to be dropped with a warning. To prevent message dropping, add options to filter tail message volume. It may take up to 1 minute for a tail to exit sampling mode after adding filter options. If sampling persists, consider using instant logs instead.
wrangler versions upload creates new Worker version
The `wrangler versions upload` command uploads a new version of a Worker that is not deployed immediately. Minimum required wrangler version is 3.40.0. For versions before 3.73.0, the `--x-versions` flag is needed.
wrangler versions deploy deploys Worker versions
The `wrangler versions deploy` command deploys a previously created version of a Worker all at once or creates a gradual deployment to incrementally shift traffic to a new version. The command follows an interactive prompt. Non-interactive syntax is `wrangler versions deploy version-id-1@percentage-1% version-id-2@percentage-2 -y`. Example: `wrangler versions deploy 095f00a7-23a7-43b7-a227-e4c97cab5f22@10% 1a88955c-2fbd-4a72-9d9b-3ba1e59842f2@90% -y`. Minimum required wrangler version is 3.40.0.
wrangler versions list shows recent Worker versions
The `wrangler versions list` command retrieves details for the 10 most recent versions. Details include `Version ID`, `Created on`, `Author`, `Source`, and optionally `Tag` or `Message`. Minimum required wrangler version is 3.40.0.
wrangler versions view displays version details
The `wrangler versions view` command displays detailed information about a specific Worker version. Minimum required wrangler version is 3.40.0.
wrangler versions secret commands manage version secrets
Wrangler provides secret management commands for Worker versions: `wrangler versions secret put`, `wrangler versions secret delete`, and `wrangler versions secret bulk`. These allow managing secrets for specific versions without immediate deployment. Minimum required wrangler version is 3.40.0.