CLI
The CLI is the stable interface for agents and scripts.
Start with status and tab discovery:
abg statusabg tabs --compactabg inspectUse the returned tab reference, such as t1, with read-only commands:
abg read t1 --format markdownabg read t1 --selector article --format markdownabg frames t1abg get text t1 "h1"abg snapshot t1 --interactive-only --compactabg screenshot t1 --out page.pngabg console t1abg table t1 --format markdownabg network t1 --url "*api*"abg audit --lines 50Mutating commands operate on the same shared tab and can trigger a local approval prompt:
abg click t1 --selector "button.save"abg fill t1 --selector "input[name=email]" --value "me@example.com"abg paste t1 --selector "[contenteditable=true]" --stdinabg key t1 Enterabg upload t1 --selector "input[type=file]" --file ./report.pdfabg navigate t1 "https://example.com"abg revoke t1Targeting
Section titled “Targeting”Commands accept an explicit tab reference or match flags:
abg read --match-url "*notion.so*" --format markdownabg click --match-title "Dashboard" --selector "button.refresh"Use frames before selecting iframe content. Same-origin accessible frames receive refs such as
@f1:
abg frames t1abg read t1 --frame @f1 --selector "main" --format markdownRich editors
Section titled “Rich editors”Use fill for normal inputs and plain editable fields. Use paste when a rich editor ignores
synthetic value updates, and clear when you need to empty an editor first:
abg clear t1 --selector "[contenteditable=true]"printf "new content" | abg paste t1 --selector "[contenteditable=true]" --stdinThe audit log records selectors, action names, and byte lengths. It does not write pasted text into the audit log.
Escape hatch
Section titled “Escape hatch”Prefer named primitives such as get, find, wait, snapshot, and plugin commands. Use eval
only when those primitives are not enough:
abg eval t1 --script "document.title" --approveEval is disabled by default in the extension popup. When Trusted automation is off, --approve and
a local approval prompt are required for each eval call.