cli-anything-browser
What it does
This skill lets your agent move around a web page open in Chrome using folder-style commands, such as listing items, opening sections, and clicking. It is for people who want their AI to use websites through a simple command interface.
When to use it
- βWhen you want your agent to find and click something on a web page open in Chrome.
- βWhen you want to read the text of a page section without taking a screenshot.
- βWhen you want to search a web page for a particular word or phrase.
Skill link
https://github.com/HKUDS/CLI-Anything/blob/main/browser/agent-harness/cli_anything/browser/skills/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βOpen the pricing page in Chrome and find where it lists the enterprise plan.β
5 new skills a week. 1 minute to read.
How it works
The skill connects to the DOMShell extension in Chrome, which turns the page's structure into a folder-like view. Your agent then uses commands such as ls, cd, cat, and grep to explore, and click or type when needed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
cli-anything-browser
A command-line interface for browser automation using DOMShell's MCP server. Navigate web pages using filesystem commands: ls, cd, cat, grep, click.
Installation
Prerequisites
Node.js and npx (for DOMShell MCP server):
# Install Node.js from https://nodejs.org/ npx --versionChrome/Chromium with DOMShell extension:
- Install extension in Chrome
- Ensure Chrome is running before using CLI
Python 3.10+
Install CLI
cd browser/agent-harness
pip install -e .
Command Groups
page β Page Navigation
page open <url>β Navigate to URLpage reloadβ Reload current pagepage backβ Navigate back in historypage forwardβ Navigate forward in historypage infoβ Show current page info
fs β Filesystem Commands (Accessibility Tree)
fs ls [path]β List elements at pathfs cd <path>β Change directoryfs cat [path]β Read element contentfs grep <pattern> [path]β Search for text patternfs pwdβ Print working directory
act β Action Commands
act click <path>β Click an elementact type <path> <text>β Type text into input
session β Session Management
session statusβ Show session statesession daemon-startβ Start persistent daemon modesession daemon-stopβ Stop daemon mode
Usage Examples
Basic Navigation
# Open a page
cli-anything-browser page open https://example.com
# Explore structure
cli-anything-browser fs ls /
cli-anything-browser fs cd /main
cli-anything-browser fs ls
# Go back to root
cli-anything-browser fs cd /
Search and Click
cli-anything-browser fs grep "Login"
cli-anything-browser act click /main/button[0]
Form Fill
cli-anything-browser act type /main/input[0] "user@example.com"
cli-anything-browser act click /main/button[0]
JSON Output
cli-anything-browser --json fs ls /
Daemon Mode (Faster Interactive Use)
# Start persistent connection
cli-anything-browser session daemon-start
# Run commands (uses persistent connection)
cli-anything-browser fs ls /
cli-anything-browser fs cd /main
# Stop daemon when done
cli-anything-browser session daemon-stop
Interactive REPL
cli-anything-browser
Path Syntax
DOMShell uses a filesystem-like path for the Accessibility Tree:
/ β Root (document)
/main β Main landmark
/main/div[0] β First div in main
/main/div[0]/button[2] β Third button in first div
- Array indices are 0-based:
button[0]is the first button - Use
..to go up one level - Use
/for root
Agent-Specific Guidance
JSON Output for Parsing
All commands support --json flag for machine-readable output:
cli-anything-browser --json fs ls /
Returns:
{
"path": "/",
"entries": [
{"name": "main", "role": "landmark", "path": "/main"}
]
}
Error Handling
The CLI provides clear error messages for common issues:
- npx not found: Install Node.js from https://nodejs.org/
- DOMShell not found: Run
npx @apireno/domshell --version - MCP call failed: Install DOMShell Chrome extension
Check is_available() return value before running commands.
Daemon Mode for Efficiency
For agent workflows with multiple commands, use daemon mode:
- Start daemon:
cli-anything-browser session daemon-start - Run commands: Each command reuses the MCP connection
- Stop daemon:
cli-anything-browser session daemon-stop
This avoids the 1-3 second cold start overhead for each command.
Links
Security Considerations
IMPORTANT: When using this CLI with AI agents, be aware of the following security considerations:
URL Restrictions
The browser harness validates all URLs before navigation:
- Explicit scheme required: URLs must include
http://orhttps://scheme (scheme-less URLs likeexample.comare rejected) - Blocked schemes:
file://,javascript://,data://,vbscript://,about://,chrome://, and browser-internal schemes - **Al
FAQ
What do I need installed?
You need Node.js, Chrome with the DOMShell extension, and Python 3.10 or newer.
Does Chrome need to be open?
Yes, Chrome must be running before the skill is used.
Can it fill in forms?
Yes, it can type text into input fields as well as click elements.
Details
Original description by the author
Browser automation CLI using DOMShell MCP server. Maps Chrome's Accessibility Tree to a virtual filesystem for agent-native navigation.
repo: HKUDS/CLI-Anything
Popularity
- GitHub stars
- 58k
- Ranking position
- #3185
- License
- Apache-2.0
- Updated
- 9/21/2026
Comments
- β¦
More skills from this repository
cli-anything-3mf
58kLets your agent inspect and fix 3D printing files, including finding round holes, resizing them, repairing meshes, and comparing two files.
cli-anything-qgis
58kLets your agent open, edit, and export QGIS map projects from the terminal, including layers, features, print layouts, and processing tools.
cli-anything-adguardhome
58kLets your agent manage AdGuard Home, a network-wide ad blocker, including filters, DNS rewrites, clients, and query logs.
cli-anything-anygen
58kLets your agent generate slides, documents, websites, and diagrams from a written prompt using the AnyGen service.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.