Skip to content

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

default template naming instead of quickstart

Reagan Hsufd655903eb52
diff --git a/browser_use/cli.py b/browser_use/cli.py
index 3d83d4755..1058caa98 100644
--- a/browser_use/cli.py
+++ b/browser_use/cli.py
@@ -1879,8 +1879,8 @@ async def run_auth_command():
@click.option('--version', is_flag=True, help='Print version and exit')
@click.option(
'--template',
- type=click.Choice(['quickstart', 'advanced', 'tools'], case_sensitive=False),
- help='Generate a template file (quickstart, advanced, or tools)',
+ type=click.Choice(['default', 'advanced', 'tools'], case_sensitive=False),
+ help='Generate a template file (default, advanced, or tools)',
)
@click.option('--output', '-o', type=click.Path(), help='Output file path for template (default: browser_use_<template>.py)')
@click.option('--force', '-f', is_flag=True, help='Overwrite existing files without asking')
@@ -1907,7 +1907,7 @@ def main(ctx: click.Context, debug: bool = False, **kwargs):
Run without arguments to start the interactive TUI.
Examples:
- uvx browser-use --template quickstart
+ uvx browser-use --template default
uvx browser-use --template advanced --output my_script.py
"""
@@ -2075,8 +2075,8 @@ def install():
# Template metadata
INIT_TEMPLATES = {
- 'quickstart': {
- 'file': 'quickstart_template.py',
+ 'default': {
+ 'file': 'default_template.py',
'description': 'Simplest setup - capable of any web task with minimal configuration',
},
'advanced': {
@@ -2148,7 +2148,7 @@ def _write_init_file(output_path: Path, content: str, force: bool = False) -> bo
@click.option(
'--template',
'-t',
- type=click.Choice(['quickstart', 'advanced', 'tools'], case_sensitive=False),
+ type=click.Choice(['default', 'advanced', 'tools'], case_sensitive=False),
help='Template to use',
)
@click.option(
@@ -2186,8 +2186,8 @@ def init(
uvx browser-use init
\b
- # Generate quickstart template
- uvx browser-use init --template quickstart
+ # Generate default template
+ uvx browser-use init --template default
\b
# Generate advanced template with custom filename
@@ -2214,8 +2214,8 @@ def init(
template = click.prompt(
'Which template would you like to use?',
- type=click.Choice(['quickstart', 'advanced', 'tools'], case_sensitive=False),
- default='quickstart',
+ type=click.Choice(['default', 'advanced', 'tools'], case_sensitive=False),
+ default='default',
)
# Template is guaranteed to be set at this point (either from option or prompt)
diff --git a/browser_use/cli_templates/advanced_template.py b/browser_use/cli_templates/advanced_template.py
index 0b240e0d1..5fdb84556 100644
--- a/browser_use/cli_templates/advanced_template.py
+++ b/browser_use/cli_templates/advanced_template.py
@@ -33,7 +33,7 @@ async def main():
task='Find the number of stars of the browser-use repository on GitHub',
llm=llm,
browser=browser,
- # use_vision='auto',
+ # use_vision='auto',
# save_conversation_path=None,
# max_failures=3,
# generate_gif=False,
diff --git a/browser_use/cli_templates/quickstart_template.py b/browser_use/cli_templates/default_template.py
similarity index 79%
rename from browser_use/cli_templates/quickstart_template.py
rename to browser_use/cli_templates/default_template.py
index 806fca674..5e53725ce 100644
--- a/browser_use/cli_templates/quickstart_template.py
+++ b/browser_use/cli_templates/default_template.py
@@ -1,7 +1,7 @@
"""
-Quickstart Example
+Default browser-use example using ChatBrowserUse
-This is the simplest way to use Browser Use- capable of any web task,
+The simplest way to use browser-use - capable of any web task
with minimal configuration.
"""
diff --git a/browser_use/cli_templates/tools_template.py b/browser_use/cli_templates/tools_template.py
index e48ff45de..7e86dabc7 100644
--- a/browser_use/cli_templates/tools_template.py
+++ b/browser_use/cli_templates/tools_template.py
@@ -16,6 +16,7 @@ load_dotenv()
# Create a Tools instance to register custom actions
tools = Tools()
+
@tools.registry.action('Save text content to a file')
async def save_to_file(filename: str, content: str):
from pathlib import Path