/install browseros-agent
Browser Automation with BrowserOS
Control a real Chromium browser via browseros-cli. Run commands via Bash. Use --json for structured output, -p \x3CpageId> to target specific tabs.
When NOT to Use
- Headless scraping in CI/CD with no display — use Playwright or Puppeteer instead.
- Static page fetching where
curl/wgetsuffices.
Safety Defaults
- Default to read-only first:
snap,text,links,pages,ss. - Avoid
evalunless no simpler command works. - Save screenshots/PDFs only to user-specified or workspace paths.
- Close tabs when done:
browseros-cli close \x3CpageId>.
Setup
# Check if CLI is available
browseros-cli --version
# If not installed:
npm install -g browseros-cli
# If BrowserOS app is not installed:
browseros-cli install
# If BrowserOS is not running:
browseros-cli launch
# Configure connection:
browseros-cli init --auto
# Verify:
browseros-cli health
Core Workflow: snap → act → re-snap
Every interaction follows this loop:
- Open a page → get a page ID.
- Snap → get element IDs like
[10] textbox "Email",[15] button "Submit". - Act on elements by ID (
fill 10 "text",click 15). - Re-snap after ANY click, navigation, or form submit — IDs change after DOM updates.
Critical rules:
open \x3Curl>= new tab.nav \x3Curl>= navigate current tab.- NEVER reuse element IDs after navigation — always
snapagain. - Use
textfor content extraction,snapfor interaction,ssfor visual verification.
browseros-cli open https://example.com/login # → Page ID: 5
browseros-cli snap -p 5 # → [10] textbox "Email", [11] textbox "Password", [15] button "Sign In"
browseros-cli fill 10 "[email protected]"
browseros-cli fill 11 "password123"
browseros-cli click 15
browseros-cli snap -p 5 # Re-snap! IDs have changed after submit
browseros-cli text -p 5 # Read result page
browseros-cli close 5 # Clean up
Commands Quick Reference
| Category | Key Commands |
|---|---|
| Navigate | open \x3Curl>, open --hidden, nav \x3Curl>, back, forward, reload, pages, active, close [id] |
| Observe | snap, snap -e, text, text --selector \x3Ccss>, text --links, text --viewport, links, ss -o \x3Cpath>, ss --full, eval "\x3Cjs>", dom, dom-search "\x3Cq>", wait --text "\x3Ctxt>" |
| Input | click \x3Cid>, click --double, fill \x3Cid> "text", clear \x3Cid>, key Enter, hover \x3Cid>, focus \x3Cid>, check \x3Cid>, uncheck \x3Cid>, select \x3Cid> "val", scroll down [amt], drag \x3Cid> --to \x3Cid>, upload \x3Cid> \x3Cfile>, dialog accept/dismiss |
| Export | pdf \x3Cpath>, download \x3Cid> \x3Cdir> |
| Resources | window list/create/close/activate, bookmark list/search/create/remove/update/move, history recent/search/delete, group list/create/update/ungroup/close |
Full flags and options: see references/cli-commands.md or run browseros-cli \x3Ccommand> --help.
Common Patterns
Data extraction
browseros-cli open https://example.com/data
browseros-cli text # full page as markdown
browseros-cli text --selector "table" # scoped to element
browseros-cli text --links # include hyperlinks
Multi-tab research
browseros-cli open https://site-a.com # → Page ID: 1
browseros-cli open https://site-b.com # → Page ID: 2
browseros-cli text -p 1 # extract from first
browseros-cli text -p 2 # extract from second
browseros-cli close 1 && browseros-cli close 2
Web app testing
browseros-cli open http://localhost:3000
browseros-cli snap # get interactive elements
browseros-cli ss -o test-state.png # visual snapshot
browseros-cli eval "document.querySelectorAll('.error').length"
Common Mistakes
| Mistake | Fix |
|---|---|
Using CSS selectors (fill --selector "input[type=email]") |
Always snap first, then use element IDs (fill 10 "text") |
| Reusing element IDs after a click or navigation | IDs are invalidated by DOM changes — snap again |
Using eval to extract text |
Use text or text --selector instead — lower tokens, structured output |
| Forgetting to close tabs | Always close \x3CpageId> when done to avoid resource leaks |
Using nav when you want a new tab |
nav replaces the current tab. Use open for a new tab |
Using open when you want to stay in the same tab |
open creates a new tab. Use nav to navigate in place |
| Taking screenshots for content extraction | Use text for content — screenshots burn tokens and need vision |
Using dialog --accept (flag syntax) |
Correct syntax is dialog accept or dialog dismiss (positional arg) |
Deep-Dive Documentation
| Reference | Description |
|---|---|
| references/cli-commands.md | Full command reference with all flags |
Links
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install browseros-agent - After installation, invoke the skill by name or use
/browseros-agent - Provide required inputs per the skill's parameter spec and get structured output
What is BrowserOS CLI?
Use when a task requires interacting with a website beyond just reading it — clicking elements, filling forms, submitting data, navigating through multi-step... It is an AI Agent Skill for Claude Code / OpenClaw, with 116 downloads so far.
How do I install BrowserOS CLI?
Run "/install browseros-agent" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is BrowserOS CLI free?
Yes, BrowserOS CLI is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does BrowserOS CLI support?
BrowserOS CLI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created BrowserOS CLI?
It is built and maintained by BrowserOS (@browseros-ai); the current version is v1.0.0.