- name
- opencli-browser
- description
- Drive Chrome with OpenCLI to inspect pages, interact with logged-in sites, capture API evidence, and manage native tabs, groups and windows. For reusable adapters, see opencli-adapter-author.
- allowed-tools
- Bash(opencli:*), Read, Edit, Write
Browser tools for agents
Use the capability that fits the task. Discover commands with opencli list <query>;
read exact arguments with opencli browser <command> --help -f json.
Run opencli doctor when diagnosing a connection problem.
Scope and results
Page commands require --session <name>. Reuse that name across a task; different
sessions isolate page work. --profile <name> selects a Chrome profile when needed.
Options can follow command arguments:
opencli browser open https://example.com --session research
opencli browser state --session research
opencli browser click --role button --name Search --session research
opencli browser close --session research
Default output is one JSON value: { "ok": true, "data": ... }.
Failures return { "ok": false, "error": { "code": "...", "message": "...", "hint": "..." } }
and a nonzero exit code. Diagnostic logs go to stderr. network --follow and
console --follow stream one envelope per line. Help, version and shell completion
are inspection/export surfaces; structured help uses --help -f json.
Read the returned data and error fields. When error.outcome is unknown, inspect
the affected state before retrying a write.
Page targets and interaction
statereturns URL and interactive element refs.--diagnosticsalso reports page title and available initial-state globals;--source axselects the AX tree.findlocates elements. Interaction targets accept a ref, CSS selector, or semantic flags such as--role,--name,--label,--text,--testid.- Use
--nthto resolve deliberate multiple matches. On stale refs, read fresh state or locate the element again; refs describe the observed page. fillreplaces a field and verifies its value;typetypes text. Other actions includeclick,select,check,upload,drag,keysanddialog.get text|value|attributes|html, , and expose page data. executes JavaScript in the page and can mutate state.