[STG-2188] docs(cli): document full browse command surface + fix license badge - #2198
Merged
Conversation
…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.
|
Contributor
There was a problem hiding this comment.
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
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Cover the four commands the SKILL.md was missing relative to the shipped CLI: get markdown, eval, cursor, and network off.
ziruihao
approved these changes
Jun 6, 2026
Addresses Cubic review: stray </content>/</invoke> tags leaked into the README footer during authoring.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the
browseCLI 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
--local/--remote/--auto-connect/--cdp/--target-id) plus a global flags table.BROWSERBASE_API_KEYandBROWSE_SESSION.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 staticbadge/license-MITbadge that always resolves. TheLICENSEfile 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, andbrowse network off.E2E Test Matrix
npx prettier --check packages/cli/README.md packages/cli/skills/browse/SKILL.mdAll matched files use Prettier code style!format:checkCI gate.src/commands/**(parsedstatic override description/examples/args/flags)--press-enter,--return-xpath,--proxies,--verified,--region,--solve-captchas,--context-id,--persist,--source,--package-manager, etc.) exist in sourcesrc/commands/**get markdown,eval,cursor,network off), now addedDocs/skill-text only — no changeset.
Closes STG-2188