Skip to main content

Overview

The browserbase-cli skill teaches AI coding agents how to use the official Browserbase CLI (bb). The CLI is the primary interface for managing Browserbase infrastructure — it covers Functions lifecycle, platform resource management, page fetching, and dashboard access. Use this skill when you want your agent to stay inside the CLI for tasks like:
  • Functionsbb functions init, dev, deploy, publish, invoke, and logs for the full serverless browser automation lifecycle
  • Sessionsbb sessions list, get, create, and delete to manage browser sessions
  • Projectsbb projects list and get for project-level configuration
  • Contextsbb contexts create, get, list, and delete to manage persistent browser state (cookies, localStorage)
  • Extensionsbb extensions upload, list, and delete for custom browser extensions
  • Fetchbb fetch <url> to retrieve page content through Browserbase proxies with redirect control and JSON output
  • Dashboardbb dashboard to open the Browserbase console from the terminal
The browserbase-cli skill is for bb-driven workflows. For interactive browser control like navigation, clicking, typing, and snapshots, use the browser skill instead.

Choose the Right Skill

SkillBest for
browserInteractive browser automation with the browse CLI
fetchLightweight page retrieval via the Browserbase Fetch API — no browser session needed
functionsFocused Browserbase Functions workflows
browserbase-cliBroader bb workflows across functions, sessions, projects, contexts, extensions, fetch, and dashboard

Installation

1

Install the skill

npx skills add browserbase/skills --skill browserbase-cli
2

Install the Browserbase CLI

npm install -g @browserbasehq/cli

Authentication

All bb commands require your API key:
export BROWSERBASE_API_KEY="your_api_key"
For bb functions deploy and bb functions publish, you also need a project ID:
export BROWSERBASE_PROJECT_ID="your_project_id"

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"}'

Platform APIs

bb projects list --json
bb sessions get <session_id> --json
bb contexts create --body '{"region":"us-west-2"}' --json
bb extensions upload ./my-extension.zip --json

Fetch API

bb fetch https://example.com --json
bb fetch https://example.com --allow-redirects --output page.html

Dashboard

bb dashboard

Notes on bb browse

bb browse is a passthrough to the standalone browse CLI. Use it only when you explicitly want to stay inside a bb-centric workflow. For most interactive browsing tasks, prefer the browser skill directly. If you need bb browse, install the browse CLI too:
npm install -g @browserbasehq/browse-cli

Further Reading