Skip to main content
The BAP CLI lets AI coding agents automate browsers from the shell. It defaults to installed Chrome, keeps a persistent daemon running, and supports composite actions that batch multiple steps into one command.

Installation

1

Install the CLI globally

Or run without installing:
2

Install Playwright browsers (if needed)

BAP prefers your installed Chrome. If Chrome is not available: bash npx playwright install chromium
3

Install the skill file for your AI agent

bash bap install-skill This auto-detects 13 AI agent platforms (Claude Code, Codex CLI, Gemini CLI, Cursor, GitHub Copilot, Windsurf, Roo Code, and more) and installs the SKILL.md guidance file.
4

Run the guided demo

Walks you through navigate, observe, click, and screenshot step by step.

First Commands

The BAP server starts automatically on first use and stays running as a background daemon. Use bap close-all to stop it.

Composite Actions

The killer feature of BAP CLI is bap act — batch multiple browser steps in one command:
Step syntax: action:selector=value for fill/type, action:selector for click/check/hover.

Observation

Fused Operations

Combine navigation or actions with observation in a single server call:

Structured Extraction

Sessions and Tabs

Global Options

Output

Commands produce concise, agent-friendly stdout:
Files are saved to .bap/ in the current directory: snapshots (.yml), screenshots (.png), extractions (.json).

Migrating from playwright-cli

BAP is a drop-in replacement. All e<N> refs from snapshots work identically: BAP adds composite actions, semantic selectors, smart observation, and structured extraction on top.