Skip to content

Add explicit bb setup browser flow for browser_fetch dependencies #78

@shuyhere

Description

@shuyhere

Summary

browser_fetch needs a first-class setup flow for its local browser dependency.

Today, users may hit a missing-browser error and still have to figure out Chrome/Chromium installation and BB_BROWSER configuration themselves.

Motivation

We considered making browser installation/configuration happen automatically during every npm install, but that has major downsides:

  • large download / install side effects
  • slower installs and CI friction
  • platform-specific behavior
  • surprising changes for users who never use browser_fetch
  • downloaded browser builds may still not be compatible with the current browser_fetch launch mode

An explicit setup flow is safer and clearer.

Proposal

Add a dedicated command such as:

bb setup browser

Initial scope:

  • detect whether a compatible Chrome / Chromium / Edge executable is available
  • show the resolved executable path if found
  • print the shell export needed for BB_BROWSER
  • optionally persist that export to the user's shell rc file
  • if nothing is found, print platform-specific install guidance and tell the user what to run next

Nice follow-ups

  • TUI shortcut/help when browser_fetch fails due to missing browser
  • optional bb doctor / dependency check flow
  • optional guided installation helpers per platform

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions