Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

addresses cubic

Gregor Žuničb6bdc17bcb3e
diff --git a/browser_use/skill_cli/README.md b/browser_use/skill_cli/README.md
index 4b54c6449..488c18405 100644
--- a/browser_use/skill_cli/README.md
+++ b/browser_use/skill_cli/README.md
@@ -7,9 +7,6 @@ Fast, persistent browser automation from the command line.
```bash
# From the browser-use repo directory
uv pip install -e .
-
-# Or with pip
-pip install -e .
```
## Quick Start
diff --git a/browser_use/skill_cli/api_key.py b/browser_use/skill_cli/api_key.py
index b9bab5680..f18106aa6 100644
--- a/browser_use/skill_cli/api_key.py
+++ b/browser_use/skill_cli/api_key.py
@@ -114,6 +114,8 @@ def save_api_key(key: str) -> None:
config['api_key'] = key
config_path.write_text(json.dumps(config, indent=2))
+ # Restrict permissions to owner only (0600)
+ config_path.chmod(0o600)
print(f'Saved to {config_path}')
diff --git a/browser_use/skill_cli/commands/python_exec.py b/browser_use/skill_cli/commands/python_exec.py
index c8c2cee7b..770ff761e 100644
--- a/browser_use/skill_cli/commands/python_exec.py
+++ b/browser_use/skill_cli/commands/python_exec.py
@@ -40,6 +40,8 @@ async def handle(session: SessionInfo, params: dict[str, Any]) -> Any:
file_path = Path(params['file'])
if not file_path.exists():
return {'success': False, 'error': f'File not found: {file_path}'}
+ if file_path.is_dir():
+ return {'success': False, 'error': f'Path is a directory, not a file: {file_path}'}
code = file_path.read_text()
if not code:
diff --git a/browser_use/skill_cli/server.py b/browser_use/skill_cli/server.py
index 442ae87ed..4ae594f7d 100644
--- a/browser_use/skill_cli/server.py
+++ b/browser_use/skill_cli/server.py
@@ -66,6 +66,7 @@ class SessionServer:
if not line:
break
+ request = {}
try:
request = json.loads(line.decode())
response = await self.dispatch(request)
diff --git a/skills/browser-use/SKILL.md b/skills/browser-use/SKILL.md
index 40cd3cc19..aad693465 100644
--- a/skills/browser-use/SKILL.md
+++ b/skills/browser-use/SKILL.md
@@ -142,7 +142,7 @@ browser-use server logs # View server logs
```bash
browser-use open https://example.com/contact
browser-use state
-# Shows: [0] input "Name", [1] input "Email", [2] textarea "Message", [3] browser-usetton "Submit"
+# Shows: [0] input "Name", [1] input "Email", [2] textarea "Message", [3] button "Submit"
browser-use input 0 "John Doe"
browser-use input 1 "[email protected]"
browser-use input 2 "Hello, this is a test message."
@@ -181,7 +181,7 @@ browser-use state # Already logged in!
## Tips
1. **Always run `browser-use state` first** to see available elements and their indices
-2. **Use `--headed` for debrowser-usegging** to see what the browser is doing
+2. **Use `--headed` for debugging** to see what the browser is doing
3. **Sessions persist** - the browser stays open between commands
4. **Use `--json` for parsing** output programmatically
5. **Python variables persist** across `browser-use python` commands within a session