-
Notifications
You must be signed in to change notification settings - Fork 5.5k
chore(cli): self-documenting cli.config.json
#40081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| // Configuration for Playwright CLI and MCP. | ||
| { | ||
| // The browser to use. | ||
| "browser": { | ||
| // The type of browser to use: "chromium", "firefox", or "webkit". | ||
| // "browserName": "chromium", | ||
|
|
||
| // Keep the browser profile in memory, do not save it to disk. | ||
| // "isolated": false, | ||
|
|
||
| // Path to a user data directory for browser profile persistence. | ||
| // "userDataDir": "/path/to/user-data-dir", | ||
|
|
||
| // Launch options passed to browserType.launchPersistentContext(). | ||
| // See: https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context | ||
| "launchOptions": { | ||
| // "channel": "chrome", | ||
| // "headless": false, | ||
| // "executablePath": "/path/to/browser", | ||
| }, | ||
|
|
||
| // Context options for the browser context. | ||
| "contextOptions": { | ||
| // "viewport": { "width": 1280, "height": 720 }, | ||
| }, | ||
|
|
||
| // Chrome DevTools Protocol endpoint to connect to an existing browser instance. | ||
| // "cdpEndpoint": "http://localhost:9222", | ||
|
|
||
| // Remote endpoint to connect to an existing Playwright server. | ||
| // "remoteEndpoint": "ws://localhost:3000", | ||
|
|
||
| // Paths to JavaScript files to add as initialization scripts. | ||
| // See https://github.com/microsoft/playwright-mcp#initial-state | ||
| // "initScript": [], | ||
|
|
||
| // Paths to TypeScript files to add as initialization scripts for Playwright page. | ||
| // See https://github.com/microsoft/playwright-mcp#initial-state | ||
| // "initPage": [], | ||
| }, | ||
|
|
||
| // Connect to a running browser instance via the Playwright MCP Bridge extension. | ||
| // "extension": false, | ||
|
|
||
| // Secrets to redact from tool responses. | ||
| // "secrets": {}, | ||
|
|
||
| // The directory to save output files. | ||
| // "outputDir": "./.playwright-cli", | ||
|
|
||
| "console": { | ||
| // Level of console messages to return: "error", "warning", "info", or "debug". | ||
| // "level": "info", | ||
| }, | ||
|
|
||
| "network": { | ||
| // Origins to allow the browser to request. Default is to allow all. | ||
| // Formats: "https://example.com:8080", "http://localhost:*" | ||
| // "allowedOrigins": [], | ||
|
|
||
| // Origins to block. Overrides allowedOrigins for matching entries. | ||
| // "blockedOrigins": [], | ||
| }, | ||
|
|
||
| // Attribute to use for test ids. | ||
| // "testIdAttribute": "data-testid", | ||
|
|
||
| "timeouts": { | ||
| // Default action timeout in ms. | ||
| // "action": 5000, | ||
|
|
||
| // Default navigation timeout in ms. | ||
| // "navigation": 60000, | ||
|
|
||
| // Default expect timeout in ms. | ||
| // "expect": 5000, | ||
| }, | ||
|
|
||
| "snapshot": { | ||
| // Snapshot mode for responses: "full" or "none". | ||
| // "mode": "full", | ||
| }, | ||
|
|
||
| // Enable to allow file access outside the workspace. | ||
| // "allowUnrestrictedFileAccess": false, | ||
Skn0tt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // Language for code generation: "typescript" or "none". | ||
| // "codegen": "typescript", | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,10 @@ | |
|
|
||
| import type * as playwright from '../../..'; | ||
|
|
||
| // This file contains type declarations for the MCP and CLI config. Please keep the following files in sync: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this file is copied verbatim to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need the comment so that agents know to keep the other one updated. Why are you concerned about adding it to the other repo? |
||
| // - ../cli-daemon/config.default.json - default config template that is copied to the user's config file upon workspace initialization | ||
| // - configIni.ts - LonghandType type for parsing comes from here | ||
|
|
||
| export type ToolCapability = | ||
| 'config' | | ||
| 'core' | | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.