Browser use cli

From amplifthq/oh-my-dsh · View interactive version

Browser use cli is an AI agent skill from the GitHub repository amplifthq/oh-my-dsh. Drive a real browser from the shell with the browser-use CLI when a task needs page interaction, rendered DOM, or a logged-in session.

How to use this skill

Skill file

Browser work with the browser-use CLI

Script-mode browsing: write Python, pipe it to browser-use over a heredoc, and it drives a Chromium-family browser over CDP. One shell command replaces a dozen per-click tool calls. Every run goes through normal shell command approval.

Decide first

  1. Plain public content that a direct fetch can read: use the web fetch tool, not a browser.
  2. Interaction or JS rendering without login state: use an isolated browser (the default below).
  3. The user's logged-in Chrome session: only when the user explicitly asked for it. Chrome shows an "Allow remote debugging?" popup; the user must approve it themselves. Never look for a way around that consent.

Availability and setup

Isolated browser is the default

Launch a dedicated browser with a throwaway profile and attach to it, instead of touching the user's real browser:

BU_PROFILE="$(mktemp -d)"
# macOS:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --remote-debugging-port=9222 --user-data-dir="$BU_PROFILE" \
  --no-first-run --headless=new &
# Linux: replace the binary with google-chrome or chromium.
export BU_CDP_URL=http://127.0.0.1:9222

Drop --headless=new when the user wants to watch. This isolated flow needs no consent popup because it carries no user credentials. Kill this browser and remove the profile directory when the task ends.

Session discipline

Usage

ANONYMIZED_TELEMETRY=false browser-use <<'PY'
new_tab("https://example.com")
wait_for_load()
print(page_info())
PY

Reference

For mechanics such as iframes, downloads, dialogs, uploads, and shadow DOM, read the interaction guides at https://github.com/browser-use/browser-harness/tree/main/interaction-skills before inventing an approach.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.