Skip to main content

CLI Reference

Drive webrain by hand — every engine and tool has a CLI twin.

Commands

Snapshot-driven interaction

The CLI works on snapshot refs — the same elements webrain snapshot reports, 1-indexed:
The MCP tools also accept plain CSS selectors directly (e.g. webrain_click with selector: "#submit").

webrain doctor

Exit codes: 0 healthy, 2 broken. Checks the install end to end — engines, MCP server, CDP ports, vault, Python sidecar — and prints a recommend line. The first step in any troubleshooting session. --doctor is an alias flag.