wrangler
4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed
4.167.0 is the newest release of 4.x.
In short
5 new7 fixed2 internal
Release note
Minor Changes
Graduate autoconfig from experimental to stable
The
--experimental-autoconfigand--x-autoconfigdeploy CLI flags have been replaced with--autoconfig.Note that the
--autoconfigflag defaults totrueand that it can be used to disable Wrangler's auto-configuration logic by setting it tofalsevia--autoconfig=falseor--no-autoconfigAdd per-Worker resource accessors to
createTestHarness()createTestHarness()now provides methods for accessing configured KV namespaces, R2 buckets, D1 databases, and Durable Object namespaces. Useserver.getWorker(name)to access resources scoped to that specific Worker:const worker = server.getWorker("api-worker"); const bucket = await worker.getR2Bucket("BUCKET"); const db = await worker.getD1Database("DB");Suggest Cloudflare skills installation after commands instead of before
The automatic prompt to install Cloudflare skills for detected AI coding agents no longer runs before every Wrangler command. Instead, Wrangler now suggests installing skills, when appropriate, after some commands complete successfully. Commands that output JSON suppress the suggestion to keep their output clean. The
--install-skillsflag remains available on all commands to explicitly run the skills installation flow before the command executes, without prompting.As before, Wrangler asks the skills installation question at most once. The skills install metadata file is now written before the confirmation prompt is shown, so even if the user interrupts the process (e.g. CTRL+C, closing the terminal) during the prompt, the question is recorded as unanswered and will not reappear on subsequent runs.
Add a
--temporaryflag that creates and uses a temporary Cloudflare preview account when you have no credentials, instead of starting the OAuth login flow.It's registered only on the commands the short-lived account token can serve — Workers (
deploy,versions upload, and related commands), KV, D1, Hyperdrive, Queues, and certificate commands — and is for unauthenticated use only: passing it while already authenticated (OAuth,CLOUDFLARE_API_TOKEN, or a global API key) errors rather than silently ignoring the flag. Before provisioning, Wrangler handles Cloudflare's Terms of Service and Privacy Policy (interactive terminals prompt foryes; non-interactive shells print a notice and continue). Wrangler then runs with the short-lived token and prints a claim URL so the account can be claimed before it expires. The cached account is cleared on successful login or logout.Send the
login usertelemetry event whenwrangler login --scopes ...succeedswrangler loginwas already reporting thelogin userevent when called without--scopes, but the scoped login path returned early before the event could be sent. Both paths now report the event, so successful scoped logins are counted alongside unscoped ones.
Patch Changes
Fix
wrangler devasset fallback with custom routeswrangler devnow applies Workers Assets fallback behavior consistently when routes are configured, including SPA fallback and404-pagehandling.Show a clear error when deploying a service-worker format Worker with Durable Object migrations or bindings instead of an opaque API error
Fix
wrangler email sendingcommandsThe
email sendingcommands previously failed against the Cloudflare API. They now work as expected:email sending enable <domain>enables Email Sending for a domainemail sending disable <domain>disables Email Sending for a domainemail sending settings <domain>shows the Email Sending configuration for a domainemail sending dns get <domain>shows the DNS records to set up for a domainemail sending listpreviously listed zones. It now lists the domains that have Email Sending enabled — every enabled domain across your account by default, or just those under a specific domain when you pass a domain (or--zone-id).
Fix unhandled promise rejection when the worker entry point is deleted or moved during
wrangler devhot-reload — now logs a warning and skips the update instead of crashingImprove error messages for CLI flags, type generation, auth scopes, dev server tunnels, and compatibility flags
Error messages across several areas now name the exact flags or values involved and suggest how to fix the problem:
KV commands (
kv key put,kv key get,kv key delete): error messages now include--prefixes and clear "Missing required option" / "Conflicting options" phrasing instead of the vague "Exactly one of the arguments ... is required".wrangler types --include-env=false --include-runtime=false: the error now names both flags and explains what each does.wrangler login --scopes: invalid scopes are individually identified instead of dumping the entire array.wrangler dev --tunnel --remote: the error now explains why tunnels require local mode and suggests two concrete fixes.Conflicting compatibility flags (
nodejs_compat_populate_process_env/nodejs_compat_do_not_populate_process_env,global_navigator/no_global_navigator): errors now name the specific conflicting flags.
Improve Hyperdrive error messages for missing required options
Error messages thrown when creating or updating a Hyperdrive config with missing individual parameters (e.g.
--origin-host,--origin-port,--database,--origin-user,--origin-password,--origin-scheme,--access-client-id/--access-client-secret) now clearly state which option is missing, provide a usage example, and suggest--connection-stringas an alternative where applicable.Skip resource provisioning for asset-only deployments
Previously, asset-only deployments would provision resources even when there was no user Worker script. On a subsequent deploy, we would re-attempt provisioning as the previous asset-only upload would/could not be bound to the previously provisioned resource. Provisioning would then error as the resource had already been created, blocking the deploy.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.