feat: add list-configs subcommand to CLI
Problem
New users have no way to discover which config files are available without browsing the source tree. The -c flag requires knowing a config filename in advance, creating friction for first-time users trying to switch backends (e.g. from OpenAI to Anthropic).
Fix
Add a list-configs subcommand to the Typer app that prints the names of all .yaml files in the built-in config directory. Update the README flags table to document the new command.
Changes
src/webwright/run/cli.py— addedlist_configs()command decorated with@app.command("list-configs"); importsbuiltin_config_dirfromwebwright.configREADME.md— addedlist-configsrow to the flags table with usage example
Not affected
- The existing
maincommand — not touched; no flags changed webwright/config/__init__.py—builtin_config_dirwas already exported; no changes needed
Fixed in fda3bcd.
Converted main from @app.command() to @app.callback(invoke_without_command=True). When Typer sees a callback with this flag, it invokes the callback for every execution but only runs a subcommand if one is explicitly named — so the existing python -m webwright.run.cli -c base.yaml -t "..." form continues to work unchanged, while list-configs is still reachable as an explicit subcommand.
Changed --task from required (...) to optional (None) in the callback signature (required only when no subcommand is present), and added an early return when ctx.invoked_subcommand is not None so the callback is a no-op during list-configs. No changes needed to the README Quick Start or run_command.sh.