@browserbasehq/browse-cli 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +31 -0
  2. package/dist/index.js +96191 -86894
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -155,8 +155,37 @@ Captured requests are saved as directories:
155
155
  browse start # Explicitly start daemon
156
156
  browse stop [--force] # Stop daemon
157
157
  browse status # Check daemon status
158
+ browse env [target] # Show or switch environment: local | remote
158
159
  ```
159
160
 
161
+ ### Environment Switching (Local vs Remote)
162
+
163
+ Use environment switching when an agent should keep the same command flow, but the
164
+ browser runtime needs to change:
165
+
166
+ - `local` runs Chrome on your machine (best for local debugging/dev loops)
167
+ - `remote` runs a Browserbase session (best for anti-bot hardening and cloud runs)
168
+
169
+ ```bash
170
+ # Show active environment (if running) and desired environment for next start
171
+ browse env
172
+
173
+ # Switch current session to Browserbase (restarts daemon if needed)
174
+ browse env remote
175
+
176
+ # Switch back to local Chrome
177
+ browse env local
178
+ ```
179
+
180
+ Behavior details:
181
+
182
+ - Environment is scoped per `--session`
183
+ - `browse env <target>` persists an override and restarts the daemon
184
+ - `browse stop` clears the override so next start falls back to env-var-based auto detection
185
+ - Auto detection defaults to:
186
+ - `remote` when `BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID` are set
187
+ - `local` otherwise
188
+
160
189
  ## Global Options
161
190
 
162
191
  | Option | Description |
@@ -172,6 +201,8 @@ browse status # Check daemon status
172
201
  | Variable | Description |
173
202
  |----------|-------------|
174
203
  | `BROWSE_SESSION` | Default session name (alternative to `--session`) |
204
+ | `BROWSERBASE_API_KEY` | Browserbase API key (required for `browse env remote`) |
205
+ | `BROWSERBASE_PROJECT_ID` | Browserbase project ID (required for `browse env remote`) |
175
206
 
176
207
  ## Element References
177
208