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
1 removed8 new9 fixed2 internal
- Removed
Drop deprecated containers
observability.loggingfield
Security
1 advisory affects 4.57.0; 4.59.1 fixes them
- HighWrangler affected by OS Command Injection in `wrangler pages deploy`GHSA-36p8-mvp6-cv38 · 21 Jan 2026Fixed in 4.59.1
Release note
Minor Changes
Add
wrangler auth tokencommand to retrieve your current authentication credentials.You can now retrieve your authentication token for use with other tools and scripts:
wrangler auth token
The command returns whichever authentication method is currently configured:
OAuth token from
wrangler login(automatically refreshed if expired)API token from
CLOUDFLARE_API_TOKENenvironment variable
Use
--jsonto get structured output including the token type, which also supports API key/email authentication:wrangler auth token --json
This is similar to
gh auth tokenin the GitHub CLI.Add support for trusted_user_ca_keys in Wrangler
You can now configure SSH trusted user CA keys for containers. Add the following to your wrangler.toml:
[[containers.trusted_user_ca_keys]] public_key = "ssh-ed25519 AAAAC3..."
This allows you to specify CA public keys that can be used to verify SSH user certificates.
- Removed
Drop deprecated containers
observability.loggingfield Add type generation support to
wrangler devYou can now have your worker configuration types be automatically generated when the local Wrangler development server starts.
To use it you can either:
Add the
--typesflag when runningwrangler dev.Update your Wrangler configuration file to add the new
dev.generate_typesboolean property.
{ "$schema": "node_modules/wrangler/config-schema.json", "name": "example", "main": "src/index.ts", "compatibility_date": "2025-12-12", "dev": { "generate_types": true } }Add hidden CLI flags to
wrangler setupfor suppressing outputTwo new hidden flags have been added to
wrangler setup:--no-completion-message: Suppresses the deployment details message after setup completes--no-install-wrangler: Skips Wrangler installation during project setup
Add analytics properties to secret commands for better usage insights
Secret commands (
wrangler secret put,wrangler secret bulk, and their Pages/versions equivalents) now include additional analytics properties to help understand how secrets are being managed:secretOperation: Whether this is a "single" or "bulk" secret operationsecretSource: How the secret was provided ("interactive", "stdin", or "file")secretFormat: For bulk operations, the format used ("json" or "dotenv")hasEnvironment: Whether an environment was specified
These properties help improve the developer experience by understanding common usage patterns. No sensitive information (secret names, values, or counts) is tracked.
Add default
Textmodule rule for.sqlfiles.This enables importing
.sqlfiles directly in Wrangler and the Cloudflare Vite plugin without extra configuration.Support Waku in autoconfig
Support Vike in autoconfig
Patch Changes
Display a warning when authentication errors occur and the
account_idin your Wrangler configuration does not match any of your authenticated accounts. This helps identify configuration issues where you may have the wrong account ID set in yourwrangler.tomlorwrangler.jsoncfile.Fix autoconfig handling of Next.js apps with CJS config files and incompatible Next.js versions
Previously,
wrangler setupandwrangler deploy --x-autoconfigwould fail when working with Next.js applications that use CommonJS config files (next.config.cjs) or have versions of Next.js that don't match the required peer dependencies. The autoconfig process now uses dynamic imports and forced installation to handle these scenarios gracefully.wrangler deploydelegates toopennextjs-cloudflare deployonly when the--x-autoconfigflag is usedThe
wrangler deploycommand has been updated to delegate to theopennextjs-cloudflare deploycommand when run in an open-next project. Once this behavior had been introduced it caused a few issues. So it's been decided to enable it for the time being only when the--x-autoconfigflag is set (since this behavior, although generally valid, is only strictly necessary for thewrangler deploy's autoconfig flow).Fix R2 Data Catalog snapshot-expiration API field names
The
wrangler r2 bucket catalog snapshot-expiration enablecommand was sending incorrect field names
to the Cloudflare API, resulting in a 422 Unprocessable Entity error. This fix updates the API request
body to use the correct field names:olderThanDays->max_snapshot_age(as duration string, e.g., "30d")retainLast->min_snapshots_to_keep
The CLI options (
--older-than-daysand--retain-last) remain unchanged.Surface a more helpful error message for TOML Date, Date-Time, and Time values in
varsTOML parses unquoted date/time values like
DATE = 2024-01-01as objects. Previously this would cause an unhelpful error message further down the stack. Now wrangler surfaces a more helpful error message earlier, telling you to quote the value as a string, e.g.DATE = "2024-01-01".Show an error when D1 migration commands are run without a configuration file
Previously, running
wrangler d1 migrations apply,wrangler d1 migrations list, orwrangler d1 migrations createin a directory without a Wrangler configuration file would silently exit with no feedback. Now these commands display a clear error message:"No configuration file found. Create a wrangler.jsonc file to define your D1 database."
Fix arguments passed to
wrangler deploynot being forwarded toopennextjs-cloudflare deploywrangler deployrun in an open-next project delegates toopennextjs-cloudflare deploy, as part of this all the arguments passed towrangler deployneed be forwarded toopennextjs-cloudflare deploy, before the arguments would be lost, now they will be successfully forwarded (for examplewrangler deploy --keep-varswill callopennextjs-cloudflare deploy --keep-vars)Notify user on local dev server reload.
When running
wrangler dev, the local server suppresses Miniflare's reload messages to prevent duplicate log entries from the proxy and user workers. This update adds a reload complete message so users know their changes were applied, instead of only seeing "Reloading local server...".Breaks out version numbers into sortable number types for analytics logging
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.