diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 8a4b8f00..793ecf42 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -39,21 +39,6 @@ "./skills/functions" ] }, - { - "name": "browserbase-cli", - "source": "./", - "description": "Use the Browserbase CLI (`bb`) for Browserbase Functions and platform API workflows. Use when the user asks to run `bb`, deploy or invoke functions, manage sessions, projects, contexts, or extensions, fetch a page through the Browserbase Fetch API, or open the Browserbase dashboard from the command line.", - "version": "0.0.1", - "author": { - "name": "Browserbase" - }, - "category": "automation", - "keywords": ["browserbase", "cli", "bb", "functions", "sessions", "fetch"], - "strict": false, - "skills": [ - "./skills/browserbase-cli" - ] - }, { "name": "browser-trace", "source": "./", diff --git a/README.md b/README.md index 6b06aea7..4d5f8cda 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ This plugin includes the following skills (see `skills/` for details): | Skill | Description | |-------|-------------| | [browser](skills/browser/SKILL.md) | Automate web browser interactions via CLI commands — supports remote Browserbase sessions with Browserbase Identity, Verified browsers, CAPTCHA solving, and residential proxies | -| [browserbase-cli](skills/browserbase-cli/SKILL.md) | Use the official `browse` CLI for Browserbase Functions and platform API workflows including sessions, projects, contexts, extensions, fetch, and dashboard | | [functions](skills/functions/SKILL.md) | Deploy serverless browser automation to Browserbase cloud using the `browse` CLI | | [browser-trace](skills/browser-trace/SKILL.md) | Capture a full DevTools-protocol trace (CDP firehose, screenshots, DOM dumps) alongside any browser automation, then bisect the stream into per-page searchable buckets | | [browser-to-api](skills/browser-to-api/SKILL.md) | Turn a website's observable HTTP traffic into a best-effort OpenAPI 3.1 spec by analyzing a `browser-trace` capture | diff --git a/skills/browserbase-cli/LICENSE.txt b/skills/browserbase-cli/LICENSE.txt deleted file mode 100644 index f2f43974..00000000 --- a/skills/browserbase-cli/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Browserbase, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/skills/browserbase-cli/REFERENCE.md b/skills/browserbase-cli/REFERENCE.md deleted file mode 100644 index 99bfc27d..00000000 --- a/skills/browserbase-cli/REFERENCE.md +++ /dev/null @@ -1,251 +0,0 @@ -# Browserbase CLI Reference - -## Table of Contents - -- [Setup](#setup) -- [Authentication and flags](#authentication-and-flags) -- [Functions](#functions) -- [Platform APIs](#platform-apis) -- [Fetch API](#fetch-api) -- [Search API](#search-api) -- [Templates](#templates) -- [Local & remote browser driving](#local--remote-browser-driving) -- [Skills](#skills) -- [Troubleshooting](#troubleshooting) - -## Setup - -Install the CLI if needed: - -```bash -npm install -g browse -``` - -Check the available surface with: - -```bash -browse --help -browse functions --help -browse cloud sessions --help -``` - -## Authentication and flags - -All authenticated commands require an API key: - -```bash -export BROWSERBASE_API_KEY="your_api_key" -``` - -### Platform API commands - -These command groups share a common flag shape: - -- `browse cloud projects` -- `browse cloud sessions` -- `browse cloud contexts` -- `browse cloud extensions` -- `browse cloud fetch` -- `browse cloud search` - -Common flags: - -- `--api-key ` -- `--base-url ` - -### Functions commands - -`browse functions ...` is slightly different: - -- uses `--base-url ` for API base URL overrides -- reads the API key and project from environment variables by default - -## Functions - -### Initialize a project - -```bash -browse functions init my-function -browse functions init my-function --package-manager npm -``` - -### Run local development - -```bash -browse functions dev index.ts -browse functions dev index.ts --port 14113 --host 127.0.0.1 --verbose -``` - -### Publish - -```bash -browse functions publish index.ts -browse functions publish index.ts --dry-run -``` - -Use `--dry-run` when you want to inspect what would be packaged without uploading. - -### Invoke - -```bash -browse functions invoke --params '{"url":"https://example.com"}' -browse functions invoke --no-wait -browse functions invoke --check-status -``` - -## Platform APIs - -### Projects - -```bash -browse cloud projects list -browse cloud projects get -browse cloud projects usage -``` - -### Sessions - -```bash -browse cloud sessions list -browse cloud sessions list --q "user_metadata['userId']:'123'" -browse cloud sessions get -browse cloud sessions create --proxies --verified -browse cloud sessions create --region us-east-1 --timeout 300 -browse cloud sessions create --solve-captchas --context-id ctx_abc --persist -browse cloud sessions create --body '{"proxies":[{"type":"browserbase","geolocation":{"country":"US"}}]}' -echo '{"proxies":true}' | browse cloud sessions create --stdin -browse cloud sessions update --status REQUEST_RELEASE -browse cloud sessions debug -browse cloud sessions logs -browse cloud sessions downloads get --output session-artifacts.zip -browse cloud sessions uploads create ./file.txt -``` - -#### `sessions create` flags - -Use flags for common options instead of building `--body` JSON manually: - -| Flag | Description | -|------|-------------| -| `--proxies` | Enable Browserbase proxy | -| `--verified` | Enable Browserbase Verified browser mode | -| `--solve-captchas` / `--no-solve-captchas` | Toggle automatic CAPTCHA solving | -| `--block-ads` | Enable ad blocking | -| `--region ` | Session region (`us-west-2`, `us-east-1`, `eu-central-1`, `ap-southeast-1`) | -| `--keep-alive` | Keep session alive after disconnection | -| `--timeout ` | Session timeout in seconds | -| `--context-id ` | Browserbase context ID for persistent state | -| `--persist` | Persist context changes after session ends | -| `--record-session` / `--no-record-session` | Toggle session recording | -| `--log-session` / `--no-log-session` | Toggle session logging | -| `--viewport ` | Browser viewport dimensions (e.g. `1920x1080`) | -| `--extension-id ` | Chrome extension ID to load | -| `--body ` | Full JSON request body (merged with flags) | -| `--stdin` | Read JSON request body from stdin | - -When both `--status` and `--body` are present on `browse cloud sessions update`, the CLI merges them. - -### Contexts - -```bash -browse cloud contexts create --body '{"region":"us-west-2"}' -browse cloud contexts get -browse cloud contexts delete -``` - -`browse cloud contexts update ` refreshes context upload URLs, but context uploads through this API are deprecated and may return a deprecation error. Avoid it unless Browserbase support has asked you to use that path. - -### Extensions - -```bash -browse cloud extensions upload ./my-extension.zip -browse cloud extensions get -browse cloud extensions delete -``` - -## Fetch API - -Use `browse cloud fetch` when the user wants Browserbase Fetch specifically or wants the request to stay inside the CLI workflow. - -```bash -browse cloud fetch https://example.com -browse cloud fetch https://example.com --allow-redirects -browse cloud fetch https://self-signed.example.com --allow-insecure-ssl -browse cloud fetch https://example.com --proxies --output page.html -``` - -Prefer the `browser` skill when the target page requires JavaScript execution or page interaction. - -## Search API - -Use `browse cloud search` to find web pages by query without opening a browser session. - -```bash -browse cloud search "browser automation" -browse cloud search "web scraping best practices" --num-results 5 -browse cloud search "AI agents" --output results.json -``` - -Returns structured results with titles, URLs, and optional metadata (author, published date). Use `--num-results` to control how many results are returned (1-25, default 10). - -Prefer the `fetch` skill to retrieve page content after finding URLs via search. Prefer the `browser` skill when you need to interact with pages. - -## Templates - -Browse and scaffold starter templates from the Browserbase templates repository. - -### List templates - -```bash -browse templates list -browse templates list --tag Python --source Browserbase -browse templates list --tag TypeScript --source Browserbase -``` - -### Clone a template - -```bash -browse templates clone form-filling --language typescript -browse templates clone amazon-product-scraping --language python ./my-scraper -``` - -Arguments: -- `` (required) — template name from `browse templates list` -- `[path]` (optional) — destination directory, defaults to the template slug - -Options: -- `--language ` — `python` or `typescript` - -## Local & remote browser driving - -Top-level `browse` commands drive local and remote browsers directly: `browse open`, `browse get`, `browse click`, `browse fill`, `browse press`, `browse screenshot`, and `browse cdp`. - -```bash -browse open https://example.com # default mode from env -browse open https://example.com --local --headless # explicit local + headless -browse open https://example.com --auto-connect # attach to existing debuggable Chrome -browse open https://example.com --remote # create a new Browserbase remote session -browse open https://example.com --remote --session research # use a named browse daemon session -browse open https://example.com --cdp "$CONNECT_URL" # attach to a pre-created CDP endpoint -browse get markdown body # extract the current page as markdown -browse status # show the active session -``` - -For most interactive browsing tasks, prefer the dedicated `browser` skill instead of routing through the CLI directly. - -## Skills - -Install Browserbase agent skills for Claude Code directly from the CLI: - -```bash -browse skills install -``` - -This runs the skill installer non-interactively via npx. - -## Troubleshooting - -- Missing API key: set `BROWSERBASE_API_KEY` or pass `--api-key` -- Wrong base URL flag: use `--base-url` for both `browse functions ...` and `browse cloud ...` -- Invalid JSON input: wrap `--body` and `--params` payloads in single quotes so the shell preserves the JSON string -- Command not found: re-run `npm install -g browse` and verify with `which browse` diff --git a/skills/browserbase-cli/SKILL.md b/skills/browserbase-cli/SKILL.md deleted file mode 100644 index e97be2ac..00000000 --- a/skills/browserbase-cli/SKILL.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -name: browserbase-cli -description: Use the Browserbase CLI (`browse`) for Browserbase Functions and platform API workflows. Use when the user asks to run `browse`, deploy or invoke functions, manage sessions, projects, contexts, or extensions, fetch a page through the Browserbase Fetch API, search the web through the Browserbase Search API, or scaffold starter templates. Prefer the Browser skill for interactive browsing; use the top-level `browse` driver commands (`browse open`, `browse get`, etc.) only when the user explicitly wants the CLI path. -compatibility: "Requires the Browserbase CLI (`npm install -g browse`). API commands require `BROWSERBASE_API_KEY`." -license: MIT -allowed-tools: Bash ---- - -# Browserbase CLI - -Use the official `browse` CLI for Browserbase platform operations, Functions workflows, and Fetch API calls. - -## Setup check - -Before using the CLI, verify it is installed: - -```bash -which browse || npm install -g browse -browse --help -``` - -For authenticated commands, set the API key: - -```bash -export BROWSERBASE_API_KEY="your_api_key" -``` - -## When to use this skill - -Use this skill when the user wants to: - -- run Browserbase commands through `browse` -- scaffold, develop, publish, or invoke Browserbase Functions -- inspect or manage Browserbase sessions, projects, contexts, or extensions -- fetch a page through Browserbase without opening a browser session -- search the web through Browserbase without opening a browser session -- browse or scaffold starter templates with `browse templates` - -## When not to use this skill - -- For interactive browsing, page inspection, screenshots, clicking, typing, or login flows, prefer the `browser` skill. -- For simple HTTP content retrieval where the user does not care about using the CLI specifically, the dedicated `fetch` skill is often a better fit. -- Use the top-level driver commands (`browse open`, `browse get`, `browse click`, …) only when the user explicitly wants the CLI path or is already working in a `browse`-centric workflow. - -## Command selection - -- `browse functions` for local dev, packaging, publishing, and invocation -- `browse cloud sessions`, `browse cloud projects`, `browse cloud contexts`, `browse cloud extensions` for Browserbase platform resources -- `browse cloud fetch ` for Fetch API requests -- `browse cloud search ""` for Search API requests -- `browse templates` to browse and scaffold starter templates -- `browse open`, `browse get`, `browse click`, etc. for direct local/remote browser driving -- `browse skills install` to install Browserbase agent skills for Claude Code - -For local browser work, `browse open --local` starts a clean isolated browser. Use `browse open --auto-connect` only when you need to attach to an existing debuggable Chrome session. - -## Common workflows - -### Functions - -```bash -browse functions init my-function -cd my-function -browse functions dev index.ts -browse functions publish index.ts -browse functions invoke --params '{"url":"https://example.com"}' -``` - -Use `browse functions invoke --check-status ` to poll an existing invocation instead of creating a new one. - -### Platform APIs - -```bash -browse cloud projects list -browse cloud sessions create --proxies --verified --region us-east-1 -browse cloud sessions create --solve-captchas --context-id ctx_abc --persist -browse cloud sessions get -browse cloud sessions downloads get --output session-artifacts.zip -browse cloud contexts create --body '{"region":"us-west-2"}' -browse cloud extensions upload ./my-extension.zip -``` - -### Fetch API - -```bash -browse cloud fetch https://example.com -browse cloud fetch https://example.com --allow-redirects --output page.html -``` - -### Search API - -```bash -browse cloud search "browser automation" -browse cloud search "web scraping" --num-results 5 -browse cloud search "AI agents" --output results.json -``` - -### Templates - -```bash -browse templates list -browse templates list --tag Python --source Browserbase -browse templates clone form-filling --language typescript -browse templates clone amazon-product-scraping --language python ./my-scraper -``` - -## Best practices - -1. Prefer `browse --help` and subgroup `--help` before guessing flags. -2. Use dash-case flags exactly as shown in CLI help. -3. Use `--output ` on `browse cloud fetch` and `browse cloud search` to save results to a file. -4. Use environment variables for auth unless the user explicitly wants one-off overrides. -5. Pass structured request bodies with JSON strings in `--body` or `--params`. -6. Remember that both `browse functions ...` and `browse cloud ...` use `--base-url` for API base URL overrides. - -## Troubleshooting - -- Missing API key: set `BROWSERBASE_API_KEY` or pass `--api-key` -- Unknown flag: rerun the relevant command with `--help` and use the exact dash-case form -- Command not found: re-run `npm install -g browse` and verify with `which browse` - -For command-by-command reference and more examples, see [REFERENCE.md](REFERENCE.md).