-
Notifications
You must be signed in to change notification settings - Fork 244
Description
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.comProposed Solution
Support a global configuration file, similar to how many CLI tools work:
~/.playwright/cli.config.json- user-level global config.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.