chromex-mcp 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +386 -382
- package/package.json +7 -6
- package/plugins/chromex/skills/chromex/scripts/chromex.mjs +41 -15
- package/plugins/chromex/skills/chromex/scripts/lib/browser.mjs +9 -7
- package/plugins/chromex/skills/chromex/scripts/lib/commands/app.mjs +558 -0
- package/plugins/chromex/skills/chromex/scripts/lib/commands/console.mjs +34 -6
- package/plugins/chromex/skills/chromex/scripts/lib/commands/cookies.mjs +2 -1
- package/plugins/chromex/skills/chromex/scripts/lib/commands/doctor.mjs +55 -0
- package/plugins/chromex/skills/chromex/scripts/lib/commands/network.mjs +34 -5
- package/plugins/chromex/skills/chromex/scripts/lib/commands/perf.mjs +10 -0
- package/plugins/chromex/skills/chromex/scripts/lib/commands/snapshot.mjs +101 -52
- package/plugins/chromex/skills/chromex/scripts/lib/commands/stats.mjs +4 -1
- package/plugins/chromex/skills/chromex/scripts/lib/commands/storage.mjs +11 -3
- package/plugins/chromex/skills/chromex/scripts/lib/daemon.mjs +70 -20
- package/plugins/chromex/skills/chromex/scripts/lib/hints.mjs +203 -0
- package/plugins/chromex/skills/chromex/scripts/lib/launcher.mjs +14 -7
- package/plugins/chromex/skills/chromex/scripts/lib/output.mjs +74 -0
- package/plugins/chromex/skills/chromex/scripts/mcp-server.mjs +158 -4
package/README.md
CHANGED
|
@@ -1,538 +1,542 @@
|
|
|
1
1
|
# Chromex
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
3
|
+
[](https://www.npmjs.com/package/chromex-mcp)
|
|
4
|
+
[](https://nodejs.org/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
Chromex is a zero-dependency Chrome DevTools Protocol toolkit for AI agents. It connects directly to Chrome, Brave, Edge, Chromium, and Vivaldi through CDP, exposing a token-efficient CLI and an optional MCP server with 73 typed tools.
|
|
8
|
+
|
|
9
|
+
Use Chromex when an agent needs to inspect pages, take screenshots, navigate, click, fill forms, read console/network activity, emulate devices, throttle network/CPU, export PDFs, or run browser diagnostics without pulling in Puppeteer or Playwright.
|
|
10
|
+
|
|
11
|
+
## Why Chromex
|
|
12
|
+
|
|
13
|
+
- **CLI-first for lower token usage**: terminal commands return compact plain text and avoid MCP tool-schema overhead.
|
|
14
|
+
- **Optional MCP server**: 73 typed tools for Claude Code and other MCP clients when tool discovery, typed parameters, and inline screenshots matter more than token budget.
|
|
15
|
+
- **No runtime dependencies**: Node.js 22+ built-ins only, including native WebSocket support.
|
|
16
|
+
- **Agent-friendly page model**: accessibility snapshots, `@eN` refs, incremental diffs, query filters, auto-snapshots, and contextual hints.
|
|
17
|
+
- **Persistent per-tab daemons**: one CDP session per tab, held open through an authenticated Unix socket.
|
|
18
|
+
- **Security controls**: domain allow/block lists, CDP method blocklist, socket auth, command timeouts, and audit logs.
|
|
19
|
+
- **Local by default**: no hosted service, no telemetry client, no bundled browser download, and session stats stay on your machine.
|
|
20
|
+
|
|
21
|
+
## What You Can Do Today
|
|
22
|
+
|
|
23
|
+
- Inspect and automate real logged-in browser sessions, not only fresh headless test contexts.
|
|
24
|
+
- Read page state through compact accessibility snapshots, filtered snapshots, DOM snapshots, HTML, screenshots, and highlighted elements.
|
|
25
|
+
- Act on UI through refs, CSS selectors, coordinates, keyboard input, forms, uploads, drag and drop, touch gestures, dialogs, and load-more loops.
|
|
26
|
+
- Debug production behavior with console history, network request details, response bodies, HAR export, request blocking, API mocking, throttling, and offline mode.
|
|
27
|
+
- Test browser conditions with device presets, viewport resizing, DPR, geolocation, timezone, locale, CPU throttling, incognito contexts, proxies, and custom Chrome flags.
|
|
28
|
+
- Diagnose performance and quality with Core Web Vitals, transfer size, DOM/memory counters, Lighthouse audits, JS/CSS coverage, Chrome traces, and heap snapshots.
|
|
29
|
+
- Validate modern browser flows such as passkey/WebAuthn registration and login, downloads, cookies, storage, PDF export, and isolated profiles.
|
|
30
|
+
- Inspect Application panel state from the terminal: origin quota, storage usage breakdown, Cache Storage entries/bodies, IndexedDB schemas/rows, and Service Worker registrations.
|
|
31
|
+
|
|
32
|
+
## Positioning
|
|
33
|
+
|
|
34
|
+
Chromex is a direct CDP layer for coding agents. It sits between raw Chrome DevTools Protocol and heavier browser automation frameworks.
|
|
35
|
+
|
|
36
|
+
| Alternative | Trade-off | Chromex angle |
|
|
37
|
+
|-------------|-----------|---------------|
|
|
38
|
+
| Raw CDP WebSocket | Maximum browser power, but too verbose for agents. | Compact commands, refs, snapshots, and safety defaults. |
|
|
39
|
+
| Puppeteer or Playwright libraries | Excellent automation frameworks, but they add dependencies and framework-level abstractions. | Zero-runtime-dependency CLI/MCP that talks to your existing Chromium browser. |
|
|
40
|
+
| Browser MCP only | Easy tool discovery, but tool schemas and structured responses add token cost. | CLI-first for cheap agent loops, MCP when typed tools are worth the overhead. |
|
|
41
|
+
| Manual DevTools | Great for humans, not scriptable enough for agents. | DevTools-grade inspection exposed as terminal and MCP commands. |
|
|
20
42
|
|
|
21
43
|
## Requirements
|
|
22
44
|
|
|
23
|
-
- Node.js 22
|
|
24
|
-
-
|
|
45
|
+
- Node.js 22 or newer.
|
|
46
|
+
- macOS or Linux.
|
|
47
|
+
- A Chromium-based browser: Chrome, Brave, Edge, Chromium, Chrome Canary, or Vivaldi.
|
|
25
48
|
|
|
26
|
-
##
|
|
49
|
+
## Zero-Dependency Boundary
|
|
27
50
|
|
|
28
|
-
|
|
29
|
-
# Add to Claude Code (global -- all projects)
|
|
30
|
-
claude mcp add chromex -s user npx chromex-mcp@latest
|
|
51
|
+
The core runtime uses only Node.js built-in modules. Chromex does not install Puppeteer, Playwright, Selenium, browser drivers, telemetry SDKs, update checkers, or bundled browsers.
|
|
31
52
|
|
|
32
|
-
|
|
33
|
-
claude mcp add chromex npx chromex-mcp@latest
|
|
34
|
-
```
|
|
53
|
+
The only exception is the optional `audit` command: it shells out to Lighthouse with `npx --yes lighthouse` when you explicitly run an audit. All other CLI and MCP commands run through Chromex's own CDP client.
|
|
35
54
|
|
|
36
|
-
|
|
55
|
+
Development dependencies are used only for tests and token benchmarks.
|
|
37
56
|
|
|
38
|
-
|
|
57
|
+
## Browser Setup
|
|
39
58
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
Chromex needs Chrome DevTools Protocol access to your browser. Choose one of the two connection modes below before using the CLI or MCP server.
|
|
60
|
+
|
|
61
|
+
### Option A: Launch a Browser with Chromex
|
|
62
|
+
|
|
63
|
+
This is the recommended first-time setup. Chromex starts a new browser process with remote debugging already enabled, so there is no manual browser configuration and no "Allow debugging" prompt.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
chromex launch --url https://example.com
|
|
46
67
|
```
|
|
47
68
|
|
|
48
|
-
|
|
69
|
+
Useful launch variants:
|
|
49
70
|
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"mcp__chromex__chromex_screenshot",
|
|
57
|
-
"mcp__chromex__chromex_perf"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
71
|
+
```bash
|
|
72
|
+
chromex launch --browser brave --url https://example.com
|
|
73
|
+
chromex launch --profile testing --url https://example.com
|
|
74
|
+
chromex launch --incognito --browser chrome
|
|
75
|
+
chromex launch --headless --url https://example.com
|
|
76
|
+
chromex launch --browser-path "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary"
|
|
61
77
|
```
|
|
62
78
|
|
|
63
|
-
|
|
79
|
+
Named profiles are stored under `~/.chromex/profiles/` and keep test sessions isolated from your daily browser profile.
|
|
80
|
+
|
|
81
|
+
Chrome for Testing also works well with Chromex. Download it manually from Google's official Chrome for Testing channel, then point Chromex at the executable with `--browser-path` or `CHROMEX_BROWSER_PATH`. Chromex does not download or bundle a browser.
|
|
82
|
+
|
|
83
|
+
### Option B: Connect to an Already-Running Browser
|
|
84
|
+
|
|
85
|
+
Use this when you want Chromex to inspect tabs that are already open in your normal browser.
|
|
86
|
+
|
|
87
|
+
1. Open Chrome, Brave, Edge, Chromium, or Vivaldi.
|
|
88
|
+
2. Go to `chrome://inspect/#remote-debugging`.
|
|
89
|
+
3. Enable the remote debugging switch.
|
|
90
|
+
4. Run `chromex list` to verify that tabs are visible.
|
|
64
91
|
|
|
65
92
|
```bash
|
|
66
|
-
|
|
93
|
+
chromex list
|
|
67
94
|
```
|
|
68
95
|
|
|
69
|
-
|
|
96
|
+
Important notes:
|
|
70
97
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
98
|
+
- Without remote debugging enabled, Chromex cannot discover or control your open tabs.
|
|
99
|
+
- The browser setting is usually persistent across restarts.
|
|
100
|
+
- The first command that attaches to a tab may show an "Allow debugging" prompt. Accept it once for that tab; Chromex keeps the daemon session alive after that.
|
|
101
|
+
|
|
102
|
+
If your browser uses a custom profile or a non-standard `DevToolsActivePort` location, set:
|
|
76
103
|
|
|
77
104
|
```bash
|
|
78
|
-
|
|
79
|
-
chromex launch --url https://example.com # Launch browser
|
|
80
|
-
chromex snap 6BE8 --refs # Snapshot with refs
|
|
81
|
-
chromex click 6BE8 @e3 # Click by ref
|
|
105
|
+
export CDP_PORT_FILE=/path/to/DevToolsActivePort
|
|
82
106
|
```
|
|
83
107
|
|
|
84
|
-
|
|
108
|
+
If your Chromium executable is installed in a non-standard location, either pass `--browser-path` to `chromex launch` or set:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
export CHROMEX_BROWSER_PATH=/path/to/chrome
|
|
112
|
+
```
|
|
85
113
|
|
|
86
|
-
|
|
114
|
+
Run the local diagnostic command whenever browser discovery or CDP connection fails:
|
|
87
115
|
|
|
88
116
|
```bash
|
|
89
|
-
chromex
|
|
117
|
+
chromex doctor
|
|
90
118
|
```
|
|
91
119
|
|
|
92
|
-
|
|
120
|
+
## Install the CLI
|
|
93
121
|
|
|
94
|
-
|
|
122
|
+
Install the package globally to get the `chromex` command.
|
|
95
123
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
4. Run `chromex list` to verify the connection
|
|
124
|
+
```bash
|
|
125
|
+
# npm
|
|
126
|
+
npm install -g chromex-mcp
|
|
100
127
|
|
|
101
|
-
|
|
128
|
+
# Bun
|
|
129
|
+
bun add -g chromex-mcp
|
|
130
|
+
```
|
|
102
131
|
|
|
103
|
-
|
|
132
|
+
The package installs three binaries:
|
|
104
133
|
|
|
105
|
-
|
|
134
|
+
| Binary | Purpose |
|
|
135
|
+
|--------|---------|
|
|
136
|
+
| `chromex` | Main CLI for terminal, scripts, CI, and token-sensitive agent sessions. |
|
|
137
|
+
| `chromex-cli` | Alias for `chromex`. |
|
|
138
|
+
| `chromex-mcp` | MCP server over stdio JSON-RPC. Usually launched by an MCP client. |
|
|
139
|
+
|
|
140
|
+
## CLI Quick Start
|
|
141
|
+
|
|
142
|
+
The CLI is the recommended interface when token budget matters. It has no MCP schema overhead, works well in scripts, and returns compact plain-text output designed for LLM agents.
|
|
106
143
|
|
|
107
144
|
```bash
|
|
108
|
-
#
|
|
109
|
-
chromex
|
|
110
|
-
# Output: 6BE827FA Example Domain https://example.com
|
|
145
|
+
# 1. Launch or connect to a browser.
|
|
146
|
+
chromex launch --url https://github.com/login
|
|
111
147
|
|
|
112
|
-
#
|
|
113
|
-
chromex
|
|
148
|
+
# 2. List tabs and copy a target prefix.
|
|
149
|
+
chromex list
|
|
150
|
+
# 6BE827FA Sign in to GitHub https://github.com/login
|
|
114
151
|
|
|
115
|
-
#
|
|
152
|
+
# 3. Read the page through the accessibility tree and assign refs.
|
|
116
153
|
chromex snap 6BE8 --refs
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
# @e3 [button] Sign in
|
|
154
|
+
# @e1 [textbox] Username or email address
|
|
155
|
+
# @e2 [textbox] Password
|
|
156
|
+
# @e3 [button] Sign in
|
|
121
157
|
|
|
122
|
-
#
|
|
158
|
+
# 4. Interact by ref instead of fragile CSS selectors.
|
|
123
159
|
chromex fill 6BE8 @e1 "user@example.com"
|
|
124
|
-
chromex fill 6BE8 @e2 "
|
|
160
|
+
chromex fill 6BE8 @e2 "secret"
|
|
125
161
|
chromex click 6BE8 @e3
|
|
126
162
|
|
|
127
|
-
#
|
|
128
|
-
chromex
|
|
163
|
+
# 5. Inspect browser state.
|
|
164
|
+
chromex console 6BE8 list
|
|
165
|
+
chromex net 6BE8
|
|
166
|
+
chromex shot 6BE8 /tmp/page.png
|
|
167
|
+
chromex app 6BE8
|
|
129
168
|
```
|
|
130
169
|
|
|
131
|
-
|
|
170
|
+
`<target>` is a unique prefix of the tab target ID returned by `chromex list`. If a prefix is ambiguous, Chromex rejects it and asks for more characters.
|
|
132
171
|
|
|
133
|
-
|
|
172
|
+
## Token-Efficient Agent Workflow
|
|
134
173
|
|
|
135
|
-
|
|
174
|
+
Chromex is optimized for agents that need to act on browser state without wasting context.
|
|
136
175
|
|
|
137
|
-
|
|
138
|
-
chromex
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
chromex launch --headless --url https://example.com # Headless mode for CI/CD
|
|
145
|
-
chromex launch --proxy socks5://localhost:1080 # Launch with proxy
|
|
146
|
-
chromex launch --insecure # Ignore certificate errors
|
|
147
|
-
chromex launch --chrome-arg --disable-web-security # Pass custom Chrome flag
|
|
148
|
-
chromex launch --profile testing --url https://... # Isolated profile + URL
|
|
149
|
-
chromex incognito https://example.com # Isolated context (no relaunch)
|
|
150
|
-
chromex stop # Stop all daemons
|
|
151
|
-
```
|
|
176
|
+
1. Start with `chromex list`.
|
|
177
|
+
2. Prefer `chromex snap <target> --refs` over raw HTML.
|
|
178
|
+
3. Use `@eN` refs for `click`, `fill`, `hover`, and element screenshots.
|
|
179
|
+
4. On large pages, use `--query` before reading a full snapshot.
|
|
180
|
+
5. Let auto-snapshot show post-action state after interactive commands.
|
|
181
|
+
6. Add `--no-snap` only for fast scripted batches where you do not need immediate page state.
|
|
182
|
+
7. Add `--no-hints` when another program parses output strictly.
|
|
152
183
|
|
|
153
|
-
|
|
184
|
+
Examples:
|
|
154
185
|
|
|
155
186
|
```bash
|
|
156
|
-
chromex snap
|
|
157
|
-
chromex
|
|
158
|
-
chromex
|
|
159
|
-
chromex snap
|
|
160
|
-
chromex html <target> "#main" # Element HTML by selector
|
|
161
|
-
chromex shot <target> /tmp/page.png # Viewport screenshot
|
|
162
|
-
chromex shot <target> /tmp/full.png --full # Full page screenshot
|
|
163
|
-
chromex shot <target> --format=jpeg --quality=80 # JPEG/WebP with quality control
|
|
164
|
-
chromex shot <target> @e5 # Screenshot of specific element by ref
|
|
165
|
-
chromex net <target> # List network requests (CDP tracked)
|
|
166
|
-
chromex net <target> <requestId> # Request detail: headers, timing, body
|
|
167
|
-
chromex perf <target> # Core Web Vitals + memory + DOM stats
|
|
168
|
-
chromex console <target> 5000 # Capture console.log/error for 5s
|
|
169
|
-
chromex console <target> list # Show stored messages since daemon start
|
|
170
|
-
chromex console <target> detail <id> # Message detail with stack trace
|
|
171
|
-
chromex domsnapshot <target> # Structured DOM with bounding rects
|
|
172
|
-
chromex domsnapshot <target> --styles # Include computed styles
|
|
173
|
-
chromex highlight <target> "h1" # Highlight element with overlay
|
|
174
|
-
chromex highlight <target> clear # Remove highlight
|
|
187
|
+
chromex snap 6BE8 --query=login --refs
|
|
188
|
+
chromex click 6BE8 @e4
|
|
189
|
+
chromex wait 6BE8 networkidle
|
|
190
|
+
chromex snap 6BE8 --query=error
|
|
175
191
|
```
|
|
176
192
|
|
|
177
|
-
|
|
193
|
+
## MCP Server
|
|
178
194
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
chromex evalraw <target> "DOM.getDocument" # Raw CDP command
|
|
183
|
-
chromex evalraw <target> "Page.getLayoutMetrics" # Layout info
|
|
184
|
-
```
|
|
195
|
+
Use MCP when you want Claude Code or another MCP client to discover typed browser tools directly. MCP is convenient, but it costs more tokens than CLI usage because tool schemas, JSON-RPC framing, and structured tool results add overhead.
|
|
196
|
+
|
|
197
|
+
### Add to Claude Code
|
|
185
198
|
|
|
186
|
-
|
|
199
|
+
Global, available in all projects:
|
|
187
200
|
|
|
188
201
|
```bash
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
chromex
|
|
194
|
-
chromex waitfor <target> ".results" 10000 # Wait for CSS selector (10s)
|
|
195
|
-
chromex wait <target> networkidle # Wait for network idle
|
|
196
|
-
chromex wait <target> load # Wait for page load
|
|
197
|
-
chromex wait <target> domready # Wait for DOMContentLoaded
|
|
198
|
-
chromex wait <target> fcp # Wait for First Contentful Paint
|
|
199
|
-
chromex scroll <target> down 500 # Scroll down 500px
|
|
200
|
-
chromex scroll <target> up 300 # Scroll up 300px
|
|
201
|
-
chromex scroll <target> top # Scroll to top
|
|
202
|
-
chromex scroll <target> bottom # Scroll to bottom
|
|
203
|
-
chromex scroll <target> to "#footer" # Scroll to element
|
|
202
|
+
# npm
|
|
203
|
+
claude mcp add chromex -s user npx chromex-mcp@latest
|
|
204
|
+
|
|
205
|
+
# Bun
|
|
206
|
+
claude mcp add chromex -s user bunx chromex-mcp@latest
|
|
204
207
|
```
|
|
205
208
|
|
|
206
|
-
|
|
209
|
+
Project-only:
|
|
207
210
|
|
|
208
211
|
```bash
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
chromex key <target> Enter # Press key
|
|
215
|
-
chromex key <target> "Control+A" # Key combination
|
|
216
|
-
chromex key <target> "Control+Shift+R" # Multi-modifier combo
|
|
217
|
-
chromex type <target> "hello world" # Type text (works cross-origin)
|
|
218
|
-
chromex hover <target> @e12 # Hover element by ref
|
|
219
|
-
chromex drag <target> "#source" "#dest" # Drag & drop by selector
|
|
220
|
-
chromex drag <target> 100,200 400,500 # Drag & drop by coordinates
|
|
221
|
-
chromex touch <target> tap 200 300 # Touch tap
|
|
222
|
-
chromex touch <target> swipe 200,400 200,100 # Swipe gesture
|
|
223
|
-
chromex touch <target> pinch 200 300 2.0 # Pinch zoom in
|
|
224
|
-
chromex touch <target> longpress 200 300 1000 # Long press (1s)
|
|
225
|
-
chromex dialog <target> accept # Accept alert/confirm
|
|
226
|
-
chromex dialog <target> dismiss # Dismiss dialog
|
|
227
|
-
chromex dialog <target> auto # Auto-accept all dialogs
|
|
228
|
-
chromex loadall <target> ".load-more" 500 # Click until element disappears
|
|
212
|
+
# npm
|
|
213
|
+
claude mcp add chromex npx chromex-mcp@latest
|
|
214
|
+
|
|
215
|
+
# Bun
|
|
216
|
+
claude mcp add chromex bunx chromex-mcp@latest
|
|
229
217
|
```
|
|
230
218
|
|
|
231
|
-
|
|
219
|
+
After setup, the MCP client can call tools such as `chromex_list`, `chromex_snapshot`, `chromex_click`, `chromex_fill`, `chromex_screenshot`, `chromex_console`, `chromex_network`, `chromex_app_summary`, `chromex_cache_entries`, and `chromex_indexeddb_rows`.
|
|
232
220
|
|
|
233
|
-
|
|
234
|
-
chromex fill <target> "#email" "user@test.com" # Fill input/textarea
|
|
235
|
-
chromex fill <target> @e1 "user@test.com" # Fill by ref
|
|
236
|
-
chromex clear <target> "#search" # Clear field
|
|
237
|
-
chromex select <target> "#country" "BR" # Select dropdown option
|
|
238
|
-
chromex check <target> "#terms" # Check checkbox
|
|
239
|
-
chromex check <target> "#newsletter" false # Uncheck checkbox
|
|
240
|
-
chromex upload <target> "#avatar" /tmp/photo.png # Upload file
|
|
241
|
-
|
|
242
|
-
# Batch fill entire form
|
|
243
|
-
chromex form <target> '{"#name":"John","#email":"john@test.com","#terms":true}'
|
|
244
|
-
```
|
|
221
|
+
### Claude Code Auto-Approve
|
|
245
222
|
|
|
246
|
-
|
|
223
|
+
To approve all Chromex MCP tools at once, add this to `~/.claude/settings.json`:
|
|
247
224
|
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
chromex storage <target> clear # Clear both
|
|
255
|
-
chromex pdf <target> /tmp/page.pdf # Export as PDF
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"permissions": {
|
|
228
|
+
"allow": ["mcp__chromex"]
|
|
229
|
+
}
|
|
230
|
+
}
|
|
256
231
|
```
|
|
257
232
|
|
|
258
|
-
|
|
233
|
+
For CLI usage inside Claude Code, approve the shell command instead:
|
|
259
234
|
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
chromex
|
|
265
|
-
chromex
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
chromex intercept <target> mock "/api/user" '{"name":"test"}' # Mock response
|
|
270
|
-
chromex intercept <target> rules # List active rules
|
|
271
|
-
chromex intercept <target> off # Disable interception
|
|
272
|
-
|
|
273
|
-
chromex har <target> start # Start recording
|
|
274
|
-
chromex har <target> stop /tmp/trace.har # Save HAR file
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"permissions": {
|
|
238
|
+
"allow": [
|
|
239
|
+
"Bash(chromex *)",
|
|
240
|
+
"Bash(chromex-cli *)"
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
}
|
|
275
244
|
```
|
|
276
245
|
|
|
277
|
-
|
|
246
|
+
Review these permissions before enabling them. Chromex security settings still apply, and every command is audit-logged when `auditLog` is enabled.
|
|
278
247
|
|
|
279
|
-
|
|
280
|
-
chromex emulate <target> iphone-14 # 390x844 @3x mobile
|
|
281
|
-
chromex emulate <target> iphone-15-pro # 393x852 @3x mobile
|
|
282
|
-
chromex emulate <target> ipad-pro # 1024x1366 @2x tablet
|
|
283
|
-
chromex emulate <target> pixel-7 # 412x915 @2.625x mobile
|
|
284
|
-
chromex emulate <target> galaxy-s23 # 360x780 @3x mobile
|
|
285
|
-
chromex emulate <target> macbook-air # 1440x900 @2x laptop
|
|
286
|
-
chromex emulate <target> desktop-1080p # 1920x1080 @1x
|
|
287
|
-
chromex emulate <target> desktop-4k # 3840x2160 @1x
|
|
288
|
-
chromex emulate <target> reset # Reset to default
|
|
289
|
-
chromex resize <target> 1280 720 # Custom viewport dimensions
|
|
290
|
-
chromex resize <target> 1440 900 2 # Custom with DPR (retina)
|
|
291
|
-
chromex geo <target> -23.55 -46.63 # Set geolocation (Sao Paulo)
|
|
292
|
-
chromex geo <target> reset # Clear geolocation
|
|
293
|
-
chromex timezone <target> "America/Sao_Paulo" # Set timezone
|
|
294
|
-
chromex locale <target> "pt-BR" # Set locale
|
|
295
|
-
chromex cpu <target> 4 # CPU 4x slower
|
|
296
|
-
chromex cpu <target> reset # Reset CPU speed
|
|
297
|
-
```
|
|
248
|
+
## CLI vs MCP
|
|
298
249
|
|
|
299
|
-
|
|
250
|
+
Both interfaces use the same CDP core and the same per-tab daemons. Choose based on the workflow.
|
|
251
|
+
|
|
252
|
+
| Use case | Prefer CLI | Prefer MCP |
|
|
253
|
+
|----------|------------|------------|
|
|
254
|
+
| Token-sensitive agent sessions | Yes | No |
|
|
255
|
+
| Terminal scripts and CI | Yes | No |
|
|
256
|
+
| Quick one-off browser inspection | Yes | Optional |
|
|
257
|
+
| Typed tool discovery in Claude Code | No | Yes |
|
|
258
|
+
| Inline screenshots returned to the client | No, screenshots are files | Yes |
|
|
259
|
+
| Granular per-tool permissions | Shell pattern only | Yes |
|
|
260
|
+
| Lowest setup friction for MCP users | Optional | Yes |
|
|
261
|
+
|
|
262
|
+
You can remove MCP at any time and keep using the CLI:
|
|
300
263
|
|
|
301
264
|
```bash
|
|
302
|
-
|
|
303
|
-
chromex inject <target> --file /tmp/preload.js # Inject from file
|
|
304
|
-
chromex inject <target> --list # List injected scripts
|
|
305
|
-
chromex inject <target> --remove <id> # Remove injected script
|
|
306
|
-
chromex download <target> allow /tmp/downloads # Auto-accept downloads
|
|
307
|
-
chromex download <target> deny # Block downloads
|
|
308
|
-
chromex coverage <target> start # Start code coverage
|
|
309
|
-
chromex coverage <target> stop # Coverage report (JS + CSS %)
|
|
310
|
-
chromex trace <target> start # Start performance trace
|
|
311
|
-
chromex trace <target> stop /tmp/trace.json # Save trace (chrome://tracing)
|
|
312
|
-
chromex heap <target> snapshot /tmp/heap.hs # Heap snapshot (memory analysis)
|
|
313
|
-
chromex webauthn <target> enable # Virtual authenticator (passkeys)
|
|
314
|
-
chromex webauthn <target> creds # List stored credentials
|
|
315
|
-
chromex webauthn <target> disable # Remove authenticator
|
|
265
|
+
claude mcp remove chromex
|
|
316
266
|
```
|
|
317
267
|
|
|
318
|
-
|
|
268
|
+
## Command Overview
|
|
269
|
+
|
|
270
|
+
### Pages and Browser
|
|
319
271
|
|
|
320
272
|
```bash
|
|
321
|
-
chromex
|
|
322
|
-
chromex
|
|
323
|
-
chromex
|
|
324
|
-
chromex
|
|
325
|
-
chromex
|
|
326
|
-
chromex
|
|
327
|
-
chromex
|
|
273
|
+
chromex list
|
|
274
|
+
chromex open "https://example.com"
|
|
275
|
+
chromex close <target>
|
|
276
|
+
chromex focus <target>
|
|
277
|
+
chromex launch --url https://example.com
|
|
278
|
+
chromex launch --browser brave --incognito
|
|
279
|
+
chromex launch --headless --url https://example.com
|
|
280
|
+
chromex launch --browser-path /path/to/chrome --url https://example.com
|
|
281
|
+
chromex doctor
|
|
282
|
+
chromex incognito https://example.com
|
|
283
|
+
chromex stop
|
|
328
284
|
```
|
|
329
285
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
The killer feature for AI agents. Instead of fragile CSS selectors, use numbered refs:
|
|
286
|
+
### Inspect
|
|
333
287
|
|
|
334
288
|
```bash
|
|
335
|
-
# 1. Get interactive elements with refs
|
|
336
289
|
chromex snap <target> --refs
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
chromex
|
|
346
|
-
chromex fill <target> @e2 "secret123"
|
|
347
|
-
chromex click <target> @e3
|
|
348
|
-
chromex click <target> @e4
|
|
290
|
+
chromex snap <target> --query=login
|
|
291
|
+
chromex html <target> "#main"
|
|
292
|
+
chromex shot <target> /tmp/page.png
|
|
293
|
+
chromex shot <target> /tmp/full.png --full
|
|
294
|
+
chromex shot <target> @e5
|
|
295
|
+
chromex console <target> list
|
|
296
|
+
chromex net <target>
|
|
297
|
+
chromex perf <target>
|
|
298
|
+
chromex domsnapshot <target> --styles
|
|
349
299
|
```
|
|
350
300
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
Supported ref commands: `click @eN`, `fill @eN "value"`, `hover @eN`.
|
|
301
|
+
### Navigate and Wait
|
|
354
302
|
|
|
355
|
-
|
|
303
|
+
```bash
|
|
304
|
+
chromex nav <target> "https://example.com"
|
|
305
|
+
chromex nav <target> back
|
|
306
|
+
chromex nav <target> reload-hard
|
|
307
|
+
chromex waitfor <target> ".results" 10000
|
|
308
|
+
chromex wait <target> networkidle
|
|
309
|
+
chromex scroll <target> bottom
|
|
310
|
+
```
|
|
356
311
|
|
|
357
|
-
|
|
312
|
+
### Interact
|
|
358
313
|
|
|
359
|
-
|
|
314
|
+
```bash
|
|
315
|
+
chromex click <target> @e5
|
|
316
|
+
chromex clickxy <target> 100 200
|
|
317
|
+
chromex key <target> Enter
|
|
318
|
+
chromex type <target> "hello world"
|
|
319
|
+
chromex hover <target> @e12
|
|
320
|
+
chromex drag <target> "#source" "#dest"
|
|
321
|
+
chromex dialog <target> accept
|
|
322
|
+
```
|
|
360
323
|
|
|
361
|
-
|
|
324
|
+
### Forms
|
|
362
325
|
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
326
|
+
```bash
|
|
327
|
+
chromex fill <target> @e1 "user@example.com"
|
|
328
|
+
chromex clear <target> "#search"
|
|
329
|
+
chromex select <target> "#country" "BR"
|
|
330
|
+
chromex check <target> "#terms" true
|
|
331
|
+
chromex upload <target> "#avatar" /tmp/photo.png
|
|
332
|
+
chromex form <target> '{"#name":"John","#email":"john@example.com","#terms":true}'
|
|
367
333
|
```
|
|
368
334
|
|
|
369
|
-
|
|
370
|
-
- Unchanged subtrees are collapsed entirely
|
|
371
|
-
- Use `--full` to force a full snapshot (skips diff)
|
|
372
|
-
- Navigation (`nav`) resets the diff baseline automatically
|
|
373
|
-
|
|
374
|
-
### Depth Limiting
|
|
335
|
+
### Data
|
|
375
336
|
|
|
376
|
-
|
|
337
|
+
```bash
|
|
338
|
+
chromex cookies <target>
|
|
339
|
+
chromex cookies <target> set '{"name":"token","value":"abc"}'
|
|
340
|
+
chromex storage <target> local
|
|
341
|
+
chromex storage <target> session
|
|
342
|
+
chromex storage <target> usage
|
|
343
|
+
chromex app <target> summary
|
|
344
|
+
chromex sw <target>
|
|
345
|
+
chromex cache <target> list
|
|
346
|
+
chromex cache <target> entries <cacheId> --query=/api
|
|
347
|
+
chromex idb <target> list
|
|
348
|
+
chromex idb <target> schema <databaseName>
|
|
349
|
+
chromex idb <target> rows <databaseName> <objectStoreName> --limit=20
|
|
350
|
+
chromex pdf <target> /tmp/page.pdf
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Network, Emulation, and Diagnostics
|
|
377
354
|
|
|
378
355
|
```bash
|
|
379
|
-
chromex
|
|
356
|
+
chromex throttle <target> 3g
|
|
357
|
+
chromex intercept <target> block "*.analytics.*"
|
|
358
|
+
chromex har <target> start
|
|
359
|
+
chromex har <target> stop /tmp/trace.har
|
|
360
|
+
chromex emulate <target> iphone-15-pro
|
|
361
|
+
chromex resize <target> 1280 720
|
|
362
|
+
chromex geo <target> -23.55 -46.63
|
|
363
|
+
chromex timezone <target> "America/Sao_Paulo"
|
|
364
|
+
chromex cpu <target> 4
|
|
365
|
+
chromex audit <target> performance,accessibility desktop
|
|
366
|
+
chromex stats <target> --full
|
|
380
367
|
```
|
|
381
368
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
### Scroll Detection
|
|
385
|
-
|
|
386
|
-
Snapshots automatically detect scrollable containers and report remaining scroll distance:
|
|
369
|
+
### Advanced
|
|
387
370
|
|
|
388
|
-
```
|
|
389
|
-
|
|
371
|
+
```bash
|
|
372
|
+
chromex eval <target> "document.title"
|
|
373
|
+
chromex evalraw <target> "Page.getLayoutMetrics"
|
|
374
|
+
chromex inject <target> "window.DEBUG=true"
|
|
375
|
+
chromex download <target> allow /tmp/downloads
|
|
376
|
+
chromex coverage <target> start
|
|
377
|
+
chromex trace <target> start
|
|
378
|
+
chromex heap <target> snapshot /tmp/heap.heapsnapshot
|
|
379
|
+
chromex webauthn <target> enable
|
|
390
380
|
```
|
|
391
381
|
|
|
392
|
-
|
|
382
|
+
Run `chromex --help` for the full command reference.
|
|
393
383
|
|
|
394
|
-
-
|
|
395
|
-
- Disabled interactive elements are shown but not assigned refs (can't be interacted with)
|
|
396
|
-
- Generic wrapper nodes (`div`, `span` with no semantic role) are collapsed -- their children inherit the parent's depth
|
|
397
|
-
- Names longer than 200 characters are truncated with `...`
|
|
384
|
+
## Agent-Focused Features
|
|
398
385
|
|
|
399
|
-
|
|
386
|
+
### Ref-Based Selection
|
|
400
387
|
|
|
401
|
-
|
|
388
|
+
`chromex snap --refs` assigns stable refs to interactive elements:
|
|
402
389
|
|
|
403
390
|
```bash
|
|
391
|
+
chromex snap <target> --refs
|
|
392
|
+
# @e1 [textbox] Email
|
|
393
|
+
# @e2 [textbox] Password
|
|
394
|
+
# @e3 [button] Sign in
|
|
395
|
+
|
|
396
|
+
chromex fill <target> @e1 "user@example.com"
|
|
404
397
|
chromex click <target> @e3
|
|
405
|
-
# Output:
|
|
406
|
-
# Clicked @e3 [button] "Submit"
|
|
407
|
-
#
|
|
408
|
-
# [incremental: 5 changed, 40 unchanged]
|
|
409
|
-
# @e1 [heading] Thank you!
|
|
410
|
-
# @e2 [link] Back to home
|
|
411
|
-
# ...
|
|
412
398
|
```
|
|
413
399
|
|
|
414
|
-
|
|
400
|
+
Refs are shorter and more robust than CSS selectors for most agent workflows.
|
|
401
|
+
|
|
402
|
+
### Incremental Snapshots
|
|
415
403
|
|
|
416
|
-
|
|
404
|
+
The first snapshot returns the page tree. Later snapshots return only changed nodes unless you pass `--full`.
|
|
417
405
|
|
|
418
406
|
```bash
|
|
419
|
-
chromex
|
|
420
|
-
chromex
|
|
421
|
-
|
|
407
|
+
chromex snap <target> --refs
|
|
408
|
+
chromex click <target> @e3
|
|
409
|
+
# The click response includes a fresh incremental snapshot with refs.
|
|
422
410
|
```
|
|
423
411
|
|
|
424
|
-
|
|
412
|
+
### Query-Filtered Snapshots
|
|
425
413
|
|
|
426
|
-
|
|
414
|
+
Use `--query` to keep output small on large pages:
|
|
427
415
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
| Permissions | All-or-nothing | Per-tool granularity |
|
|
433
|
-
| Parameters | Positional string args | Typed JSON Schema |
|
|
434
|
-
| Screenshots | File path (needs `Read` to view) | Inline image (base64, no extra call) |
|
|
435
|
-
| Best for | Terminal, scripts, CI/CD, token-sensitive sessions | Plug-and-play automation, users who want zero-config |
|
|
416
|
+
```bash
|
|
417
|
+
chromex snap <target> --query=issues --refs
|
|
418
|
+
chromex snap <target> --query="sign in" --refs
|
|
419
|
+
```
|
|
436
420
|
|
|
437
|
-
|
|
421
|
+
Chromex preserves ancestor nodes so the filtered output still has usable context.
|
|
438
422
|
|
|
439
|
-
|
|
423
|
+
### Contextual Hints
|
|
440
424
|
|
|
441
|
-
|
|
425
|
+
After actions that refresh refs, Chromex can append a `help[N]:` block with likely next commands:
|
|
442
426
|
|
|
443
|
-
```
|
|
444
|
-
|
|
427
|
+
```text
|
|
428
|
+
help[3]:
|
|
429
|
+
chromex fill <t> @e1 "<value>" # textbox "Email"
|
|
430
|
+
chromex click <t> @e3 # button "Sign in"
|
|
431
|
+
chromex click <t> @e4 # link "Forgot password?"
|
|
445
432
|
```
|
|
446
433
|
|
|
447
|
-
|
|
434
|
+
Disable hints with `--no-hints`.
|
|
435
|
+
|
|
436
|
+
## Application State Suite
|
|
448
437
|
|
|
449
|
-
|
|
438
|
+
Chromex exposes browser Application panel state without Puppeteer, Playwright, or extra packages. This is useful for debugging PWAs, offline behavior, stale caches, local database migrations, authentication state, and quota issues from the same logged-in browser session an agent is already using.
|
|
450
439
|
|
|
451
440
|
```bash
|
|
452
|
-
#
|
|
453
|
-
|
|
441
|
+
# One-line overview for the current origin
|
|
442
|
+
chromex app <target> summary
|
|
454
443
|
|
|
455
|
-
#
|
|
456
|
-
|
|
457
|
-
```
|
|
444
|
+
# Origin quota and per-storage-type usage
|
|
445
|
+
chromex storage <target> usage
|
|
458
446
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
- You're using chromex from terminal/scripts, not from Claude Code
|
|
447
|
+
# Service Worker registrations and versions
|
|
448
|
+
chromex sw <target>
|
|
449
|
+
chromex sw <target> update https://example.com/
|
|
450
|
+
chromex sw <target> skip-waiting https://example.com/
|
|
464
451
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
- First time using chromex (discovery via tool schema)
|
|
452
|
+
# Cache Storage
|
|
453
|
+
chromex cache <target> list
|
|
454
|
+
chromex cache <target> entries <cacheId> --query=/api
|
|
455
|
+
chromex cache <target> body <cacheId> https://example.com/app.js
|
|
470
456
|
|
|
471
|
-
|
|
457
|
+
# IndexedDB
|
|
458
|
+
chromex idb <target> list
|
|
459
|
+
chromex idb <target> schema app-db
|
|
460
|
+
chromex idb <target> rows app-db users --limit=20
|
|
461
|
+
```
|
|
472
462
|
|
|
473
|
-
|
|
463
|
+
`chromex app <target> summary` includes origin, quota, localStorage key count, sessionStorage key count, cookie count, Cache Storage cache/entry counts, IndexedDB database count, active/waiting Service Worker counts, storage bucket count, and manifest status.
|
|
474
464
|
|
|
475
|
-
|
|
476
|
-
{
|
|
477
|
-
"permissions": {
|
|
478
|
-
"allow": [
|
|
479
|
-
"Bash(chromex-cli *)"
|
|
480
|
-
]
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
```
|
|
465
|
+
Destructive Application commands are explicit: `storage clear-site-data`, `sw unregister`, `cache delete-entry`, `cache delete`, and `idb clear`.
|
|
484
466
|
|
|
485
467
|
## Security
|
|
486
468
|
|
|
487
|
-
|
|
469
|
+
Chromex creates `~/.chromex/config.json` on first run:
|
|
488
470
|
|
|
489
471
|
```json
|
|
490
472
|
{
|
|
491
|
-
"
|
|
473
|
+
"commandTimeout": 15000,
|
|
474
|
+
"navigationTimeout": 30000,
|
|
475
|
+
"idleTimeout": 1200000,
|
|
492
476
|
"allowedDomains": [],
|
|
493
|
-
"
|
|
494
|
-
"
|
|
495
|
-
"auditLog": true
|
|
477
|
+
"blockedDomains": [],
|
|
478
|
+
"blockedCdpMethods": ["Browser.close", "Storage.getCookies"],
|
|
479
|
+
"auditLog": true,
|
|
480
|
+
"socketAuth": true
|
|
496
481
|
}
|
|
497
482
|
```
|
|
498
483
|
|
|
499
|
-
|
|
500
|
-
- **CDP blocklist**: dangerous methods blocked by default in `evalraw`
|
|
501
|
-
- **Socket auth**: 32-byte random token per session (mode 0600)
|
|
502
|
-
- **Audit log**: every command logged with timestamp and status
|
|
484
|
+
Recommended security practices:
|
|
503
485
|
|
|
504
|
-
|
|
486
|
+
- Add sensitive sites to `blockedDomains`, such as email, banking, password managers, and admin panels.
|
|
487
|
+
- Use `allowedDomains` in restricted environments where the agent should access only specific hosts.
|
|
488
|
+
- Keep `socketAuth` enabled.
|
|
489
|
+
- Keep `auditLog` enabled and review `~/.chromex/audit.log` when needed.
|
|
490
|
+
- Prefer `chromex launch --profile testing` for isolated browser state.
|
|
505
491
|
|
|
506
|
-
|
|
492
|
+
See [docs/security.md](docs/security.md) for the full security model.
|
|
507
493
|
|
|
508
|
-
|
|
509
|
-
2. **Daemon spawn** -- first command to a tab spawns a background Node.js process connected via CDP WebSocket
|
|
510
|
-
3. **Session persistence** -- daemon holds the session open; Chrome's "Allow" modal fires once per daemon
|
|
511
|
-
4. **Unix sockets** -- CLI/MCP communicates with daemon via authenticated Unix sockets
|
|
512
|
-
5. **Auto-exit** -- daemons shut down after 20 minutes of inactivity (configurable)
|
|
494
|
+
## How It Works
|
|
513
495
|
|
|
514
|
-
```
|
|
515
|
-
CLI
|
|
516
|
-
MCP Server ──Unix Socket + Auth──> (same) ──CDP WebSocket──> Chrome
|
|
496
|
+
```text
|
|
497
|
+
CLI or MCP client -> authenticated Unix socket -> per-tab daemon -> CDP WebSocket -> browser
|
|
517
498
|
```
|
|
518
499
|
|
|
519
|
-
|
|
500
|
+
1. Chromex finds the browser DevTools endpoint from `DevToolsActivePort` or `CDP_PORT_FILE`.
|
|
501
|
+
2. The first tab command starts a detached daemon for that tab.
|
|
502
|
+
3. The daemon attaches once through CDP and keeps the session open.
|
|
503
|
+
4. CLI and MCP commands talk to the daemon through an authenticated Unix socket.
|
|
504
|
+
5. Daemons exit after the configured idle timeout.
|
|
505
|
+
|
|
506
|
+
See [docs/architecture.md](docs/architecture.md) for implementation details.
|
|
520
507
|
|
|
521
508
|
## Documentation
|
|
522
509
|
|
|
523
510
|
| Guide | Description |
|
|
524
511
|
|-------|-------------|
|
|
525
|
-
| [Getting Started](docs/getting-started.md) | Installation,
|
|
526
|
-
| [Inspect
|
|
527
|
-
| [Navigate
|
|
528
|
-
| [Form Filling](docs/forms.md) | Fill, clear, select, check, upload, batch
|
|
529
|
-
| [Data Access](docs/data.md) | Cookies, localStorage, sessionStorage, PDF export |
|
|
530
|
-
| [Network Control](docs/network.md) | Throttling, interception, mocking, HAR recording |
|
|
531
|
-
| [Device Emulation](docs/emulation.md) | Responsive testing, geolocation, timezone, CPU throttling |
|
|
532
|
-
| [Security](docs/security.md) | Domain filtering, CDP blocklist, audit log, best practices |
|
|
533
|
-
| [Advanced](docs/advanced.md) | Script injection, code coverage, tracing, heap snapshots, WebAuthn |
|
|
534
|
-
| [Architecture](docs/architecture.md) |
|
|
512
|
+
| [Getting Started](docs/getting-started.md) | Installation, browser setup, first commands. |
|
|
513
|
+
| [Inspect and Debug](docs/inspect.md) | Screenshots, accessibility tree, refs, HTML, eval, network, performance, console. |
|
|
514
|
+
| [Navigate and Interact](docs/navigate.md) | Navigation, clicking, typing, scrolling, drag and drop, touch, dialogs. |
|
|
515
|
+
| [Form Filling](docs/forms.md) | Fill, clear, select, check, upload, batch form examples. |
|
|
516
|
+
| [Data Access](docs/data.md) | Cookies, localStorage, sessionStorage, Application state, Cache Storage, IndexedDB, Service Workers, PDF export. |
|
|
517
|
+
| [Network Control](docs/network.md) | Throttling, interception, mocking, HAR recording. |
|
|
518
|
+
| [Device Emulation](docs/emulation.md) | Responsive testing, geolocation, timezone, CPU throttling. |
|
|
519
|
+
| [Security](docs/security.md) | Domain filtering, CDP blocklist, audit log, best practices. |
|
|
520
|
+
| [Advanced](docs/advanced.md) | Script injection, code coverage, tracing, heap snapshots, WebAuthn. |
|
|
521
|
+
| [Architecture](docs/architecture.md) | Daemon model, connection modes, and file layout. |
|
|
522
|
+
|
|
523
|
+
## Development
|
|
524
|
+
|
|
525
|
+
```bash
|
|
526
|
+
git clone https://github.com/whallysson/chromex.git
|
|
527
|
+
cd chromex
|
|
528
|
+
bun install
|
|
529
|
+
bun run test
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
The runtime package has no dependencies. Development dependencies are used only for tests and token benchmarks.
|
|
533
|
+
|
|
534
|
+
To reproduce the token-format comparison:
|
|
535
|
+
|
|
536
|
+
```bash
|
|
537
|
+
bun tests/benchmarks/token-format-comparison.mjs
|
|
538
|
+
```
|
|
535
539
|
|
|
536
540
|
## License
|
|
537
541
|
|
|
538
|
-
MIT
|
|
542
|
+
MIT. See [LICENSE](LICENSE).
|