Skills browserbase-cli
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, search the web through the Browserbase Search API, or scaffold starter templates. Prefer the Browser skill for interactive browsing; use `bb browse` only when the user explicitly wants the Browserbase CLI path.
install
source · Clone the upstream repo
git clone https://github.com/browserbase/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/browserbase/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/browserbase-cli" ~/.claude/skills/browserbase-skills-browserbase-cli && rm -rf "$T"
manifest:
skills/browserbase-cli/SKILL.mdsource content
Browserbase CLI
Use the official
bb CLI for Browserbase platform operations, Functions workflows, and Fetch API calls.
Setup check
Before using the CLI, verify it is installed:
which bb || npm install -g @browserbasehq/cli bb --help
For authenticated commands, set the API key:
export BROWSERBASE_API_KEY="your_api_key"
If using
bb functions dev or bb functions publish, also set:
export BROWSERBASE_PROJECT_ID="your_project_id"
When to use this skill
Use this skill when the user wants to:
- run Browserbase commands through
bb - 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
bb templates
When not to use this skill
- For interactive browsing, page inspection, screenshots, clicking, typing, or login flows, prefer the
skill.browser - For simple HTTP content retrieval where the user does not care about using the CLI specifically, the dedicated
skill is often a better fit.fetch - Use
only when the user explicitly wants the CLI wrapper or is already working in abb browse ...
-centric workflow.bb
Command selection
for local dev, packaging, publishing, and invocationbb functions
,bb sessions
,bb projects
,bb contexts
for Browserbase platform resourcesbb extensions
for Fetch API requestsbb fetch <url>
for Search API requestsbb search "<query>"
to browse and scaffold starter templatesbb templates
to forward to the standalonebb browse ...
binary (requiresbrowse
)@browserbasehq/browse-cli
to install Browserbase agent skills for Claude Codebb skills install
For
bb browse, the standalone browse CLI behavior is the source of truth: bb browse env local uses a clean isolated local browser by default, and bb browse env local --auto-connect opts into reusing an existing local Chrome session.
Common workflows
Functions
bb functions init my-function cd my-function bb functions dev index.ts bb functions publish index.ts bb functions invoke <function_id> --params '{"url":"https://example.com"}'
Use
bb functions invoke --check-status <invocation_id> to poll an existing invocation instead of creating a new one.
Platform APIs
bb projects list bb sessions create --proxies --advanced-stealth --region us-east-1 bb sessions create --solve-captchas --context-id ctx_abc --persist bb sessions get <session_id> bb sessions downloads get <session_id> --output session-artifacts.zip bb contexts create --body '{"region":"us-west-2"}' bb extensions upload ./my-extension.zip
Fetch API
bb fetch https://example.com bb fetch https://example.com --allow-redirects --output page.html
Search API
bb search "browser automation" bb search "web scraping" --num-results 5 bb search "AI agents" --output results.json
Templates
bb templates list bb templates list --language python bb templates clone form-filling --language typescript bb templates clone amazon-product-scraping --language python ./my-scraper
Best practices
- Prefer
and subgroupbb --help
before guessing flags.--help - Use dash-case flags exactly as shown in CLI help.
- Use
on--output <file>
andbb fetch
to save results to a file.bb search - Use environment variables for auth unless the user explicitly wants one-off overrides.
- Pass structured request bodies with JSON strings in
or--body
.--params - Remember that
usesbb functions ...
, while platform API commands use--api-url
.--base-url - If
fails becausebb browse
is missing, either installbrowse
or switch to the@browserbasehq/browse-cli
skill.browser
Troubleshooting
- Missing API key: set
or passBROWSERBASE_API_KEY--api-key - Missing project ID on
orbb functions dev
: setbb functions publish
or passBROWSERBASE_PROJECT_ID--project-id - Unknown flag: rerun the relevant command with
and use the exact dash-case form--help
install error: runbb browsenpm install -g @browserbasehq/browse-cli
For command-by-command reference and more examples, see REFERENCE.md.