feat(cli): add browse bug to open a prefilled issue

SH
3d ago
+132-0

why

Bug reports from humans and coding agents often arrive without the diagnostics we need to reproduce and fix issues. Prefilling an issue with environment info reduces friction for reporters and improves triage.

what changed

Add browse bug command that opens a GitHub issue page prefilled with:

  • Blank sections for the user to describe what happened and steps to reproduce
  • Auto-filled environment table: browse version, Node version, OS/arch, and detected agent

The command:

  • Uses the existing openUrl helper (same as browse discord)
  • Supports --no-open to print the URL instead of opening
  • Supports --title to prefill the issue title
  • Requires no new telemetry module (command telemetry already records command_path=bug)

Before (main):

$ browse bug --no-open
"browse bug" is not a browse command. Run browse --help for all commands.
 ›   Error: command bug not found

After (this branch):

$ browse bug --no-open
https://github.com/browserbase/stagehand/issues/new?body=%23%23+What+happened%0A%0A%3C%21--+Describe+the+issue+--%3E%0A%0A%23%23+Steps+to+reproduce%0A%0A1.+%0A2.+%0A3.+%0A%0A%23%23+Environment%0A%0A%7C+Key+%7C+Value+%7C%0A%7C-----%7C-------%7C%0A%7C+browse+%7C+0.12.0+%7C%0A%7C+node+%7C+v22.23.4+%7C%0A%7C+os+%7C+linux%2Fx64+%7C%0A%7C+agent+%7C+cursor-cli+%7C%0A
Please fill in the details to help us reproduce the issue.

Decoded body:

## What happened

<!-- Describe the issue -->

## Steps to reproduce

1. 
2. 
3. 

## Environment

| Key | Value |
|-----|-------|
| browse | 0.12.0 |
| node | v22.23.4 |
| os | linux/x64 |
| agent | cursor-cli |

test plan

  • pnpm --filter browse lint — passes
  • pnpm --filter browse test:cli — 702 tests pass including new tests for:
    • Help text visibility
    • URL contains version/OS/agent
    • --no-open prints URL instead of opening
    • --title sets title parameter
    • No driver/session interaction
  • Manual: browse bug --no-open prints valid prefilled GitHub issue URL
  • Manual: browse bug --no-open --title "Test" includes title parameter
Open in Web Open in Cursor 

Summary by cubic

Adds a browse bug command that opens a prefilled GitHub issue so bug reports include environment diagnostics from the reporter.

  • Prefills the issue body with blank report sections and an auto-filled environment table (browse version, Node version, OS/arch, and detected agent) using the existing bug_report.md template.
  • Supports --no-open to print the URL instead of opening a browser, and --title to prefill the issue title.