Commit Graph

84 Commits

Author SHA1 Message Date
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
Nick Sweeting
fcc38f6f44 bump cli default models to gpt-5-mini 2025-08-14 05:03:38 -07:00
Nick Sweeting
7a0889cf20 formatting 2025-08-12 04:14:53 -07:00
Nick Sweeting
d1e569eb31 raise BrowserError exceptions instead of returning success=False 2025-08-12 04:14:53 -07:00
Nick Sweeting
cb5fb38036 cli fixes and types for input 2025-08-11 13:50:59 -07:00
Nick Sweeting
394e22bb1f whoops 2025-08-10 21:44:19 -07:00
Nick Sweeting
293e9d85eb wip cli fixes 2025-08-10 21:44:19 -07:00
Nick Sweeting
66b21d634d clean up logging setup and tests 2025-08-09 03:41:34 -07:00
Nick Sweeting
645742fb17 fix cdp logging 2025-08-09 03:36:36 -07:00
Nick Sweeting
31fb754473 finish connecting feature flags 2025-08-08 20:23:18 -07:00
Nick Sweeting
77e18cf79c dont click on file inputs or dropdowns 2025-08-08 19:33:34 -07:00
Nick Sweeting
20b4b2a684 feature flags for iframes and recent_events, split security and nav actions 2025-08-08 19:13:10 -07:00
Nick Sweeting
557067b8e9 remove expect_download param from click action 2025-08-08 17:42:46 -07:00
Nick Sweeting
3bb8fb0fee improve focus tracking 2025-08-08 07:15:04 -07:00
Nick Sweeting
0bf206bb28 attach state events 2025-08-06 05:26:06 -07:00
Nick Sweeting
032f314a41 Merge branch 'main' into local-remote-split 2025-08-04 19:44:05 -07:00
mertunsall
9bd0036223 separate agent history and state 2025-08-02 15:48:49 +01:00
Nick Sweeting
659c5145f6 more event-driven refactoring 2025-08-01 02:42:01 -07:00
Nick Sweeting
ac0d5cf630 wip 2025-07-31 03:38:07 -07:00
Fureigh
b85b4b4e4d Fix incorrect pip install prompt for CLI addon
The install instruction for the `browser-use[cli]` addon was
missing quotes, which can cause issues in some shells.

Updated to `pip install "browser-use[cli]"` to ensure correct
behavior across environments.
2025-07-14 14:21:20 -07:00
Magnus Müller
be3c4526d6 Update message retrieval method in BrowserUseApp to use get_messages() for improved task extraction from message history. 2025-07-08 23:41:31 +02:00
Nick Sweeting
b2a84b2296 fix tests and other improvements 2025-07-08 02:32:03 -07:00
Nick Sweeting
9b552ee8ac test and telemetry fixes 2025-07-08 01:37:47 -07:00
Nick Sweeting
6dcf479fc6 add readme MCP section and fix lint errors 2025-07-07 17:07:06 -07:00
mertunsall
220f0bc994 update models to gpt-4.1 2025-07-05 10:32:49 +02:00
mertunsall
3b53e8b495 fix linter 2025-07-01 12:23:52 +02:00