mirror of
https://github.com/browser-use/browser-use
synced 2026-04-22 17:45:09 +02:00
add browser-use cloud command: generic REST passthrough to Cloud API
Login/logout with API key persistence, versioned REST calls (v2/v3), task polling, and OpenAPI-driven help. Stdlib only, no daemon needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -204,6 +204,40 @@ browser-use run "task" --llm gpt-4o # Specify LLM model
|
||||
Requires an LLM API key (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.).
|
||||
|
||||
|
||||
## Cloud API
|
||||
|
||||
Generic REST passthrough to the Browser-Use Cloud API.
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `cloud login <api-key>` | Save API key |
|
||||
| `cloud logout` | Remove API key |
|
||||
| `cloud v2 GET <path>` | GET request to API v2 |
|
||||
| `cloud v2 POST <path> '<json>'` | POST request to API v2 |
|
||||
| `cloud v3 POST <path> '<json>'` | POST request to API v3 |
|
||||
| `cloud v2 poll <task-id>` | Poll task until done |
|
||||
| `cloud v2 --help` | Show API v2 endpoints (from OpenAPI spec) |
|
||||
| `cloud v3 --help` | Show API v3 endpoints |
|
||||
|
||||
```bash
|
||||
# Save API key (or set BROWSER_USE_API_KEY env var)
|
||||
browser-use cloud login sk-abc123...
|
||||
|
||||
# List browsers
|
||||
browser-use cloud v2 GET /browsers
|
||||
|
||||
# Create a task
|
||||
browser-use cloud v2 POST /tasks '{"task":"Search for AI news","url":"https://google.com"}'
|
||||
|
||||
# Poll until done
|
||||
browser-use cloud v2 poll <task-id>
|
||||
|
||||
# Remove API key
|
||||
browser-use cloud logout
|
||||
```
|
||||
|
||||
API key stored in `~/.config/browser-use/config.json` with `0600` permissions.
|
||||
|
||||
## Tunnels
|
||||
|
||||
Expose local dev servers to cloud browsers via Cloudflare tunnels.
|
||||
|
||||
Reference in New Issue
Block a user