Wrangler

Last updated Oct 12, 2026 is a command-line tool for building with Cloudflare developer products.

Use Wrangler to deploy projects that use the Workers Browser Run API.

Install

To install Wrangler, refer to Install and Update Wrangler.

Bindings

Bindings allow your Workers to interact with resources on the Cloudflare developer platform. A browser binding will provide your Worker with an authenticated endpoint to interact with a dedicated Chromium browser instance.

To deploy a Browser Run Worker, you must declare a browser binding in your Worker's Wrangler configuration file.

Note

For compatibility dates of 2026-08-04 or later, Workers enables both nodejs_compat and nodejs_compat_v2 by default. These flags are not used for these compatibility dates. Existing projects do not need to remove them when updating their compatibility date. For earlier dates, add nodejs_compat to your Wrangler configuration file to opt in. For instructions to turn off Node.js compatibility, refer to the Node.js compatibility flag.

{
    "$schema": "./node_modules/wrangler/config-schema.json",
    // Top-level configuration
    "name": "browser-rendering",
    "main": "src/index.ts",
    "upload_source_maps": true,
    "workers_dev": true,
    "compatibility_flags": ["nodejs_compat_v2"],
    "browser": {
        "binding": "MYBROWSER",
    },
}
"$schema" = "./node_modules/wrangler/config-schema.json"
name = "browser-rendering"
main = "src/index.ts"
upload_source_maps = true
workers_dev = true
compatibility_flags = [ "nodejs_compat_v2" ]

[browser]
binding = "MYBROWSER"

After the binding is declared, access the DevTools endpoint using env.MYBROWSER in your Worker code:

const browser = await puppeteer.launch(env.MYBROWSER);

Browser bindings also provide typed methods for session management, outbound Worker routing, and DevTools operations.

Quick Actions compatibility

The browser binding's .quickAction() method requires a compatibility date of 2026-03-24 or later. Ensure your wrangler.json includes:

{
  "compatibility_date": "2026-03-24"
}

Quick Actions require remote mode for local development

The .quickAction() method is not yet supported in local development mode. When using wrangler dev, you must run with --remote or set "remote": true in your browser binding configuration:

{
  "browser": {
    "binding": "MYBROWSER",
    "remote": true
  }
}

Without remote mode, calls to .quickAction() will fail with: The RPC receiver does not implement the method "quickAction".

For Puppeteer, Playwright, or CDP-based Workers, run npx wrangler dev to test locally. For Quick Actions via .quickAction(), use npx wrangler dev --remote as noted above.

Headful mode (experimental)

By default, local development runs Chrome in headless mode. To launch Chrome in visible (headful) mode for debugging, set the X_BROWSER_HEADFUL environment variable:

X_BROWSER_HEADFUL=true npx wrangler dev

This opens a browser window on screen so you can watch navigations, interactions, and rendering in real time. Headful mode is for local development only and does not affect deployed Workers. This feature is experimental and may change without notice.

Note

When using @cloudflare/playwright, two Chrome windows may appear. This is expected behavior due to how Playwright handles browser contexts via CDP.

Use real headless browser during local development

To interact with a real headless browser during local development, set "remote" : true in the Browser binding configuration. Learn more in our remote bindings documentation.

Was this helpful?

YesNo

On this page

Wrangler - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/browser-run/reference/wrangler/#page","headline":"Wrangler","description":"Use Wrangler, a command-line tool, to deploy projects using Cloudflare's Workers Browser Run API.","url":"https://developers.cloudflare.com/browser-run/reference/wrangler/","inLanguage":"en","image":"https://developers.cloudflare.com/browser-run/reference/wrangler/og.png?v=5109985827d0e5c2","dateModified":"2026-10-12","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Manage Browser Run sessions from the command line using Wrangler. title: Wrangler commands image: https://developers.cloudflare.com/browser-run/reference/wrangler-commands/og.png?v=15281df5b45b166f


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/browser-run/llms.txt
Use this file to discover all available pages before exploring further.