Skip to content

[Docs/Feature] Support global configuration file #307

@gslvly

Description

@gslvly

Problem

Currently, playwright-cli only supports project-level configuration via .playwright/cli.config.json. There's no documented way to set global configuration that applies across all projects.

For example, I want to always use --extension mode to connect to my browser, but I have to specify it every time:

playwright-cli --extension open https://example.com

Proposed Solution

Support a global configuration file, similar to how many CLI tools work:

  1. ~/.playwright/cli.config.json - user-level global config
  2. .playwright/cli.config.json - project-level config (current behavior)

Project config could override/merge with global config.

Example global config:

{
  "extension": true
}

This would make playwright-cli open automatically use --extension mode.

Alternative

Document environment variable PLAYWRIGHT_MCP_EXTENSION=true as a way to set global defaults, similar to other PLAYWRIGHT_MCP_* environment variables already documented.

Current Workaround

Using shell alias:

alias playwright-cli='playwright-cli --extension'

But this doesn't work well for coding agents that spawn new processes without loading shell config.

References

The README mentions:

  • Project config: .playwright/cli.config.json
  • Environment variables: PLAYWRIGHT_MCP_*

But there's no clear guidance on setting persistent global defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions