BetterWright CLI

BetterWright keeps a persistent Playwright browser for agents with network rules, a credential vault and human handoff of steps.

  • 350 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • The agent drives a browser with saved cookies and can fill passwords from the vault.
  • Network access is open by default, including private and loopback addresses.
All reasons and checks

betterwright/betterwright

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/betterwright

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent drives a browser with saved cookies and can fill passwords from the vault.
  • Network access is open by default, including private and loopback addresses.

This is third-party code. Review the repository files before installing.

What it does

BetterWright gives an agent a persistent browser driven with Playwright JavaScript. Tabs, cookies and page state survive between calls, so the agent does not launch a new browser each time. It offers compact page snapshots with element references, screenshots, configurable network rules and trusted credential filling. It connects three ways: the CLI (`betterwright run`), an MCP server over stdio and a JavaScript and TypeScript SDK. `betterwright skill --install` writes browser skills into Claude Code, Codex and Cursor directories. For steps like two-factor sign-in there is human handoff with live view.

Who it is for. Agent developers and testers who need a controllable browser with session persistence, network limits and manual confirmation of sensitive steps.

Good fit when

  • An agent walks through a multi-step site flow and keeps tabs between calls.
  • UI checks need page snapshots and screenshots.
  • A person completes two-factor sign-in and the agent resumes.
  • The browser network is restricted by blocking local and private addresses.

Not a fit when

  • Hardened isolation from hostile code is needed: the snippet sandbox is not a security boundary.
  • A site or account is automated without permission.
  • The platform lacks Bun support and the managed browser is unavailable.

Example request

Open example.com in the persistent BetterWright browser, take a page snapshot and name the title.

Limitations

The CLI and setup rely on Bun 1.4 or newer, and the library imports in Node.js 22 or newer. The managed BetterChromium browser exists for macOS arm64, Linux x64 and Windows x64, so other platforms need your own browser. Network access is open by default, including private and loopback addresses, until `--block-private-network` and `--block-loopback` are set. Credential filling is a trusted operation and the secret stays in the page DOM. The README warns that undetectability and CAPTCHA acceptance are not guaranteed.

How to disable. Remove the MCP entry (`claude mcp remove betterwright`), the skills from `~/.claude/skills` and `~/.agents/skills`, then run `betterwright close` and uninstall the package. The profile with cookies stays on disk and is cleaned separately.

FAQ

How does it differ from the usual Playwright MCP?

The session lives in a background process between calls, snapshots are compact, and there are network rules, a credential vault and human handoff.

Which command registers the MCP server?

For Claude Code: `claude mcp add betterwright -- bunx betterwright mcp`, after `bun add -g betterwright @modelcontextprotocol/sdk`.

Is a model needed?

No, the browser runtime needs no model or key. The built-in agent (`betterwright exec`) uses a model you choose.

What about ad blocking?

Ghostery ad and tracker blocking is on by default and turns off with `--no-ad-block`.

How do I verify the installation?

`betterwright doctor` shows diagnostics, and `betterwright mcp --check` verifies the MCP server after registration in the client.

Discussion

No questions or reviews yet.

CLI tools

Plugin for Claude Code and Codex: the agent writes and runs Playwright scripts, browses sites and distills reusable skills.

PluginBroad access6.1KRepository stars
Official

Microsoft's official MCP server for driving a browser with Playwright through the accessibility tree, no screenshots needed

MCP serverExtended access39.6KRepository stars

A local Playwright driver for your everyday Chromium browser: the agent works in your live, logged-in profile through an extension and a relay

CLIBroad access498Repository stars

Playwright-based MCP server for browsing sites, clicking, filling forms, taking screenshots and running JavaScript in a browser

MCP serverBroad access297Repository stars
Needs a VPN

An MCP server that lets an agent drive a real browser: open pages, click and fill forms through Playwright

MCP serverExtended access848Repository stars

Agent browser on direct CDP without Playwright: login profiles, a CLI, an MCP server and recording workflows into a skill

CLIBroad access75Repository stars

README in short

The README gives a quickstart, connection through CLI, skills and MCP, the SDK, a built-in agent and a detailed section on safe defaults.

README badge

Report a problem