Cli Anything Browser logo

Cli Anything Browser

OrganizationPopular
HKUDS
cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome's Accessibility Tree to a virtual filesystem for agent-native navigation.

Overview

PublisherHKUDS
RepositoryCLI-Anything
Skill namecli-anything-browser
Stars
49.5K
Forks
4.6K
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by HKUDS on GitHub. Read the source before you install it.

Installation

Install the Cli Anything Browser AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HKUDS/CLI-Anything.git /tmp/CLI-Anything
mkdir -p .claude/skills
cp -r /tmp/CLI-Anything/browser/agent-harness/cli_anything/browser/skills .claude/skills/cli-anything-browser
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cli Anything Browser in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cli Anything Browser on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cli Anything Browser is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

  1. Node.js and npx (for DOMShell MCP server):

    bash
    # Install Node.js from https://nodejs.org/
    npx --version
  2. Chrome/Chromium with DOMShell extension:

    • Install extension in Chrome
    • Ensure Chrome is running before using CLI
  3. Python 3.10+

Install CLI

bash
cd browser/agent-harness
pip install -e .

Command Groups

page — Page Navigation

  • page open <url> — Navigate to URL
  • page reload — Reload current page
  • page back — Navigate back in history
  • page forward — Navigate forward in history
  • page info — Show current page info

fs — Filesystem Commands (Accessibility Tree)

  • fs ls [path] — List elements at path
  • fs cd <path> — Change directory
  • fs cat [path] — Read element content
  • fs grep <pattern> [path] — Search for text pattern
  • fs pwd — Print working directory

act — Action Commands

  • act click <path> — Click an element
  • act type <path> <text> — Type text into input

session — Session Management

  • session status — Show session state
  • session daemon-start — Start persistent daemon mode
  • session daemon-stop — Stop daemon mode

Usage Examples

Basic Navigation

bash
# 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

bash
cli-anything-browser fs grep "Login"
cli-anything-browser act click /main/button[0]

Form Fill

bash
cli-anything-browser act type /main/input[0] "user@example.com"
cli-anything-browser act click /main/button[0]

JSON Output

bash
cli-anything-browser --json fs ls /

Daemon Mode (Faster Interactive Use)

bash
# 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

bash
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:

bash
cli-anything-browser --json fs ls /

Returns:

json
{
  "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:

  1. Start daemon: cli-anything-browser session daemon-start
  2. Run commands: Each command reuses the MCP connection
  3. 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:// or https:// scheme (scheme-less URLs like example.com are rejected)
  • Blocked schemes: file://, javascript://, data://, vbscript://, about://, chrome://, and browser-internal schemes
  • Allowed schemes: http:// and https:// only (configurable via CLI_ANYTHING_BROWSER_ALLOWED_SCHEMES)
  • Private network blocking: Optional via CLI_ANYTHING_BROWSER_BLOCK_PRIVATE=true (disabled by default)

DOM Content Risks

The Accessibility Tree includes all visible and hidden elements on a page. Malicious websites could:

  • Craft ARIA labels with manipulative text (e.g., "Ignore previous instructions")
  • Use aria-hidden elements to inject content not visible to users
  • Create confusing DOM structures that mislead navigation

Mitigation: When interacting with untrusted websites, consider:

  1. Using the --json flag for structured output that's easier to parse safely
  2. Sanitizing or filtering DOM content before including it in prompts
  3. Limiting navigation to trusted domains

Private Network Access

By default, the browser can access localhost and private networks (192.168.x.x, 10.x.x.x, etc.). To block:

bash
export CLI_ANYTHING_BROWSER_BLOCK_PRIVATE=true
cli-anything-browser page open http://localhost:8080  # Will be blocked

Session Isolation

Multiple browser sessions share the same Chrome instance. Cookies and authentication state may persist across sessions. For sensitive operations, consider:

  1. Using Chrome's guest mode or incognito
  2. Clearing cookies between sessions
  3. Using separate Chrome profiles for different security contexts

Frequently asked questions

What does the Cli Anything Browser AI skill do?

Browser automation CLI using DOMShell MCP server. Maps Chrome's Accessibility Tree to a virtual filesystem for agent-native navigation.

Why use Cli Anything Browser on TypingMind?

Because you install it once and use it with any model. Cli Anything Browser is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cli Anything Browser in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HKUDS/CLI-Anything/tree/main/browser/agent-harness/cli_anything/browser/skills. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cli Anything Browser?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cli Anything Browser?

As many as you like. As long as a model supports skills, you can use Cli Anything Browser with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cli Anything Browser AI skill free?

Yes. It is published on GitHub by HKUDS under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇