# Browse CLI

> Single CLI your AI agents need to access the internet reliably.

```bash
npm install -g browse
```

## Main features:
1. **Browser interactions** — Navigate tricky and complex websites with `browse click`, `browse mouse scroll`, `browse type`, `browse select`, and 20+ more DOM manipulation commands.
2. **Web skills catalog** — `browse` is the official CLI for [browse.sh](https://browse.sh), the largest open web catalog. Your agent can run `browse skills add apartments.com` to learn how to use that website and APIs.
3. **Rich debugging** — Arm your agents with network, console, and other web telemetry.
4. **Cloud features** — Optionally use Browserbase cloud features, such as loading cookies via saved [Contexts](https://docs.browserbase.com/platform/browser/core-features/contexts), using [Verified Browsers](https://www.browserbase.com/verified), and the [Fetch and Search APIs](https://www.browserbase.com/search).


## Driver Commands

```bash
browse open https://example.com
browse open https://example.com --local --headed
browse open https://example.com --remote
browse open https://example.com --auto-connect
browse open https://example.com --cdp 9222
browse open https://example.com --cdp ws://127.0.0.1:9222/devtools/browser/<id> --target-id <target-id>
browse snapshot --compact
browse click @0-12
browse fill @0-8 "hello"
browse mouse click 240 320
browse get title
browse screenshot --path page.png
browse tab list
browse tab switch <target-id>
browse network on
browse cdp 9222 --pretty
browse status
browse stop
```

Use `--local`, `--remote`, `--auto-connect`, or `--cdp <url|port>` per command to choose the browser target. Use `--target-id <id>` with `--cdp` when attaching to a specific CDP target. Driver commands use `BROWSERBASE_API_KEY` for remote Browserbase sessions.

[!NOTE]
Security note: `browse network on` writes request/response headers and bodies to a local owner-only capture directory. These files can include cookies, authorization headers, and other secrets, so use network capture only on trusted machines and run `browse network clear` when done.

## Open Web Skills Catalog

Your CLI can directly use [browse.sh](https://browse.sh), the largest open-source catalog of skills to reliably perform any task on the internet. For example, find a specialized skill to navigate `apartments.com` and reduce your agent time and token costs drastically.


```bash
browse skills install
browse skills list
browse skills find reviews
browse skills find yelp.com/extract-reviews
browse skills add yelp.com/extract-reviews
browse skills add mcdonalds.order.online/order-delivery-42q71n
```

`browse skills install` installs the bundled `browse` CLI skill from this package.
`browse skills list` lists the public Browse.sh skill catalog.
`browse skills find` searches the public Browse.sh skill catalog by slug, domain, title, description, category, alias, or tag.
`browse skills add` installs catalog skills from `browserbase/browse.sh` or generated skills from Browserbase-hosted public storage.

## Browserbase Cloud Commands

```bash
browse --help
browse cloud --help
browse cloud projects list
browse cloud projects get <project-id>
browse cloud projects usage <project-id>
browse cloud sessions list
browse cloud sessions get <session-id>
browse cloud sessions create
browse cloud sessions update <session-id>
browse cloud sessions debug <session-id>
browse cloud sessions logs <session-id>
browse cloud sessions downloads get <session-id>
browse cloud sessions uploads create <session-id> <file>
browse cloud contexts create
browse cloud contexts get <context-id>
browse cloud contexts update <context-id>
browse cloud contexts delete <context-id>
browse cloud extensions upload <file>
browse cloud extensions get <extension-id>
browse cloud extensions delete <extension-id>
browse cloud fetch <url>
browse cloud search <query>
```

`browse cloud fetch` requests markdown-formatted page content by default. Use `--format raw` for the original response body, or `--format json --schema <schema>` for structured extraction.

## Functions Commands

Browserbase [Functions](https://docs.browserbase.com/platform/runtime/overview) let you deploy browser agents or automation scripts directly onto Browserbase’s infrastructure. Start in your local environment, configure agents or write browser scripts, test them instantly, and deploy directly as cloud functions invokable as APIs.


```bash
browse functions init my-function
browse functions dev index.ts
browse functions publish index.ts
browse functions publish index.ts --dry-run
browse functions invoke <function-id> --params '{"url":"https://example.com"}'
browse functions invoke --check-status <invocation-id>
```
