| name | browse |
| description | Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling or page inspection. |
Browse Browser Automation
Control Chrome browser via CLI.
CLI Quick Reference
browse --help
browse <group>
browse --list
browse --find <term>
Core Workflow
browse tab.new "https://example.com"
browse page.read
browse click --ref "e1"
browse click --x 100 --y 200
browse type --text "hello"
browse screenshot --output /tmp/shot.png
Navigation
browse tab.new "https://example.com"
browse navigate "https://other-page.com"
Use tab.new to open a new page or start a task.
Use navigate only to change URL in an already open tab.
Tab Management
browse tab.list
browse tab.new "https://google.com"
browse tab.switch 12345
browse tab.close 12345
browse tab.name myapp
browse tab.switch myapp
browse tab.named
Window Management
browse window.list
browse window.new
browse window.new --url "https://example.com"
browse window.new --incognito
browse window.focus 12345
browse window.close 12345
browse window.resize --width 1920 --height 1080
Input Methods
browse type --text "hello"
browse click --x 100 --y 200
browse type --text "hello" --selector "#input" --method js
browse key Enter
browse key "cmd+a"
browse key.repeat --key Tab --count 5
Page Inspection
browse page.read
browse page.read --ref e5
browse page.read --all
browse page.text
browse page.state
When to use which:
page.text - Get full page text content. No size limit. Best for reading/understanding page content.
page.read - Get element refs for visible viewport. Use when you need to interact (click, type).
page.read --all - All elements with refs. Can fail on large pages (50K char limit).
Note: page.read returns only elements in the visible viewport. Refs remain valid for off-screen elements - you can still click e5 even after scrolling. Use scroll.to --ref e5 to bring an element into view.
Scrolling
browse scroll down
browse scroll up
browse scroll down --amount 5
browse scroll.bottom
browse scroll.top
browse scroll.to --ref e5
browse scroll.info
Waiting
browse wait 2
browse wait.element ".loaded"
browse wait.network
browse wait.url "/success"
browse wait.dom --stable 100
browse wait.load
Dialog Handling
browse dialog.info
browse dialog.accept
browse dialog.accept --text "response"
browse dialog.dismiss
Device/Network Emulation
browse emulate.network slow-3g
browse emulate.network reset
browse emulate.cpu 4
browse emulate.cpu 1
browse emulate.device "iPhone 14"
browse emulate.device --list
browse emulate.geo --lat 37.7749 --lon -122.4194
browse emulate.geo --clear
Form Automation
browse page.read
browse form.fill --data '[{"ref":"e1","value":"John"},{"ref":"e2","value":"john@example.com"}]'
browse form.fill --data '[{"ref":"e7","value":true}]'
File Upload
browse upload --ref e5 --files "/path/to/file.txt"
browse upload --ref e5 --files "/path/file1.txt,/path/file2.txt"
Network Inspection
browse network
browse network --stream
browse network.body --id "req-123"
browse network.clear
Console
browse console
browse console --stream
browse console --stream --level error
JavaScript Execution
browse js "return document.title"
browse js "document.querySelector('.btn').click()"
Iframe Handling
browse frame.list
browse frame.js --id "FRAME_ID" --code "return document.title"
Performance
browse perf.metrics
browse perf.start
browse perf.stop
Screenshots
browse screenshot
browse screenshot --output /tmp/shot.png
browse screenshot --selector ".card"
browse screenshot --full-page
Cookies & Storage
browse cookies
browse cookies --domain .google.com
browse cookie.set --name "token" --value "abc123"
browse cookie.delete --name "token"
History & Bookmarks
browse history --query "github" --max 20
browse bookmarks --query "docs"
browse bookmark.add --url "https://..." --title "My Bookmark"
Health Checks & Smoke Tests
browse health --url "http://localhost:3000"
browse smoke --urls "http://localhost:3000" "http://localhost:3000/about"
browse smoke --urls "..." --screenshot /tmp/smoke
Error Diagnostics
browse wait.element ".missing" --auto-capture --timeout 2000
Common Options
--tab-id <id>
--json
--auto-capture
--timeout <ms>
Tips
- First CDP operation is slow (~5-8s) - debugger attachment overhead, subsequent calls fast
- Use refs from page.read for reliable element targeting over CSS selectors
- JS method for contenteditable - Modern editors (Notion, etc.) need
--method js
- Named tabs for multi-step tasks -
tab.name app then tab.switch app
- Auto-capture for debugging -
--auto-capture saves diagnostics on failure