Make BROWSERBASE_PROJECT_ID optional in CLI

Merged
SH
8mo ago
+5-8

Summary

  • Stacked on #1800
  • Only BROWSERBASE_API_KEY is required for remote mode in the CLI
  • BROWSERBASE_PROJECT_ID is still passed through if set, but no longer checked

Changes

  • packages/cli/src/index.ts — hasBrowserbaseCredentials() only checks for API key
  • packages/cli/tests/mode.test.ts — Updated test to match new error message
  • packages/cli/README.md — Updated docs to reflect optional project ID

Test plan

  • Existing mode test updated
  • Manual: browse env remote with only BROWSERBASE_API_KEY set

šŸ¤– Generated with Claude Code


Summary by cubic

Make BROWSERBASE_PROJECT_ID optional in the CLI for remote mode, so only BROWSERBASE_API_KEY is required. The project ID is still forwarded when provided.

  • Bug Fixes
    • Updated remote mode check and error message to only require BROWSERBASE_API_KEY.
    • Autodetection now defaults to remote when the API key is set; otherwise local.
    • Updated tests and @browserbasehq/browse-cli README to match.