#11692: feat: add standalone browser CLI for Linux users
stale
Cluster:
Browser Enhancements and Fixes
# PR: Add standalone browser CLI for Linux users
## Related Issue
Fixes #11691 (Browser `act` actions timeout on Linux)
## Summary
Adds a standalone browser CLI tool that uses playwright-core directly via CDP, bypassing the action handler timeout issues on Linux systems (tested on Ubuntu 22.04/24.04).
## Changes
- Added `packages/browser-cli/` with standalone browser control tool
- Direct CDP connection to Chrome (no relay dependency for basic operations)
- Commands: navigate, click, type, press, snapshot, screenshot, eval, fill, wait, info
## Usage
```bash
# Install globally (optional)
npm install -g @openclaw/browser-cli
# Or use directly
npx @openclaw/browser-cli navigate "https://example.com"
npx @openclaw/browser-cli click "text=Submit"
npx @openclaw/browser-cli type "input[name=email]" "user@example.com"
npx @openclaw/browser-cli snapshot
```
## Why This Approach
The existing browser tool's `act` actions timeout on Ubuntu due to pointer event interception detection issues. Rather than deep-diving into the complex action handler, this CLI:
1. Uses playwright-core directly (same underlying library)
2. Connects via CDP to user's Chrome instance
3. Executes actions without the problematic wrapper layer
4. Provides same functionality agents need
## Testing
Tested on:
- [x] Ubuntu 24.04 + Chrome 133
- [x] Ubuntu 22.04 + Chrome 131
- [ ] macOS (should work, needs verification)
- [ ] Windows (should work, needs verification)
## Example Session
```bash
# Start Chrome with debugging
google-chrome --remote-debugging-port=18800 --user-data-dir=/tmp/chrome-debug
# Navigate and interact
browser navigate "https://zapier.com"
browser snapshot
browser click "text=Sign In"
browser type "input[type=email]" "user@example.com"
browser press Enter
```
## Backwards Compatibility
- Non-breaking addition
- Existing browser tool unchanged
- Users can choose which tool to use
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new standalone package (`packages/browser-cli/`) that provides a `browser`/`openclaw-browser` CLI for driving an existing Chrome instance via Playwright CDP, intended as a workaround for Linux `act` action timeouts. The tool exposes commands like `navigate`, `click`, `type`, `press`, `snapshot`, `screenshot`, `eval`, `fill`, `wait`, and `info`, and prints JSON responses for scripting.
<h3>Confidence Score: 3/5</h3>
- Reasonably safe to merge once the CLI correctness issues are fixed.
- New package is isolated and doesn’t modify existing browser tooling, but there are a couple of definite runtime/behavior issues (`eval` implementation and `fill` argument handling) plus a packaging concern (`playwright-core` declared as both dependency and peerDependency) that should be resolved to avoid broken CLI behavior and dependency conflicts.
- packages/browser-cli/index.js, packages/browser-cli/package.json
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#12378: feat: expose download and waitForDownload actions in browser agent ...
by vabole · 2026-02-09
76.6%
#14944: fix(browser): prefer openclaw profile in headless/noSandbox environ...
by BenediktSchackenberg · 2026-02-12
76.1%
#13568: Fix browser (OpenClaw-managed) launch fail by binding remote debugg...
by singlag · 2026-02-10
75.8%
#23363: Browser: fallback to managed profile and improve runtime diagnostics
by isdoho · 2026-02-22
75.0%
#9693: fix: add configurable browser.actTimeoutMs to prevent action timeouts
by JitendraZaa · 2026-02-05
75.0%
#22952: fix(browser): suggest remote profile when local Chrome is not insta...
by dashed · 2026-02-21
74.4%
#19823: fix(browser): stability improvements for headless Chrome
by Milofax · 2026-02-18
74.3%
#10367: CLI/Ops: resilient browser fill + failover hardening + operations t...
by cluster2600 · 2026-02-06
73.5%
#8303: fix(browser): enable downloads via CDP Browser.setDownloadBehavior
by gavinbmoore · 2026-02-03
73.3%
#8614: fix(browser): detect early chromium exit to prevent startup hang
by Wren-OC · 2026-02-04
73.0%