Skip to main content
dench browser controls a cloud browser without opening dench.com or installing Chrome locally. The browser provider stays server-side: the CLI only sends bearer-authenticated JSON, and your per-workspace browser profile (cookies, logins) is resolved automatically. You never see or pass provider credentials.
Both auth modes work: an approved dench signin session and a workspace DENCH_API_KEY. Sandboxes authenticate with DENCH_API_KEY automatically.

Two ways to use it

Interactive actions

One step per call: open, inspect, click, type, screenshot, stop. Best for quick logins and ad-hoc steps.

Playwright sessions

Open a CDP session and drive it with a full Playwright script. Best for longer, durable automations run from the sandbox.

Interactive actions

The CLI remembers the latest browser thread per host/session, so follow-up actions reuse it. Pass --thread <threadId> to target a specific one, or dench browser reset to forget it.

Playwright sessions (CDP)

Create a session, connect with Playwright over CDP, then stop it. The live view and replay appear in the Dench chat panel the same way as interactive runs.
Connect from a script with chromium.connectOverCDP(session.connectUrl):
The optional --context-id flag overrides the resolved profile for manual testing; normally you should omit it and let the workspace profile apply. See the full agent playbook at references/BROWSER.md and the HTTP equivalents under the API reference.