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
2 new3 fixed4 internal
Release note
Minor Changes
Add
wrangler completecommand for shell completion scripts (bash, zsh, powershell)Usage:
# Bash wrangler complete bash >> ~/.bashrc # Zsh wrangler complete zsh >> ~/.zshrc # Fish wrangler complete fish >> ~/.config/fish/completions/wrangler.fish # PowerShell wrangler complete powershell > $PROFILE
Uses
@bomb.sh/tablibrary for cross-shell compatibilityCompletions are dynamically generated from
experimental_getWranglerCommands()API
wrangler typesnow generates per-environment TypeScript interfaces when named environments exist in your configuration.When your configuration has named environments (an
envobject),wrangler typesnow generates both:Per-environment interfaces (e.g.,
StagingEnv,ProductionEnv) containing only the bindings explicitly declared in each environment, plus inherited secretsAn aggregated
Envinterface with all bindings from all environments (top-level + named environments), where:Bindings present in all environments are required
Bindings not present in all environments are optional
Secrets are always required (since they're inherited everywhere)
Conflicting binding types across environments produce union types (e.g.,
KVNamespace | R2Bucket)
However, if your config does not contain any environments, or you manually specify an environment via
--env,wrangler typeswill continue to generate a single interface as before.Example:
Given the following
wrangler.jsonc:{ "name": "my-worker", "kv_namespaces": [ { "binding": "SHARED_KV", "id": "abc123", }, ], "env": { "staging": { "kv_namespaces": [ { "binding": "SHARED_KV", "id": "staging-kv" }, { "binding": "STAGING_CACHE", "id": "staging-cache" }, ], }, }, }Running
wrangler typeswill generate:declare namespace Cloudflare { interface StagingEnv { SHARED_KV: KVNamespace; STAGING_CACHE: KVNamespace; } interface Env { SHARED_KV: KVNamespace; // Required: in all environments STAGING_CACHE?: KVNamespace; // Optional: only in staging } } interface Env extends Cloudflare.Env {}
Patch Changes
Fix
wrangler pages project validateto respect file count limits fromCF_PAGES_UPLOAD_JWTFixed the flag casing for the time period flag for the
d1 insightscommand.Fix
wrangler setupnot automatically selectingworkersas the target for new SvelteKit appsThe Sveltekit
adapter:cloudflareadapter now accepts two different targetsworkersorpages. Since the wrangler auto configuration only targets workers, wrangler should instruct the adapter to use theworkersvariant. (The auto configuration process would in any case not work if the user were to targetpages.)
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.