Skip to content

enhancement : Add onboarding validation command (webwright doctor) #21

@subramanya-dev

Description

@subramanya-dev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions