Skip to content

Commit 62b16eb

Browse files
authored
chore: sync upstream + 0.2.1 patch (#7)
* docs: rebrand CLI guide for Brave * 0.2.1
1 parent 0f8263a commit 62b16eb

4 files changed

Lines changed: 25 additions & 25 deletions

File tree

docs/cli.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
# Chrome DevTools CLI
1+
# Brave DevTools CLI
22

3-
The `chrome-devtools-mcp` package includes an **experimental** 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.
3+
The `brave-devtools-mcp` package includes an **experimental** 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.
44

55
## Getting started
66

7-
Install the package globally to make the `chrome-devtools` command available:
7+
Install the package globally to make the `brave-devtools` command available:
88

99
```sh
10-
npm i chrome-devtools-mcp@latest -g
11-
chrome-devtools status # check if install worked.
10+
npm i brave-devtools-mcp@latest -g
11+
brave-devtools status # check if install worked.
1212
```
1313

1414
## How it works
1515

16-
The CLI acts as a client to a background `chrome-devtools-mcp` daemon (uses Unix sockets on Linux/Mac and named pipes on Windows).
16+
The CLI acts as a client to a background `brave-devtools-mcp` daemon (uses Unix sockets on Linux/Mac and named pipes on Windows).
1717

1818
- **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.
1919
- **Persistence**: The same background instance is reused for subsequent commands, preserving the browser state (open pages, cookies, etc.).
20-
- **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`) but not all args are supported. Run `chrome-devtools start --help` for supported args. Headless is enabled by default. Isolated is enabled by default unless `--userDataDir` is provided.
20+
- **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`) but not all args are supported. Run `brave-devtools start --help` for supported args. Headless is enabled by default. Isolated is enabled by default unless `--userDataDir` is provided.
2121

2222
```sh
2323
# Check if the daemon is running
24-
chrome-devtools status
24+
brave-devtools status
2525

2626
# Navigate the current page to a URL
27-
chrome-devtools navigate_page "https://google.com"
27+
brave-devtools navigate_page url --url "https://google.com"
2828

2929
# Take a screenshot and save it to a file
30-
chrome-devtools take_screenshot --filePath screenshot.png
30+
brave-devtools take_screenshot --filePath screenshot.png
3131

3232
# Stop the background daemon when finished
33-
chrome-devtools stop
33+
brave-devtools stop
3434
```
3535

3636
## Command Usage
3737

3838
The CLI supports all tools available in the [Tool reference](./tool-reference.md).
3939

4040
```sh
41-
chrome-devtools <tool> [arguments] [flags]
41+
brave-devtools <tool> [arguments] [flags]
4242
```
4343

4444
- **Required Arguments**: Passed as positional arguments.
@@ -49,53 +49,53 @@ chrome-devtools <tool> [arguments] [flags]
4949
**New Page and Navigation:**
5050

5151
```sh
52-
chrome-devtools new_page "https://example.com"
53-
chrome-devtools navigate_page "https://web.dev" --type url
52+
brave-devtools new_page "https://example.com"
53+
brave-devtools navigate_page url --url "https://web.dev"
5454
```
5555

5656
**Interaction:**
5757

5858
```sh
5959
# Click an element by its UID from a snapshot
60-
chrome-devtools click "element-uid-123"
60+
brave-devtools click "element-uid-123"
6161

6262
# Fill a form field
63-
chrome-devtools fill "input-uid-456" "search query"
63+
brave-devtools fill "input-uid-456" "search query"
6464
```
6565

6666
**Analysis:**
6767

6868
```sh
6969
# Run a Lighthouse audit (defaults to navigation mode)
70-
chrome-devtools lighthouse_audit --mode snapshot
70+
brave-devtools lighthouse_audit --mode snapshot
7171
```
7272

7373
## Output format
7474

7575
By default, the CLI outputs a human-readable summary of the tool's result. For programmatic use, you can request raw JSON:
7676

7777
```sh
78-
chrome-devtools list_pages --output-format=json
78+
brave-devtools list_pages --output-format=json
7979
```
8080

8181
## Troubleshooting
8282

8383
If the CLI hangs or fails to connect, try stopping the background process:
8484

8585
```sh
86-
chrome-devtools stop
86+
brave-devtools stop
8787
```
8888

8989
For more verbose logs, set the `DEBUG` environment variable:
9090

9191
```sh
92-
DEBUG=* chrome-devtools list_pages
92+
DEBUG=* brave-devtools list_pages
9393
```
9494

9595
## CLI generation
9696

9797
Implemented in `scripts/generate-cli.ts`. Some commands are excluded from CLI
9898
generation such as `wait_for` and `fill_form`.
9999

100-
`chrome-devtools-mcp` args are also filtered in `src/bin/chrome-devtools.ts`
100+
`brave-devtools-mcp` args are also filtered in `src/bin/brave-devtools.ts`
101101
because not all args make sense in a CLI interface.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "brave-mcp",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "MCP server for Brave DevTools",
55
"type": "module",
66
"bin": {

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
export const VERSION = '0.1.0';
7+
export const VERSION = '0.2.1';

0 commit comments

Comments
 (0)