- 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>
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
- 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.
- 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.
- 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.
- 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.
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.