@playwright/cli
Advanced tools
+3
-3
| { | ||
| "name": "@playwright/cli", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Playwright CLI", | ||
@@ -21,3 +21,3 @@ "repository": { | ||
| "devDependencies": { | ||
| "@playwright/test": "1.59.0-alpha-1770426101000", | ||
| "@playwright/test": "1.59.0-alpha-1771104257000", | ||
| "@types/node": "^25.2.1" | ||
@@ -27,3 +27,3 @@ }, | ||
| "minimist": "^1.2.5", | ||
| "playwright": "1.59.0-alpha-1770426101000" | ||
| "playwright": "1.59.0-alpha-1771104257000" | ||
| }, | ||
@@ -30,0 +30,0 @@ "bin": { |
@@ -18,7 +18,2 @@ #!/usr/bin/env node | ||
| const { program } = require('playwright/lib/mcp/terminal/program'); | ||
| const packageLocation = require.resolve('./package.json'); | ||
| program(packageLocation).catch(e => { | ||
| console.error(e.message); | ||
| process.exit(1); | ||
| }); | ||
| require('playwright/lib/cli/client/program'); |
+53
-16
@@ -77,7 +77,7 @@ # playwright-cli | ||
| Playwright CLI will use a dedicated persistent profile by default. It means that | ||
| your cookies and other storage state will be preserved between the calls. You can use different | ||
| instances of the browser for different projects with sessions. | ||
| Playwright CLI keeps the browser profile in memory by default. Your cookies and storage state | ||
| are preserved between CLI calls within the session, but lost when the browser closes. Use | ||
| `--persistent` to save the profile to disk for persistence across browser restarts. | ||
| Following will result in two browsers with separate profiles being available. Pass `-s=` to | ||
| You can use different instances of the browser for different projects with sessions. Pass `-s=` to | ||
| the invocation to talk to a specific browser. | ||
@@ -87,3 +87,3 @@ | ||
| playwright-cli open https://playwright.dev | ||
| playwright-cli -s=example open https://example.com | ||
| playwright-cli -s=example open https://example.com --persistent | ||
| playwright-cli list | ||
@@ -108,4 +108,24 @@ ``` | ||
| <!-- BEGIN GENERATED CLI HELP --> | ||
| ## Monitoring | ||
| Use `playwright-cli show` to open a visual dashboard that lets you see and control all running | ||
| browser sessions. This is useful when your coding agents are running browser automation in the | ||
| background and you want to observe their progress or step in to help. | ||
| ```bash | ||
| playwright-cli show | ||
| ``` | ||
| <img width="1107" height="729" alt="Image" src="https://github.com/user-attachments/assets/99df739d-106a-4520-b004-bb315db41da7" /> | ||
| The dashboard opens a window with two views: | ||
| - **Session grid** — shows all active sessions grouped by workspace, each with a live screencast | ||
| preview, session name, current URL, and page title. Click any session to zoom in. | ||
| - **Session detail** — shows a live view of the selected session with a tab bar, navigation | ||
| controls (back, forward, reload, address bar), and full remote control. Click into the viewport | ||
| to take over mouse and keyboard input; press Escape to release. | ||
| From the grid you can also close running sessions or delete data for inactive ones. | ||
| ## Commands | ||
@@ -228,13 +248,5 @@ | ||
| ### Install | ||
| ### Open parameters | ||
| ```bash | ||
| playwright-cli install --skills # install skills | ||
| playwright-cli install-browser # install browser | ||
| ``` | ||
| ### Configuration | ||
| ```bash | ||
| playwright-cli config [options] # configure session settings | ||
| playwright-cli open --browser=chrome # use specific browser | ||
@@ -249,2 +261,19 @@ playwright-cli open --extension # connect via browser extension | ||
| ### Snapshots | ||
| After each command, playwright-cli provides a snapshot of the current browser state. | ||
| ```bash | ||
| > playwright-cli goto https://example.com | ||
| ### Page | ||
| - Page URL: https://example.com/ | ||
| - Page Title: Example Domain | ||
| ### Snapshot | ||
| [Snapshot](.playwright-cli/page-2026-02-14T19-22-42-679Z.yml) | ||
| ``` | ||
| You can also take a snapshot on demand using `playwright-cli snapshot` command. | ||
| If `--filename` is not provided, a new snapshot file is created with a timestamp. Default to automatic file naming, use `--filename=` when artifact is a part of the workflow result. | ||
| ### Sessions | ||
@@ -260,4 +289,12 @@ | ||
| ``` | ||
| <!-- END GENERATED CLI HELP --> | ||
| ### Local installation | ||
| In some cases you might want to install playwright-cli locally. If running the globally available `playwright-cli` binary fails, use `npx playwright-cli` to run the commands. For example: | ||
| ```bash | ||
| npx playwright-cli open https://example.com | ||
| npx playwright-cli click e1 | ||
| ``` | ||
| ## Configuration file | ||
@@ -264,0 +301,0 @@ |
33782
4.59%505
7.91%17
-22.73%+ Added
+ Added
- Removed
- Removed