| name | browser-use-cli |
| description | 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. |
| whenToUse | Use for interactive pages, JS-rendered content, local web testing, or authenticated web work that web_fetch cannot do. |
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
- Plain public content that a direct fetch can read: use the web fetch tool, not a browser.
- Interaction or JS rendering without login state: use an isolated browser (the default below).
- 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
- Check availability with
browser-use --help (or uvx browser-use --help).
- If it is not installed, ask the user before running
uv tool install browser-use: installing software changes the machine.
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)"
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--remote-debugging-port=9222 --user-data-dir= \
--no-first-run --headless=new &
BU_CDP_URL=http://127.0.0.1:9222