This monorepo contains Cloudflare's browser automation libraries for Browser Run.
| Package | Description |
|---|---|
@cloudflare/puppeteer |
Puppeteer port for Cloudflare Workers and Browser Run |
@cloudflare/playwright |
Playwright port for Cloudflare Workers and Browser Run |
@cloudflare/playwright-mcp |
Playwright MCP server for Cloudflare Workers and Browser Run |
See RELEASING.md for the package release process.
git submodule update --init
npm ci
npm run buildThe ports use upstream repositories as Git submodules. Cloudflare-specific changes live in patches under patches/.
Apply all patches:
npm run patchRegenerate them after changing the submodules:
npm run diffBrowser Run RPC bindings accept an outboundByHost map. Each value is a Worker
Fetcher created by the caller. Browser Run sends requests for that hostname to
the Fetcher, so the request can use the caller's authentication or private
network access.
const browser = await puppeteer.launch(env.MYBROWSER, {
outboundByHost: {
'app.example.com': ctx.exports.MyApp({props: {}}),
},
});Create the Fetcher and launch the browser in the same Worker invocation. The map carries live Worker capabilities and is not supported by URL endpoints or legacy HTTP-only bindings.
More information in the developer docs.
Apache-2.0