npx skills add ...
npx skills add hkuds/cli-anything --skill cli-anything-browser
Browser automation CLI using DOMShell MCP server. Maps Chrome's Accessibility Tree to a virtual filesystem for agent-native navigation.
npx skills add hkuds/cli-anything --skill 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.
Node.js and npx (for DOMShell MCP server):
Chrome/Chromium with DOMShell extension:
Python 3.10+
page — Page Navigationpage open <url> — Navigate to URLpage reload — Reload current pagepage back — Navigate back in historypage forward — Navigate forward in historypage info — Show current page infofs — 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 directoryact — Action Commandsact click <path> — Click an elementact type <path> <text> — Type text into inputsession — Session Managementsession status — Show session statesession daemon-start — Start persistent daemon modesession daemon-stop — Stop daemon modeDOMShell uses a filesystem-like path for the Accessibility Tree:
button[0] is the first button.. to go up one level/ for rootAll commands support --json flag for machine-readable output:
Returns:
The CLI provides clear error messages for common issues:
npx @apireno/domshell --versionCheck is_available() return value before running commands.
For agent workflows with multiple commands, use daemon mode:
cli-anything-browser session daemon-startcli-anything-browser session daemon-stopThis avoids the 1-3 second cold start overhead for each command.
IMPORTANT: When using this CLI with AI agents, be aware of the following security considerations:
The browser harness validates all URLs before navigation:
http:// or https:// scheme (scheme-less URLs like example.com are rejected)file://, javascript://, data://, vbscript://, about://, chrome://, and browser-internal schemeshttp:// and https:// only (configurable via CLI_ANYTHING_BROWSER_ALLOWED_SCHEMES)CLI_ANYTHING_BROWSER_BLOCK_PRIVATE=true (disabled by default)The Accessibility Tree includes all visible and hidden elements on a page. Malicious websites could:
Mitigation: When interacting with untrusted websites, consider:
--json flag for structured output that's easier to parse safelyBy default, the browser can access localhost and private networks (192.168.x.x, 10.x.x.x, etc.). To block:
Multiple browser sessions share the same Chrome instance. Cookies and authentication state may persist across sessions. For sensitive operations, consider: