From 2b3caa394066c87419f969c016208d294b6dfa14 Mon Sep 17 00:00:00 2001 From: ShawnPana Date: Sat, 25 Oct 2025 19:41:36 -0700 Subject: [PATCH 1/9] init --- browser_use/cli.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/browser_use/cli.py b/browser_use/cli.py index 0cac1f1d6..5226e2190 100644 --- a/browser_use/cli.py +++ b/browser_use/cli.py @@ -2004,5 +2004,30 @@ def auth(): asyncio.run(run_auth_command()) +@main.command() +def install(): + """Install Chromium browser with system dependencies""" + import subprocess + + print('šŸ“¦ Installing Chromium browser + system dependencies...') + print('ā³ This may take a few minutes...\n') + + result = subprocess.run([ + 'uvx', + 'playwright', + 'install', + 'chromium', + '--with-deps', + '--no-shell' + ]) + + if result.returncode == 0: + print('\nāœ… Installation complete!') + print('šŸš€ Ready to use! Run: uvx browser-use') + else: + print('\nāŒ Installation failed') + sys.exit(1) + + if __name__ == '__main__': main() From b36524c0ba1a9b9a9393fc4b92f0450a3b63c326 Mon Sep 17 00:00:00 2001 From: ShawnPana Date: Sat, 25 Oct 2025 20:37:51 -0700 Subject: [PATCH 2/9] Apply ruff formatting fixes --- browser_use/cli.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/browser_use/cli.py b/browser_use/cli.py index 5226e2190..1a2a19587 100644 --- a/browser_use/cli.py +++ b/browser_use/cli.py @@ -2012,14 +2012,7 @@ def install(): print('šŸ“¦ Installing Chromium browser + system dependencies...') print('ā³ This may take a few minutes...\n') - result = subprocess.run([ - 'uvx', - 'playwright', - 'install', - 'chromium', - '--with-deps', - '--no-shell' - ]) + result = subprocess.run(['uvx', 'playwright', 'install', 'chromium', '--with-deps', '--no-shell']) if result.returncode == 0: print('\nāœ… Installation complete!') From da5c997c7977c97f5c748842fb017347bcf66ef9 Mon Sep 17 00:00:00 2001 From: ShawnPana Date: Sat, 25 Oct 2025 22:30:46 -0700 Subject: [PATCH 3/9] Update docs to use uvx browser-use install --- AGENTS.MD | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AGENTS.MD b/AGENTS.MD index 43dfa32e9..360330f85 100644 --- a/AGENTS.MD +++ b/AGENTS.MD @@ -63,14 +63,14 @@ Source: (go to or request this content to learn more) https://docs.browser-use.c ```bash install browser-use & chromium theme={null} uv pip install browser-use - uvx playwright install chromium --with-deps + uvx browser-use install ``` ```bash install browser-use & chromium theme={null} pip install browser-use - pip install playwright && playwright install chromium --with-deps + uvx browser-use install ``` diff --git a/README.md b/README.md index 941ec10c6..6e40efe58 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,9 @@ uv sync BROWSER_USE_API_KEY=your-key ``` -**4. Download chromium using playwright's shortcut:** +**4. Install Chromium browser:** ```bash -uvx playwright install chromium --with-deps --no-shell +uvx browser-use install ``` **5. Run your first agent:** From e62d3fa1c817adc03e38ebb670d36a249bb45911 Mon Sep 17 00:00:00 2001 From: ShawnPana Date: Sat, 25 Oct 2025 22:35:02 -0700 Subject: [PATCH 4/9] Update docs/quickstart.mdx to use uvx browser-use install in uv tab --- docs/quickstart.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 2103d4e4f..3f02bfeaa 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -22,8 +22,7 @@ source .venv/bin/activate ``` ```bash install browser-use & chromium uv pip install browser-use -uvx playwright install chromium --with-deps -# Note: this does NOT install playwright, only chromium +uvx browser-use install ``` From ce36f3c65d8a80b9e4c64bd61a75409d6a0b3ade Mon Sep 17 00:00:00 2001 From: ShawnPana Date: Sat, 25 Oct 2025 22:35:22 -0700 Subject: [PATCH 5/9] Update vibetest-use.mdx to use uvx browser-use install --- docs/examples/apps/vibetest-use.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/apps/vibetest-use.mdx b/docs/examples/apps/vibetest-use.mdx index 0235b86b2..dbc829af7 100644 --- a/docs/examples/apps/vibetest-use.mdx +++ b/docs/examples/apps/vibetest-use.mdx @@ -38,7 +38,7 @@ source .venv/bin/activate uv pip install -e . # 4. Install browser runtime once -playwright install chromium --with-deps --no-shell +uvx browser-use install ``` ### 1) Claude Code From 1ca130754546eb93bc5996e65325943f0693d7e2 Mon Sep 17 00:00:00 2001 From: ShawnPana Date: Sun, 26 Oct 2025 12:37:39 -0700 Subject: [PATCH 6/9] Make install command work without CLI dependencies --- browser_use/cli.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/browser_use/cli.py b/browser_use/cli.py index 1a2a19587..9cc75775d 100644 --- a/browser_use/cli.py +++ b/browser_use/cli.py @@ -11,6 +11,23 @@ if '--mcp' in sys.argv: os.environ['BROWSER_USE_SETUP_LOGGING'] = 'false' logging.disable(logging.CRITICAL) +# Special case: install command doesn't need CLI dependencies +if len(sys.argv) > 1 and sys.argv[1] == 'install': + import subprocess + + print('šŸ“¦ Installing Chromium browser + system dependencies...') + print('ā³ This may take a few minutes...\n') + + result = subprocess.run(['uvx', 'playwright', 'install', 'chromium', '--with-deps', '--no-shell']) + + if result.returncode == 0: + print('\nāœ… Installation complete!') + print('šŸš€ Ready to use! Run: uvx browser-use') + else: + print('\nāŒ Installation failed') + sys.exit(1) + sys.exit(0) + import asyncio import json import logging From 409d270aa51fd9302419370cb43c7be9867144a3 Mon Sep 17 00:00:00 2001 From: Alezander9 Date: Mon, 27 Oct 2025 11:56:52 -0700 Subject: [PATCH 7/9] fix basic search example that was messed up some time ago --- examples/getting_started/01_basic_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/getting_started/01_basic_search.py b/examples/getting_started/01_basic_search.py index c82451093..dcdce631a 100644 --- a/examples/getting_started/01_basic_search.py +++ b/examples/getting_started/01_basic_search.py @@ -20,7 +20,7 @@ from browser_use import Agent, ChatBrowserUse async def main(): llm = ChatBrowserUse() - task = "We are testing the send_keys function. Go to https://inputtypes.com/ and focus the input box and type 'hello world'. DO NOT use the input_text action. Only use the send_keys action. Mark the task as done right after using the send_keys action." + task = "Search Google for 'what is browser automation' and tell me the top 3 results" agent = Agent(task=task, llm=llm) await agent.run() From 195f1f1f0f62129fcee8cd0735fbc4b3b35c5493 Mon Sep 17 00:00:00 2001 From: Alezander9 Date: Mon, 27 Oct 2025 12:28:06 -0700 Subject: [PATCH 8/9] address cubic comments --- AGENTS.MD | 14 ++++++-------- README.md | 2 +- .../watchdogs/local_browser_watchdog.py | 14 ++++++++------ browser_use/cli.py | 18 ++++++++++++++++-- docs/examples/apps/vibetest-use.mdx | 2 +- docs/quickstart.mdx | 4 ++-- 6 files changed, 34 insertions(+), 20 deletions(-) diff --git a/AGENTS.MD b/AGENTS.MD index da2850f48..9ec04ba1d 100644 --- a/AGENTS.MD +++ b/AGENTS.MD @@ -50,8 +50,7 @@ source .venv/bin/activate ``` ```bash install browser-use & chromium uv pip install browser-use -uvx playwright install chromium --with-deps -# Note: this does NOT install playwright, only chromium +browser-use install ``` @@ -63,7 +62,7 @@ source .venv/bin/activate ``` ```bash install browser-use & chromium pip install browser-use -pip install playwright && playwright install chromium --with-deps +browser-use install ``` @@ -86,14 +85,14 @@ pip install playwright && playwright install chromium --with-deps ```bash install browser-use & chromium theme={null} uv pip install browser-use - uvx browser-use install + browser-use install ``` ```bash install browser-use & chromium theme={null} pip install browser-use - uvx browser-use install + browser-use install ``` @@ -224,8 +223,7 @@ source .venv/bin/activate ``` ```bash install browser-use & chromium uv pip install browser-use -uvx playwright install chromium --with-deps -# Note: this does NOT install playwright, only chromium +browser-use install ``` @@ -237,7 +235,7 @@ source .venv/bin/activate ``` ```bash install browser-use & chromium pip install browser-use -pip install playwright && playwright install chromium --with-deps +browser-use install ``` diff --git a/README.md b/README.md index 6e40efe58..4b5f2dd63 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ BROWSER_USE_API_KEY=your-key **4. Install Chromium browser:** ```bash -uvx browser-use install +browser-use install ``` **5. Run your first agent:** diff --git a/browser_use/browser/watchdogs/local_browser_watchdog.py b/browser_use/browser/watchdogs/local_browser_watchdog.py index a5460345c..19306e9f4 100644 --- a/browser_use/browser/watchdogs/local_browser_watchdog.py +++ b/browser_use/browser/watchdogs/local_browser_watchdog.py @@ -314,14 +314,16 @@ class LocalBrowserWatchdog(BaseWatchdog): async def _install_browser_with_playwright(self) -> str: """Get browser executable path from playwright in a subprocess to avoid thread issues.""" + import platform + + # Build command - only use --with-deps on Linux (it fails on Windows/macOS) + cmd = ['uvx', 'playwright', 'install', 'chrome'] + if platform.system() == 'Linux': + cmd.append('--with-deps') # Run in subprocess with timeout process = await asyncio.create_subprocess_exec( - 'uvx', - 'playwright', - 'install', - 'chrome', - '--with-deps', + *cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, ) @@ -333,7 +335,7 @@ class LocalBrowserWatchdog(BaseWatchdog): if browser_path: return browser_path self.logger.error(f'[LocalBrowserWatchdog] āŒ Playwright local browser installation error: \n{stdout}\n{stderr}') - raise RuntimeError('No local browser path found after: uvx playwright install chrome --with-deps') + raise RuntimeError('No local browser path found after: uvx playwright install chrome') except TimeoutError: # Kill the subprocess if it times out process.kill() diff --git a/browser_use/cli.py b/browser_use/cli.py index 9cc75775d..279731bd6 100644 --- a/browser_use/cli.py +++ b/browser_use/cli.py @@ -13,12 +13,19 @@ if '--mcp' in sys.argv: # Special case: install command doesn't need CLI dependencies if len(sys.argv) > 1 and sys.argv[1] == 'install': + import platform import subprocess print('šŸ“¦ Installing Chromium browser + system dependencies...') print('ā³ This may take a few minutes...\n') - result = subprocess.run(['uvx', 'playwright', 'install', 'chromium', '--with-deps', '--no-shell']) + # Build command - only use --with-deps on Linux (it fails on Windows/macOS) + cmd = ['uvx', 'playwright', 'install', 'chromium'] + if platform.system() == 'Linux': + cmd.append('--with-deps') + cmd.append('--no-shell') + + result = subprocess.run(cmd) if result.returncode == 0: print('\nāœ… Installation complete!') @@ -2024,12 +2031,19 @@ def auth(): @main.command() def install(): """Install Chromium browser with system dependencies""" + import platform import subprocess print('šŸ“¦ Installing Chromium browser + system dependencies...') print('ā³ This may take a few minutes...\n') - result = subprocess.run(['uvx', 'playwright', 'install', 'chromium', '--with-deps', '--no-shell']) + # Build command - only use --with-deps on Linux (it fails on Windows/macOS) + cmd = ['uvx', 'playwright', 'install', 'chromium'] + if platform.system() == 'Linux': + cmd.append('--with-deps') + cmd.append('--no-shell') + + result = subprocess.run(cmd) if result.returncode == 0: print('\nāœ… Installation complete!') diff --git a/docs/examples/apps/vibetest-use.mdx b/docs/examples/apps/vibetest-use.mdx index dbc829af7..f826227b1 100644 --- a/docs/examples/apps/vibetest-use.mdx +++ b/docs/examples/apps/vibetest-use.mdx @@ -38,7 +38,7 @@ source .venv/bin/activate uv pip install -e . # 4. Install browser runtime once -uvx browser-use install +browser-use install ``` ### 1) Claude Code diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 3f02bfeaa..48731820f 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -22,7 +22,7 @@ source .venv/bin/activate ``` ```bash install browser-use & chromium uv pip install browser-use -uvx browser-use install +browser-use install ``` @@ -34,7 +34,7 @@ source .venv/bin/activate ``` ```bash install browser-use & chromium pip install browser-use -pip install playwright && playwright install chromium --with-deps +browser-use install ``` From 007e7a8dccf7903b8d75ec6262621610269f432b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20M=C3=BCller?= <67061560+MagMueller@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:00:04 -0700 Subject: [PATCH 9/9] Bump version from 0.9.1 to 0.9.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e3c6d6a1e..b5d015931 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "browser-use" description = "Make websites accessible for AI agents" authors = [{ name = "Gregor Zunic" }] -version = "0.9.1" +version = "0.9.2" readme = "README.md" requires-python = ">=3.11,<4.0" classifiers = [