Skip to main content

CLI Reference

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

Commands

Index-driven interaction

webrain click <i> / webrain type <i> <text> / webrain eval <js> attach to the CDP_URL backend and operate on element indices — the same elements[] array that webrain_observe / webrain_navigate return over MCP:
Get the element list from the MCP side (webrain_observe what=state or what=a11y returns elements[] with these indices), or run webrain fetch <url> to load a page and see its element count. For CSS selectors use the MCP tools instead: webrain_observe what=html accepts a selector, webrain_extract mode=schema is driven entirely by selectors, and webrain_interact action=wait accepts a selector.

webrain doctor

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