feat(cli): add `browse discord` command
SH
3d ago+336+336+012345678901234567890123456789-0-0-0123456789
why
Make it easy to join the Stagehand and Browse CLI community from the terminal to contribute, request features, and share feedback.
what changed
Adds browse discord, visible in root help, with this invitation:
$ browse discord --no-open
https://discord.gg/stagehand
Join our Discord community to contribute to Stagehand and the Browse CLI, request features, and share feedback!
- In an interactive terminal outside CI, opens the invite using the maintained
openpackage and prints the URL and invitation. --no-openor noninteractive stdout skips the opener. A nonemptyCIvalue (includingtrueor1) also skips it; literalCI=falsedisables that guard, matching theci-infoconvention.- If the opener cannot start, the command still prints the invitation and exits successfully.
- Adds a Discord link to the CLI README and shared support URLs.
- Includes a patch changeset for
browse: a small support command that preserves existing behavior.
For review, the command and copy are in packages/cli/src/commands/discord.ts; terminal/CI guards and opener error handling are in packages/cli/src/lib/open-url.ts. Platform-specific launching is delegated to open, with its dependency recorded in the CLI manifest and lockfile. The stacked follow-up, #3451, adds community links to help and error messages.
test plan
- CLI TypeScript build and oclif manifest generation.
- Discord, CLI surface, and opener regression tests: 73 passed.
- Seven compiled CLI smoke checks using the real
openpackage: interactive launch,CI=false,--no-open,CI=true,CI=0, piped stdout, and missing-launcher fallback. - Changed-file formatting and lint checks, plus changeset validation.
- CI passing at
7e1f854bd, including Linux/Windows builds, CLI contracts, Chrome smoke tests, regression tests, and automated review.