Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,14 @@ python -m webwright.run.cli \

### 🚩 Flags

| Flag | Description |
|------|-------------|
| Flag / Command | Description |
|----------------|-------------|
| `-c` | Config file(s) from `src/webwright/config/` (stackable). |
| `-t` | Task instruction. |
| `--start-url` | Initial page. |
| `--task-id` | Output subfolder name. |
| `-o` | Output directory. |
| `list-configs` | Print all available built-in config file names (`python -m webwright.run.cli list-configs`). |
Comment on lines +201 to +208

---

Expand Down
13 changes: 12 additions & 1 deletion src/webwright/run/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from rich.console import Console

from webwright.agents import get_agent
from webwright.config import get_config_from_spec, snapshot_config_specs
from webwright.config import builtin_config_dir, get_config_from_spec, snapshot_config_specs
from webwright.environments import get_environment
from webwright.models import get_model
from webwright.utils.serialize import UNSET, recursive_merge
Expand Down Expand Up @@ -131,6 +131,17 @@ def run_one(
return result


@app.command("list-configs")
def list_configs() -> None:
"""List all available built-in config files."""
configs = sorted(builtin_config_dir.glob("*.yaml"))
if not configs:
console.print("No config files found.")
return
for path in configs:
console.print(path.name)
Comment on lines +134 to +142


@app.command()
def main(
task: str = typer.Option(..., "-t", "--task", help="Natural language task description."),
Expand Down