| name | browser-cli |
| description | Control Chrome browsers from the terminal via the AIPex extension. Use this skill when the agent needs to manage browser tabs, search page elements, click buttons, fill forms, capture screenshots, or download content — all through shell commands without an MCP client. |
| version | 1.0.0 |
| metadata | {"openclaw":{"requires":{"bins":["node","npm"]},"emoji":"🖥️","homepage":"https://github.com/AIPexStudio/browser-cli","os":["macos","linux","windows"]}} |
browser-cli — Terminal Browser Control
browser-cli is a command-line tool that controls Chrome browsers through the AIPex extension's WebSocket daemon. It translates shell commands into browser actions — managing tabs, clicking elements, filling forms, capturing screenshots, and more.
Architecture:
browser-cli ──WebSocket──▶ aipex-daemon ──WebSocket──▶ AIPex Chrome Extension ──▶ Browser APIs
The daemon auto-spawns on first use and self-terminates when idle. No manual setup beyond initial extension connection.
When to Use This Skill
Use this skill when the user wants to:
- Control a Chrome browser from the terminal without an MCP client
- Open, close, switch, or organize browser tabs via CLI
- Search for page elements and interact with them (click, fill, hover)
- Capture screenshots of browser tabs
- Automate browser workflows in shell scripts or CI pipelines
- Download page content as markdown or images
- Request human input during automated browser tasks
- Manage AIPex skills from the command line
Trigger phrases: "browser-cli", "control browser from terminal", "browser automation CLI", "click element from shell", "terminal browser control", "command line browser", "shell browser automation"
Installation
Prerequisites
- Node.js >= 18 installed
- AIPex Chrome extension installed (Chrome Web Store or developer build)
Install browser-cli
npm install -g browser-cli
Verify the installation:
browser-cli --version
Connect AIPex Extension
After installing, connect the AIPex Chrome extension to the daemon:
- Open Chrome → click the AIPex extension icon → Options
- Find the WebSocket Connection section
- Set WebSocket URL to
ws://localhost:9223/extension
- Click Connect
Verify the connection:
browser-cli status
A successful response:
{
"ok": true,
"data": {
"status": "ok",
"extensionConnected": true,
"bridgeClients": 0
}
}
Quick Start
browser-cli tab list
browser-cli tab new https://example.com
browser-cli page search "button*" --tab 123
browser-cli interact click btn-42 --tab 123
browser-cli page screenshot
Command Groups
tab — Manage browser tabs
browser-cli tab list
browser-cli tab current
browser-cli tab new https://example.com
browser-cli tab switch 42
browser-cli tab close 42
browser-cli tab info 42
browser-cli tab organize
browser-cli tab ungroup
page — Inspect and interact with page content
browser-cli page search "button*" --tab 123
browser-cli page search "{input,textarea}*" --tab 123
browser-cli page screenshot
browser-cli page screenshot-tab 123 --send-to-llm true
browser-cli page metadata --tab 123
browser-cli page scroll-to "#main-content"
browser-cli page highlight "button.submit"
browser-cli page highlight-text "p" "important"
interact — Click, fill, hover, and type
browser-cli interact click btn-42 --tab 123
browser-cli interact fill input-5 "hello world" --tab 123
browser-cli interact hover menu-3 --tab 123
browser-cli interact form --tab 123 --elements '[{"uid":"in-1","value":"foo"}]'
browser-cli interact editor editor-1 --tab 123
browser-cli interact upload --tab 123 --file-path /path/to/file
browser-cli interact computer --action left_click --coordinate "[500,300]"
download — Save content locally
browser-cli download markdown --text "# Notes" --filename notes
browser-cli download image --data "data:image/png;base64,..."
browser-cli download chat-images --messages '[...]' --folder imgs
intervention — Request human input
browser-cli intervention list
browser-cli intervention info voice-input
browser-cli intervention request voice-input --reason "Need input"
browser-cli intervention cancel
skill — Manage AIPex skills
browser-cli skill list
browser-cli skill load my-skill
browser-cli skill info my-skill
browser-cli skill run my-skill scripts/init.js
browser-cli skill ref my-skill references/guide.md
browser-cli skill asset my-skill assets/icon.png
Standalone commands
browser-cli status
browser-cli update
Workflow: Search, Interact, Verify
The recommended pattern for browser automation:
browser-cli tab list
browser-cli page search "{button,input,link}*" --tab 123
browser-cli interact click btn-submit --tab 123
browser-cli interact fill input-email "user@example.com" --tab 123
browser-cli page screenshot
Login form example
browser-cli page search "{input,textbox}*" --tab 123
browser-cli interact fill input-email "user@example.com" --tab 123
browser-cli interact fill input-pass "secret" --tab 123
browser-cli page search "*[Ll]ogin*" --tab 123
browser-cli interact click btn-login --tab 123
Shell script example
#!/bin/bash
browser-cli tab new https://example.com
sleep 2
TAB_ID=$(browser-cli tab current | jq '.data.id')
browser-cli page search "link*" --tab "$TAB_ID"
browser-cli page screenshot
Global Options
| Option | Default | Description |
|---|
--port <n> | 9223 | Daemon WebSocket port |
--host <h> | 127.0.0.1 | Daemon host address |
Environment Variables
| Variable | Default | Description |
|---|
BROWSER_CLI_WS_URL | ws://127.0.0.1:9223/cli | Override daemon WebSocket URL |
BROWSER_CLI_CONNECT_TIMEOUT | 60000 | Connection timeout (ms) |
Troubleshooting
| Symptom | Fix |
|---|
Daemon not running | Run any command to auto-spawn, or check with browser-cli status |
Extension is not connected | Open AIPex Options → WebSocket URL ws://localhost:9223/extension → Connect |
| Port 9223 in use | Use --port 9224 and update extension URL |
| Timeout after 60s | Verify extension is connected. Increase with BROWSER_CLI_CONNECT_TIMEOUT=120000 |
| 0 search results | Try different patterns. Fall back to page screenshot --send-to-llm true + interact computer |
| Wrong results | Verify tab ID with browser-cli tab list |