Commit Graph

109 Commits

Author SHA1 Message Date
Laith Weinberger 133761dbbd shared mcp runner + max_dim guard 2026-07-11 11:28:12 -07:00
Laith Weinberger 0f5c5cfb91 mcp for CLI 3.0 2026-07-11 11:02:49 -07:00
Laith Weinberger 36a8525c13 lint 2026-07-07 17:11:55 -07:00
Laith Weinberger 2de48f89b8 hint for unknown CLI cmds 2026-07-07 17:01:10 -07:00
Laith Weinberger c93a1de56f hint if trying to use browser-use cmd 2026-07-07 16:17:14 -07:00
laithrw d1af39626e Merge branch 'main' into feat/delegate-cli-telemetry-to-harness 2026-07-07 10:48:36 -07:00
Laith Weinberger 8e279db893 global var 2026-07-07 10:38:35 -07:00
Laith Weinberger 803fd85f97 remove telemetry 2026-07-07 10:27:38 -07:00
Laith Weinberger 55a56c31c4 improve CLI hint 2026-07-07 10:07:15 -07:00
laithrw 285ba3b401 Merge branch 'main' into fix/cli-slowdown 2026-07-07 08:29:32 +08:00
Laith Weinberger b1bf5281ad better error tracking 2026-07-06 17:28:02 -07:00
Laith Weinberger 9ee4929912 don't slow down CLI 2026-07-06 17:15:17 -07:00
Laith Weinberger b65642f810 shim for legacy CLI cmds 2026-07-06 16:40:41 -07:00
Laith Weinberger 76a2a0704b fix CLI telemetry debug stderr 2026-07-01 21:35:25 +08:00
Laith Weinberger 4c13e28301 fix Browser Use CLI skill install and telemetry edge cases 2026-07-01 19:28:05 +08:00
Laith Weinberger 44f017fbc2 telemetry, fix issues
docs: remove rust; skills.sh install cmd
2026-07-01 17:57:24 +08:00
Laith Weinberger d73eea6329 sync browser-use skill from browser-harness 2026-06-29 15:20:21 +08:00
Laith Weinberger 53c3ba2e72 Fix browser use CLI review issues 2026-06-29 14:00:13 +08:00
Laith Weinberger f768a06cfe new browser use CLI; new functions for deleted CLI methods 2026-06-29 13:10:55 +08:00
Alezander9 76569995fd Improve OSS-to-cloud conversion: UTM tracking, better error messages, and cloud nudges
- Add UTM params to all cloud-bound links across README, CLI, and error messages
- Rewrite README Open Source vs Cloud section: position cloud browsers as
  recommended pairing for OSS users, remove separate Use Both section
- Rewrite error messages for use_cloud=True and ChatBrowserUse() to clearly
  state what is wrong and what to do next
- Add missing URLs: invalid API key now links to key page, insufficient
  credits now links to billing page
- Add cloud browser nudge on captcha detection (logger.warning)
- Add cloud browser nudge on local browser launch failure
2026-04-08 22:05:50 -07:00
ShawnPana 859cb97063 simplify daemon architecture: single session, socket-as-liveness, no PID/lock files
Replace the multi-session server (server.py, SessionRegistry, portalocker locking,
PID files, orphan detection) with a minimal daemon (daemon.py) that holds one
BrowserSession in memory. Socket file existence = alive. Auto-exits when browser
dies via CDP watchdog.

-2277 lines, +142 lines across 20 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:05:44 -08:00
Laith Weinberger 8ebe4385ed fix: preserve non-ASCII chars in all remaining JSON file outputs 2026-03-01 14:19:38 -05:00
Laith Weinberger 4d05218d7d fix: redirect logging to stderr so MCP stdio doesn't break (#2748) 2026-02-08 16:29:05 -05:00
reformedot b4e9ffa984 refactor: implement error handling for asyncio tasks across various components
- Introduced a utility function `create_task_with_error_handling` to manage asyncio tasks with proper exception logging and suppression options.
- Updated multiple components, including `SessionManager`, `BrowserSession`, and various watchdogs, to utilize the new error handling mechanism for background tasks.
- Enhanced overall robustness of asynchronous operations by ensuring exceptions are logged and handled appropriately, improving maintainability and debugging capabilities.
2025-11-11 17:27:54 -08:00
reformedot bf350bc4b0 refactor: update agent focus handling to use target ID consistently
- Replaced instances of `agent_focus` with `agent_focus_target_id` across various components to ensure consistent target management.
- Enhanced error handling and logging in `Watchdog` classes to reflect the new target ID approach.
- Improved session retrieval methods to streamline interactions with the `SessionManager`, ensuring better performance and reliability.
2025-11-10 14:29:50 -08:00
Reagan Hsu 85d1a15dc7 use new create api key link 2025-10-28 11:37:42 -07:00
Reagan Hsu 536600678f added listing functionality if no template is provided 2025-10-28 11:30:57 -07:00
Reagan Hsu 185cce58cf fixed --template generation 2025-10-28 11:30:57 -07:00
Reagan Hsu dd1fca43d7 Make init command work without browser-use[cli] extras
- Add click to core dependencies (moved from [cli] optional deps)
- Create standalone browser_use/init_cmd.py with template generation logic
- Add early check in cli.py to redirect 'init' subcommand to init_cmd.py
- This allows 'uvx browser-use init' to work without installing textual/rich

Users can now run template generation with minimal dependencies:
  uvx browser-use init              # Interactive template selection
  uvx browser-use init -t default   # Generate default template
  uvx browser-use init --list       # List available templates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 11:30:52 -07:00
Reagan Hsu fd655903eb default template naming instead of quickstart 2025-10-28 11:28:52 -07:00
Reagan Hsu a4839215f5 Add template generation command for quick project setup
Adds `uvx browser-use init` command to generate starter template files,
  making it easier for users to get started with browser-use.

  Changes:
  - Add `init` subcommand with three template options:
    - quickstart: Minimal setup using ChatBrowserUse
    - advanced: All configuration options with defaults
    - tools: Custom action examples
  - Templates support both CLI syntax:
    - `uvx browser-use init --template <name>`
    - `uvx browser-use --template <name>` (shorthand)
  - Add interactive mode when no template specified
  - Include template files in package build
  - All templates use async patterns with Browser(use_cloud=False)

  Usage:
    uvx browser-use init --template quickstart
    uvx browser-use --template advanced --output my_script.py
    uvx browser-use init --list
2025-10-28 11:28:46 -07:00
Alezander9 195f1f1f0f address cubic comments 2025-10-27 12:28:06 -07:00
ShawnPana 1ca1307545 Make install command work without CLI dependencies 2025-10-26 12:37:39 -07:00
ShawnPana b36524c0ba Apply ruff formatting fixes 2025-10-25 20:37:51 -07:00
ShawnPana 2b3caa3940 init 2025-10-25 19:41:36 -07:00
Sandeep bbb23f58cc fixed ruff linter issues 2025-09-16 03:03:24 +05:30
Sandeep 46009337fd added extra validations. 2025-09-16 01:56:07 +05:30
Saurav Panda 12a0c76a32 feat: fix MCP server JSON-RPC corruption and removed http mode 2025-09-07 19:22:59 -07:00
Saurav Panda 0c62293010 fixed cli auth sync issue 2025-09-06 12:50:08 -07:00
Magnus Müller 304716e30f Enhance authentication flow and user feedback in CLI
- Updated `run_auth_command` to provide detailed authentication status updates and debug information during the authentication process.
- Introduced a new `UpdateAgentSessionEvent` class to facilitate session updates.
- Enhanced `CloudSync` to allow all events during the authentication flow and to show direct links for authenticated users.
- Improved error handling and user messaging for authentication failures.
- Updated documentation to clarify cloud sync settings and authentication instructions.
2025-09-05 13:13:07 -07:00
Magnus Müller cc6bc374b9 Refactor CLI authentication flow and enhance user feedback
- Updated `run_auth_command` to check authentication status before proceeding, providing immediate feedback for already authenticated users.
- Introduced new task events for both authenticated and unauthenticated states to improve user experience during the authentication process.
- Modified the `main` function to include a dedicated `auth` command for easier access to cloud authentication.
- Updated documentation to reflect changes in the authentication process and usage instructions.
2025-09-05 10:49:12 -07:00
Magnus Müller 37e43449db Enhance authentication flow in CLI and sync service
- Refactored `run_auth_command` to establish a session context using a minimal sync service before authentication.
- Introduced `allow_session_events_for_auth` flag in `CloudSync` to permit session events during the authentication process.
- Updated tests to verify that session events are sent correctly before full authentication, ensuring proper event handling based on authentication status.
2025-09-05 10:31:19 -07:00
Magnus Müller 9828d18871 Implement cloud authentication feature in CLI and sync services
- Added `run_auth_command` to handle user authentication via the CLI, allowing users to authenticate with Browser Use Cloud.
- Updated `main` function to trigger authentication when the `--auth` option is used.
- Introduced `authenticate_cloud_sync` method in `CloudSync` to facilitate authentication after task completion.
- Modified `DeviceAuthClient` to handle empty agent session IDs gracefully.
- Updated documentation to include instructions for cloud authentication setup and usage.
- Enhanced tests to verify authentication flow and event handling based on authentication status.
2025-09-05 10:00:33 -07:00
Saurav Panda d2092f895a feat: CLI is back baby! 2025-08-27 17:58:34 -07:00
Magnus Müller b5ff622fa5 Remove cli because it has bugs and not much usage 2025-08-26 15:28:27 -07:00
Magnus Müller 2e650019c5 Rename controller file to tools 2025-08-26 11:08:08 -07:00
Magnus Müller 2a83442f17 Rename Controller to Tools 2025-08-26 11:04:16 -07:00
matt-greathouse 284a2e8a50 Change proxy argument to typed dict to match past format 2025-08-21 10:55:10 -04:00
matt-greathouse 4e0ce78f43 Add authenticated proxy support 2025-08-20 11:17:25 -04:00
Magnus Müller 13dce77c98 Update info logger to debug and clean up logs 2025-08-19 00:02:42 -07:00