You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/chrome-devtools-cli/SKILL.md
+13-33Lines changed: 13 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,48 +3,32 @@ name: chrome-devtools-cli
3
3
description: Use this to skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.
4
4
---
5
5
6
-
The `chrome-devtools-mcp`package includes a CLI interface that allows you to interact with the browser directly from your terminal. This is particularly useful for debugging or when you want an agent to generate scripts that automate browser actions.
6
+
The `chrome-devtools-mcp` CLI lets you interact with the browser from your terminal.
7
7
8
-
## Getting started
8
+
## Setup
9
9
10
-
Install the package globally to make the `chrome-devtools` command available:
10
+
_Note: If this is your very first time using the CLI, see [references/installation.md](references/installation.md) for setup. Installation is a one-time prerequisite and is **not** part of the regular AI workflow._
11
11
12
-
```sh
13
-
npm i chrome-devtools-mcp@latest -g
14
-
chrome-devtools status # check if install worked.
15
-
```
16
-
17
-
## How it works
12
+
## AI Workflow
18
13
19
-
The CLI acts as a client to a background `chrome-devtools-mcp` daemon.
14
+
1.**Execute**: Run tools directly (e.g., `chrome-devtools list_pages`). The background server starts implicitly; **do not** run `start`/`status`/`stop` before each use.
15
+
2.**Inspect**: Use `take_snapshot` to get an element `<uid>`.
16
+
3.**Act**: Use `click`, `fill`, etc. State persists across commands.
20
17
21
-
-**Automatic Start**: The first time you call a tool (e.g., `list_pages`), the CLI automatically starts the MCP server and the browser in the background if they aren't already running.
22
-
-**Persistence**: The same background instance is reused for subsequent commands, preserving the browser state (open pages, cookies, etc.).
23
-
-**Manual Control**: You can explicitly manage the background process using `start`, `stop`, and `status`. The `start` command forwards all subsequent arguments to the underlying MCP server (e.g., `--headless`, `--userDataDir`).
Install the package globally to make the `chrome-devtools` command available. You only need to do this the first time you use it.
4
+
5
+
```sh
6
+
npm i chrome-devtools-mcp@latest -g
7
+
chrome-devtools status # check if install worked.
8
+
```
9
+
10
+
## Troubleshooting
11
+
12
+
-**Command not found:** If `chrome-devtools` is not recognized, ensure your global npm `bin` directory is in your system's `PATH`. Restart your terminal or source your shell configuration file (e.g., `.bashrc`, `.zshrc`).
13
+
-**Permission errors:** If you encounter `EACCES` or permission errors during installation, avoid using `sudo`. Instead, use a node version manager like `nvm`, or configure npm to use a different global directory.
14
+
-**Old version running:** Run `chrome-devtools stop && npm uninstall -g chrome-devtools-mcp` before reinstalling, or ensure the latest version is being picked up by your path.
0 commit comments