Skip to content

Commit 1ab4a33

Browse files
committed
chore: re-wrap cli
1 parent 937ad0b commit 1ab4a33

File tree

2 files changed

+18
-22
lines changed

2 files changed

+18
-22
lines changed

README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -151,26 +151,21 @@ Run `npx chrome-devtools-mcp@latest --help` to see all available configuration o
151151

152152
```sh
153153
Options:
154-
--version Show version number [boolean]
155-
-u, --browserUrl The browser URL to connect to [string]
156-
--headless Whether to run in headless (no UI) mode [boolean] [default: false]
157-
-e, --executablePath Path to custom Chrome executable [string]
158-
--isolated If specified, creates a temporary user-data-dir that is automatically
159-
cleaned up after the browser is closed. [boolean] [default: false]
160-
--channel System installed browser channel to use.
161-
[string] [choices: "stable", "canary", "beta", "dev"]
162-
--help Show help [boolean]
154+
--version Show version number [boolean]
155+
-u, --browserUrl The browser URL to connect to [string]
156+
--headless Whether to run in headless (no UI) mode [boolean] [default: false]
157+
-e, --executablePath Path to custom Chrome executable [string]
158+
--isolated If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. [boolean] [default: false]
159+
--channel System installed browser channel to use. [string] [choices: "stable", "canary", "beta", "dev"]
160+
--help Show help [boolean]
163161

164162
Examples:
165-
npx chrome-devtools-mcp@latest --browserUrl Connect to an existing browser instance
166-
http://127.0.0.1:9222
167-
npx chrome-devtools-mcp@latest --channel beta Use Chrome Beta installed on this system
168-
npx chrome-devtools-mcp@latest --channel canary Use Chrome Canary installed on this system
169-
npx chrome-devtools-mcp@latest --channel dev Use Chrome Dev installed on this system
170-
npx chrome-devtools-mcp@latest --channel stable Use stable Chrome installed on this system
171-
npx chrome-devtools-mcp@latest --logFile Save logs to a file
172-
/tmp/log.txt
173-
npx chrome-devtools-mcp@latest --help Print CLI options
163+
npx chrome-devtools-mcp@latest --browserUrl http://127.0.0.1:9222 Connect to an existing browser instance
164+
npx chrome-devtools-mcp@latest --channel beta Use Chrome Beta installed on this system
165+
npx chrome-devtools-mcp@latest --channel canary Use Chrome Canary installed on this system
166+
npx chrome-devtools-mcp@latest --channel dev Use Chrome Dev installed on this system
167+
npx chrome-devtools-mcp@latest --channel stable Use stable Chrome installed on this system
168+
npx chrome-devtools-mcp@latest --logFile /tmp/log.txt Save logs to a file
169+
npx chrome-devtools-mcp@latest --help Print CLI options
174170
```
175-
176171
<!-- END AUTO GENERATED CLI -->

src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ import path from 'node:path';
3434
import fs from 'node:fs';
3535
import assert from 'node:assert';
3636

37-
export const args = yargs(hideBin(process.argv))
37+
export const yargsInstance = yargs(hideBin(process.argv))
3838
.scriptName('npx chrome-devtools-mcp@latest')
39-
.wrap(100)
4039
.option('browserUrl', {
4140
type: 'string',
4241
description: 'The browser URL to connect to',
@@ -102,7 +101,9 @@ export const args = yargs(hideBin(process.argv))
102101
['$0 --help', 'Print CLI options'],
103102
])
104103

105-
.help()
104+
.help();
105+
export const args = yargsInstance
106+
.wrap(Math.min(120, yargsInstance.terminalWidth()))
106107
.parseSync();
107108

108109
if (args.logFile) {

0 commit comments

Comments
 (0)