Packages

wrangler

4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed

Your version

4.96.0

1 Jun 2026Where it was published

4.167.0 is the newest release of 4.x.

In short

1 removed8 new12 fixed2 internal

  • Removed

    Remove the deprecated experimental.testMode option from unstable_dev

Release note

Minor Changes

  • #13955 a2ef1a3 Thanks @G4brym! - Add support for the new web_search binding kind.

    Cloudflare Web Search is a managed, zero-setup web discovery primitive for agents and Workers. Declare the binding as a single object in wrangler.jsonc:

    {
      "web_search": { "binding": "WEBSEARCH" },
    }

    There is exactly one shared web corpus, so there is no namespace, instance, or other field to specify -- only the variable name. The binding exposes a single search() method that returns URLs and catalog metadata for a query. Web Search is discovery-only -- to read a result's content the caller invokes the global fetch() API against the result's url.

    The binding is always remote in local development: Miniflare proxies to the production Web Search service via the remote-bindings transport. Adds the websearch.run OAuth scope to wrangler login.

    Also adds a wrangler websearch search command for running ad-hoc queries from the CLI:

    npx wrangler websearch search "cloudflare workers"
    npx wrangler websearch search "cloudflare workers" --limit 5
    npx wrangler websearch search "cloudflare workers" --json

    --limit is optional (defaults to 10, capped at 20). --json prints the raw response; without it the results render as a pretty table.

  • Add support for agent_memory bindings

    Agent Memory bindings allow Workers to connect to Cloudflare's Agent Memory service for storing and retrieving agent conversation state. This binding is remote-only, meaning it always connects to the Cloudflare API during wrangler dev rather than using a local simulation.

    To configure an agent_memory binding, add the following to your wrangler.json:

    {
      "agent_memory": [
          {
              "binding": "MY_MEMORY",
              "namespace": "my-namespace",
          },
      ],
    }

    Wrangler will automatically provision the namespace during deployment if it does not already exist. Type generation via wrangler types is also supported.

    This change also adds the agent-memory:write OAuth scope to Wrangler's default login scopes, so wrangler login can request the permissions needed to provision and manage Agent Memory namespaces.

  • Add wrangler agent-memory namespace commands

    The following commands have been added for managing Agent Memory namespaces:

    wrangler agent-memory namespace create <namespace>
    wrangler agent-memory namespace list [--json]
    wrangler agent-memory namespace get <namespace_name> [--json]
    wrangler agent-memory namespace delete <namespace_name> [--force]
  • Add confirmation prompt to wrangler containers images delete

    Previously, running wrangler containers images delete IMAGE:TAG would delete the image immediately with no confirmation. The command now prompts for confirmation before deleting. Use -y or --skip-confirmation to bypass the prompt in non-interactive or scripted environments.

  • Rename pipeline field to stream in pipeline bindings configuration

    The pipeline field inside pipelines bindings has been renamed to stream to align with the updated API wire format. The old pipeline field is still accepted but deprecated and will emit a warning.

    Before:

    // wrangler.json
    {
      "pipelines": [
          {
              "binding": "MY_PIPELINE",
              "pipeline": "my-stream-name",
          },
      ],
    }

    After:

    // wrangler.json
    {
      "pipelines": [
          {
              "binding": "MY_PIPELINE",
              "stream": "my-stream-name",
          },
      ],
    }
  • Allow pipeline, stream, and sink commands to resolve resources by name with pagination-aware lookups.

  • Support deleting secrets via wrangler secret bulk
    You can now delete secrets in bulk by setting their value to null in the JSON input file:

    { "SECRET_TO_DELETE": null, "SECRET_TO_UPDATE": "new-value" }
  • Add ProxyCommand support for wrangler containers ssh

    wrangler containers ssh now automatically switches to a stdio proxy when invoked by OpenSSH's ProxyCommand, and --stdio can force this mode. This lets users connect with ssh <instance_id> when their SSH config uses Wrangler as the proxy command.

  • Removed

    Remove the deprecated experimental.testMode option from unstable_dev

    experimental.testMode previously only affected the default logLevel (warn when testMode: true, log otherwise) and has been flagged for removal in its type-definition comment since it landed. It is now removed, and unstable_dev's default log level matches wrangler dev's (log).

    Callers that explicitly passed testMode: true to get quieter logs should now set logLevel: "warn" directly.

Patch Changes

  • Report all failing triggers from a single deploy

    wrangler deploy deploys several kinds of trigger in parallel (routes, custom domains, schedules, queue producers/consumers, workflows). Previously, if one of those API calls failed, the first rejection short-circuited the rest, no other deployments were reported, and (in the case of custom-domain confirmation conflicts) some failures were silently logged to stdout without the deploy actually failing.

    wrangler deploy now waits for every trigger deployment to settle, prints every successfully-deployed target (so you still see what landed), and then throws a single error listing every trigger that failed.

    Note that this also turns the previously-silent "user declined to override a conflicting Custom Domain" case into a hard failure of wrangler deploy, which matches what was always implied by the message ("Publishing to Custom Domain ... was skipped, fix conflict and try again").

  • Bump rosie-skills from 0.7.6 to 0.8.1 and bundle it into the Wrangler output

    The new version of rosie-skills is a pure-TypeScript rewrite that removes the previously necessary ~600kb WASM binary. The package now ships only JavaScript with one minimal dependencies (modern-tar).

    Additionally, rosie-skills is now bundled directly into Wrangler's distributable rather than kept as an external runtime dependency. This eliminates the supply chain concern raised in #14110: there is no separate package to resolve at install time, since all code is inlined into Wrangler's build output.

  • Update the generated type for browser bindings to BrowserRun

    When running wrangler types, browser bindings were previously typed as the generic Fetcher. They now generate the more specific and accurate BrowserRun type.

  • Bump rosie-skills package from 0.6.3 to 0.7.6

  • Disable Sentry error reporting by default

    WRANGLER_SEND_ERROR_REPORTS now defaults to false instead of prompting on every error. The current prompt produces too many false-positive reports. Users can still opt in explicitly by setting WRANGLER_SEND_ERROR_REPORTS=true.

  • Fix wrangler setup failing for Vite projects without a config file

    wrangler setup (and wrangler deploy --experimental-autoconfig) crashed with "Could not find Vite config file to modify" for Vite projects that don't have a vite.config.js or vite.config.ts. This affected 6 of the 16 create-vite templates: vanilla, vanilla-ts, react-swc, react-swc-ts, lit, and lit-ts.

    Autoconfig now creates a minimal Vite config with the Cloudflare plugin when no config file exists, instead of failing. The file extension (.ts or .js) is chosen based on whether the project has a tsconfig.json.

  • Show helpful message with URL when browser cannot be opened in headless/container environments

    Previously, running wrangler login (or any command that opens a browser) in headless Linux environments without xdg-open installed would crash with a confusing "A file or directory could not be found — Missing file or directory: xdg-open" error.

    Now wrangler catches the error and prints a clear warning with the URL so users can copy-paste it into a browser manually.

  • wrangler secrets-store secret create and secret update now reject secret values larger than 64 KiB (65,536 bytes) with a clear error before calling the Cloudflare API. Previously the CLI accepted them, the secret appeared in secret list, and the failure surfaced later (and confusingly) at worker deploy time as a "secret doesn't exist" error against the binding. 64 KiB is the cap enforced by the API; the CLI now enforces it at the same boundary.

  • Fix wrangler kv bulk get printing "Success!" to stdout, which corrupted JSON output when piped to tools like jq

  • Show a clear error for invalid API token header characters

    Wrangler now detects API tokens containing characters that cannot be sent in the HTTP Authorization header before making an API request. This avoids a low-level ByteString conversion error and helps users recreate or recopy the token without printing the token value.

  • Adapt React Router autoconfig based on v8_middleware future flag

    The React Router autoconfig (wrangler setup) now detects whether v8_middleware: true is set in the user's react-router.config.ts. When it is, the generated workers/app.ts uses a simplified fetch handler without AppLoadContext module augmentation, and the generated app/entry.server.tsx omits the _loadContext parameter. When v8_middleware is not set, the existing AppLoadContext pattern with env/ctx params is preserved.

    This avoids breaking projects that use the v8_middleware future flag (which changes the context API from AppLoadContext to RouterContextProvider), while keeping the traditional pattern for projects that haven't opted in.

  • Fix wrangler whoami printing a trailing period after the api-tokens URL

    The message To see token permissions visit https://...api-tokens. ended with
    a period that became part of the URL when clicked in terminals or GitHub Actions
    output, causing a 404. The period is removed and a comma added before "visit"
    so the sentence reads naturally without a trailing period on the URL.

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.