Browser Rendering - Manage Browser Rendering sessions with Wrangler CLI
Key Points
- wrangler browser create returns CDP session URL
- Wrangler handles auth—no API tokens needed
- supports --keepAlive (60–600s) and --json
Summary
Cloudflare Browser Rendering now includes wrangler browser CLI commands to create, manage, and view browser sessions from your terminal. Wrangler handles authentication so you don't need to pass API tokens. Sessions are accessible via standard CDP clients for automation, scraping, or remote debugging.
Key Points
- Available commands:
wrangler browser create(create session),wrangler browser close(close session),wrangler browser list(list active sessions),wrangler browser view(view live session). wrangler browser createspins up a browser instance on Cloudflare's network and returns a session URL you can connect to with CDP-compatible tools (Puppeteer, Playwright, MCP clients).- Use
--keepAliveto set session duration (60–600 seconds). Example:wrangler browser create --keepAlive 300. wrangler browser viewauto-selects the session when only one exists; prompts when multiple exist.- All commands support
--jsonfor structured output, making them suitable for scripting and automation. - Because Wrangler manages authentication, you can safely integrate these commands into CI/CD or local automation without embedding API tokens.
For full usage and flags, refer to the Wrangler commands documentation.