docs
First run
Install fastbrowse with uv, choose a cloud or local browser, and run a first task from the command line.
fastbrowse.ai·all docs·source at the pinned commit·Raw Markdown·llms.txt
Try it
Needs uv; uv fetches Python itself (3.13 or newer). Runs use a
Browser Use Cloud browser (BROWSER_USE_API_KEY) by default: it passes bot checks
a fresh local Chrome fails. Local Chrome is fully supported with --local. A browser already running anywhere,
from a container to a hosted browser with a CDP endpoint, is driven in place with --cdp-url ws://… or
--cdp-port 9222: the run opens one tab and leaves the browser as it was found. To drive a window that is
already open, such as an Electron app, see Open windows and Electron apps.
A Node program needs neither uv nor Python: see Use it from JavaScript.
export OPENROUTER_API_KEY=... # for Jev and the LLM that plans and reads
# export AI_GATEWAY_API_KEY=... # Vercel AI Gateway: Jev backup, and the LLM when OPENROUTER_API_KEY is unset
export BROWSER_USE_API_KEY=... # the cloud browser; or pass --local to use Chrome
uvx fastbrowse "What is the title of the top story right now?" --start https://news.ycombinator.com/
Jev uses direct TypeSafe when TYPESAFE_API_KEY is supplied; otherwise OpenRouter is primary.
Vercel AI Gateway is supported as a backup or an explicit primary. FASTBROWSE_JEV_SOURCE overrides
automatic selection; see provider routing. The LLM uses OpenRouter when
OPENROUTER_API_KEY is set, otherwise the Vercel AI Gateway's OpenAI-compatible chat completions.
uvx runs the published package in an isolated cached environment. uv tool install fastbrowse keeps it on your
PATH, and uv add fastbrowse puts it in a project. Service keys can live in a .env file in the working directory;
.env.example shows the settings. Values named by --secret must be in the process environment.
Steps go to stderr; the status, cost, step count and answer go to stdout. --json prints every step,
the quotes behind the answer, and cost by component.
| Flag | Effect |
|---|---|
--start URL | the page to open first; worked out from the task when omitted |
--cloud | force cloud Chrome even when FASTBROWSE_PROFILE or FASTBROWSE_HEADED is set |
--local | use local Chrome instead of a Browser Use Cloud browser. Cloud is the default: it passes bot checks a fresh Chrome fails, and prints a URL to watch the run live |
--headed | show the local Chrome window (implies --local) |
--profile DIR | keep the local Chrome profile in DIR, so a site signed into there stays signed in (implies --local) |
--cloud-profile ID | run on a Browser Use Cloud profile, signed in as whoever set it up |
--cdp-url URL | drive a browser already running at this ws:// or wss:// DevTools URL instead of starting one |
--cdp-port PORT | the same, for a browser or Electron app listening on 127.0.0.1:PORT; the URL is read from its /json/version |
--attach | with --cdp-url or --cdp-port, drive a window already open instead of opening a tab, and leave it open after the run |
--target-match TEXT | attach to the first window whose title or URL contains TEXT (implies --attach) |
--proxy-country CC | browse from that country (Browser Use's codes: uk, de, ...; default us), so a shop shows its local delivery and prices |
--authorize | allow submit, pay, delete and send; without it the run stops at needs_confirmation first |
--secret NAME=ENV_VAR[@ORIGIN] | let the agent type $ENV_VAR on the declared origin, or the --start origin if omitted; models only see NAME. An explicit origin needs no --start |
--bitwarden ITEM | match the vault login's saved URIs against --start, then allow its username, password and, when the item holds an authenticator key, one_time_code only on that start origin |
--max-steps N, --max-dollars N | optionally bound steps and model spend; defaults are unlimited. Cloud browser charges are added when it stops |
--downloads DIR | keep downloaded files |
--json | full result instead of the answer |
--record FILE | save an MP4 of the tab, each step captioned, ending on the answer, time and cost (needs ffmpeg; the captions need its libass), e.g. recordings/demo.mp4, which git ignores; demo.plain.mp4 beside it has no captions. It shows what the pages showed, so watch it before sharing |
--cursor | draw the agent's cursor over a visible Chrome (--headed, or one you attach to) with Cua Driver, so you can watch where it acts. Off by default. It needs cua-driver on PATH and an X11 display on Linux, and does nothing without them |
export SAUCE_PASSWORD=secret_sauce
uv run fastbrowse "Log in as standard_user with the saved password and add the backpack to the cart." \
--start https://www.saucedemo.com/ --secret password=SAUCE_PASSWORD --authorize