Skip to content

[STG-2188] docs(cli): document full browse command surface + fix license badge - #2198

Merged
shrey150 merged 3 commits into
mainfrom
shrey/browse-cli-readme-license
Jun 6, 2026
Merged

[STG-2188] docs(cli): document full browse command surface + fix license badge#2198
shrey150 merged 3 commits into
mainfrom
shrey/browse-cli-readme-license

Conversation

@shrey150

@shrey150 shrey150 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Rewrites the browse CLI README to document the full command surface, fixes the license badge that rendered as "missing", and fills small gaps in the bundled agent skill.

The README previously listed only a curated subset of commands. The CLI now ships dozens of commands across browser driving, the Browse.sh skills catalog, Browserbase cloud, Functions, and templates — but most weren't documented. This restructures the README into grouped reference sections (modeled on the agent-browser README) covering every command.

README changes

  • Full command reference, grouped: Navigation, Snapshot & refs, Element actions, Mouse (raw coordinates), Page info & state, Waiting, Tabs, Network capture, Session & daemon.
  • Browser-target table (--local / --remote / --auto-connect / --cdp / --target-id) plus a global flags table.
  • Expanded Skills catalog, Browserbase cloud (projects/sessions/contexts/extensions/fetch/search), Functions, and a new Templates section.
  • Env var table for BROWSERBASE_API_KEY and BROWSE_SESSION.
  • Every command/flag was sourced directly from src/commands/** (descriptions, args, examples) — not invented.

License badge fix

The license badge used img.shields.io/npm/l/browse, which derives the license from the npm registry. That endpoint intermittently renders "license: missing" when shields' cache lags behind the registry. Swapped it for a static badge/license-MIT badge that always resolves. The LICENSE file is present and the package is MIT.

Bundled skill (packages/cli/skills/browse/SKILL.md)

The agent skill was already broadly current, but was missing four shipped commands. Added: browse get markdown, browse eval, browse cursor, and browse network off.

E2E Test Matrix

Command / flow Observed output Confidence / sufficiency
npx prettier --check packages/cli/README.md packages/cli/skills/browse/SKILL.md All matched files use Prettier code style! Proves both docs pass the package's format:check CI gate.
Cross-checked every documented command against src/commands/** (parsed static override description / examples / args / flags) All commands and flags (--press-enter, --return-xpath, --proxies, --verified, --region, --solve-captchas, --context-id, --persist, --source, --package-manager, etc.) exist in source Confirms the reference is accurate to the shipped CLI, not aspirational.
Diffed SKILL.md command list vs src/commands/** Surfaced exactly 4 absent commands (get markdown, eval, cursor, network off), now added Confirms SKILL is complete relative to the CLI.

Docs/skill-text only — no changeset.

Closes STG-2188

…adge

Expand the browse CLI README to cover the complete command gamut
(navigation, snapshot/refs, element actions, mouse, page info/state,
waiting, tabs, network, session/daemon, skills, cloud, functions,
templates) with grouped reference sections, browser-target table, and a
global flags table — modeled on the agent-browser reference layout.

Replace the npm-derived license badge (img.shields.io/npm/l/browse) with
a static MIT badge. The /npm/l endpoint intermittently renders
"license: missing" when shields' cache lags the registry; a static badge
always resolves.
@changeset-bot

changeset-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 28f5392

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Confidence score: 4/5

  • This PR is likely safe to merge, with low implementation risk since the only reported problem is documentation formatting rather than runtime behavior.
  • The most severe issue is in packages/cli/README.md: stray </content>/</invoke> tags visibly corrupt the README output and could confuse CLI users reading setup/usage docs.
  • Because the issue is concrete but limited to docs quality (severity 4/10, high confidence), this looks like a minor cleanup rather than a merge-blocking defect.
  • Pay close attention to packages/cli/README.md - remove stray closing tags to restore readable documentation.
Architecture diagram
sequenceDiagram
    participant User as CLI User
    participant CLI as `browse` CLI
    participant Daemon as Session Daemon
    participant Browser as Managed Browser
    participant CdpBrowser as CDP Browser
    participant Remote as Browserbase Cloud
    participant Skills as browse.sh Catalog
    participant FS as File System

    Note over User,FS: Documentation now covers full command surface

    User->>CLI: browse open <url> (first command)
    CLI->>Daemon: Start persistent session daemon
    Daemon->>Browser: Launch managed local browser

    alt --local flag
        CLI->>Daemon: Reuse existing session
        Daemon->>Browser: Command via CDP
    else --remote flag or BROWSERBASE_API_KEY set
        CLI->>Remote: Create Browserbase session
        Remote-->>CLI: Session CDP endpoint
        CLI->>Browser: Attach via CDP
    else --auto-connect flag
        CLI->>CdpBrowser: Discover local Chrome with remote debugging
    else --cdp flag
        CLI->>CdpBrowser: Attach to specified CDP endpoint
        opt --target-id provided
            CLI->>CdpBrowser: Select specific target
        end
    end

    Note over User,CLI: Navigation commands
    User->>CLI: browse open/reload/back/forward
    CLI->>Daemon: Navigate page
    Daemon-->>CLI: Return result

    Note over User,CLI: Snapshot & refs
    User->>CLI: browse snapshot [--compact/--filter/--max-depth]
    CLI->>Daemon: Request accessibility snapshot
    Daemon-->>CLI: Snapshot tree with refs
    User->>CLI: browse refs
    CLI->>Daemon: Return cached refs
    Daemon-->>CLI: Ref list

    Note over User,CLI: Element actions (click, fill, select, etc.)
    User->>CLI: browse click/fill/select/type/press/upload/highlight <ref or selector>
    CLI->>Daemon: Perform element action
    Daemon->>Browser: Execute DOM manipulation
    Browser-->>Daemon: Action result
    Daemon-->>CLI: Success/error

    Note over User,CLI: Mouse (raw coordinates)
    User->>CLI: browse mouse click/hover/scroll/drag
    opt --return-xpath
        CLI->>Daemon: Get XPath under cursor
    end
    Daemon-->>CLI: Action result

    Note over User,CLI: Page info & state
    User->>CLI: browse get/is/eval/viewport/cursor/screenshot
    CLI->>Daemon: Query/change page state
    Daemon-->>CLI: Page data or file path

    Note over User,CLI: Waiting
    User->>CLI: browse wait load/selector/timeout
    CLI->>Daemon: Block until condition met
    Daemon-->>CLI: Condition satisfied

    Note over User,CLI: Tab management
    User->>CLI: browse tab list/new/switch/close
    CLI->>Daemon: Manage tabs
    Daemon-->>CLI: Tab list or status

    Note over User,CLI: Network capture
    User->>CLI: browse network on
    CLI->>Daemon: Start capturing requests/responses
    Daemon->>FS: Write capture data to local directory
    User->>CLI: browse network off/clear
    User->>CLI: browse network path
    CLI->>Daemon: Return capture directory
    Daemon-->>CLI: Path

    Note over User,CLI: Session & daemon
    User->>CLI: browse status/stop/doctor/cdp
    CLI->>Daemon: Check/control daemon state
    Daemon-->>CLI: Status or connection info
    alt --force
        CLI->>Daemon: Kill unresponsive browser
    end

    Note over User,CLI: Skills catalog
    User->>CLI: browse skills install/list/find/add/remove/update
    CLI->>Skills: Query/install skills
    Skills-->>CLI: Skill list or installation result

    Note over User,CLI: Browserbase cloud commands
    User->>CLI: browse cloud projects/sessions/contexts/extensions/fetch/search
    CLI->>Remote: Manage cloud resources
    Remote-->>CLI: Cloud resource data

    Note over User,CLI: Templates
    User->>CLI: browse templates [command]
    CLI->>Skills: List/create templates
    Skills-->>CLI: Template data

    Note over User,CLI: Env vars (BROWSERBASE_API_KEY, BROWSE_SESSION)
    User->>CLI: Set BROWSERBASE_API_KEY
    CLI->>Remote: Authenticate with API key
    User->>CLI: Set BROWSE_SESSION or --session flag
    CLI->>Daemon: Run multiple isolated sessions
Loading

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread packages/cli/README.md Outdated
Cover the four commands the SKILL.md was missing relative to the shipped
CLI: get markdown, eval, cursor, and network off.
Addresses Cubic review: stray </content>/</invoke> tags leaked into the
README footer during authoring.
@shrey150
shrey150 merged commit 95f9a9d into main Jun 6, 2026
38 checks passed
felipeofdev-ai pushed a commit to felipeofdev-ai/stagehand that referenced this pull request Aug 4, 2026
…nse badge (browserbase#2198)

## Summary

Rewrites the `browse` CLI README to document the **full command
surface**, fixes the license badge that rendered as "missing", and fills
small gaps in the bundled agent skill.

The README previously listed only a curated subset of commands. The CLI
now ships dozens of commands across browser driving, the Browse.sh
skills catalog, Browserbase cloud, Functions, and templates — but most
weren't documented. This restructures the README into grouped reference
sections (modeled on the agent-browser README) covering every command.

### README changes
- **Full command reference**, grouped: Navigation, Snapshot & refs,
Element actions, Mouse (raw coordinates), Page info & state, Waiting,
Tabs, Network capture, Session & daemon.
- **Browser-target table** (`--local` / `--remote` / `--auto-connect` /
`--cdp` / `--target-id`) plus a **global flags table**.
- Expanded **Skills catalog**, **Browserbase cloud**
(projects/sessions/contexts/extensions/fetch/search), **Functions**, and
a new **Templates** section.
- Env var table for `BROWSERBASE_API_KEY` and `BROWSE_SESSION`.
- Every command/flag was sourced directly from `src/commands/**`
(descriptions, args, examples) — not invented.

### License badge fix
The license badge used `img.shields.io/npm/l/browse`, which derives the
license from the npm registry. That endpoint intermittently renders
**"license: missing"** when shields' cache lags behind the registry.
Swapped it for a static `badge/license-MIT` badge that always resolves.
The `LICENSE` file is present and the package is MIT.

### Bundled skill (`packages/cli/skills/browse/SKILL.md`)
The agent skill was already broadly current, but was missing four
shipped commands. Added: `browse get markdown`, `browse eval`, `browse
cursor`, and `browse network off`.

## E2E Test Matrix

| Command / flow | Observed output | Confidence / sufficiency |
| --- | --- | --- |
| `npx prettier --check packages/cli/README.md
packages/cli/skills/browse/SKILL.md` | `All matched files use Prettier
code style!` | Proves both docs pass the package's `format:check` CI
gate. |
| Cross-checked every documented command against `src/commands/**`
(parsed `static override description` / `examples` / `args` / `flags`) |
All commands and flags (`--press-enter`, `--return-xpath`, `--proxies`,
`--verified`, `--region`, `--solve-captchas`, `--context-id`,
`--persist`, `--source`, `--package-manager`, etc.) exist in source |
Confirms the reference is accurate to the shipped CLI, not aspirational.
|
| Diffed SKILL.md command list vs `src/commands/**` | Surfaced exactly 4
absent commands (`get markdown`, `eval`, `cursor`, `network off`), now
added | Confirms SKILL is complete relative to the CLI. |

Docs/skill-text only — no changeset.

Closes STG-2188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants