enhancement : Add onboarding validation command (webwright doctor)
Add webwright doctor onboarding validation command
Summary
Add a webwright doctor CLI command that validates local environment setup and provides actionable fixes for common onboarding/runtime issues.
Current State
Webwright setup currently requires multiple manual steps:
- Python environment setup
- Playwright installation
- Chromium browser installation
- Claude/Codex plugin setup
- API key configuration
- Browser runtime validation
When something is misconfigured, failures often happen later during runtime with limited debugging guidance.
Examples:
- Missing Chromium binaries
- Playwright not installed
- Missing API keys
- Plugin manifest/configuration issues
- Screenshot permission failures
This creates onboarding friction for new contributors and users.
Desired State
Provide a command:
webwright doctor
that validates the local environment before runtime.
Example output:
Webwright Doctor
[PASS] Python 3.11 detected
[PASS] playwright installed
[FAIL] Chromium missing
Fix: playwright install chromium
[PASS] OPENAI_API_KEY detected
[FAIL] Claude plugin manifest missing
4/6 checks passed
Proposed Checks
Environment
- Python version compatibility
- Required package availability
- Writable directories
Playwright
- Playwright installation
- Chromium/browser availability
- Headless launch validation
Configuration
- API key detection
- Plugin manifest detection
- Environment variable validation
Runtime Validation
- Launch browser
- Open simple webpage
- Capture screenshot successfully
Proposed Implementation
New Module
webwright/run/doctor.py
CLI Integration
@app.command()
def doctor():
run_doctor()
Suggested Structure
CHECKS = [
check_python,
check_playwright,
check_chromium,
check_api_keys,
check_plugins,
check_screenshot,
]
Optional Enhancements
--verbose--fix- JSON output mode
- CI compatibility
Benefits
- Easier onboarding
- Better contributor experience
- Faster debugging
- Fewer duplicate setup issues
- Reduced maintainer support burden
Scope
This should be relatively self-contained and beginner/intermediate contributor friendly.
Greetings sir @subramanya-dev i would love to work on this issue can you allow me ? by assigning this issue to me?
@shankumar7 I had already assigned this issue to myself and completed the implementation. I’ve raised the PR.