cbrowser 19.5.0 → 20.0.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 +292 -232
- package/THIRD_PARTY_LICENSES.md +455 -7
- package/dist/analysis/accessibility-empathy.d.ts.map +1 -1
- package/dist/analysis/accessibility-empathy.js +2 -0
- package/dist/analysis/accessibility-empathy.js.map +1 -1
- package/dist/analysis/competitive-benchmark.d.ts.map +1 -1
- package/dist/analysis/competitive-benchmark.js +70 -558
- package/dist/analysis/competitive-benchmark.js.map +1 -1
- package/dist/analysis/natural-language.d.ts.map +1 -1
- package/dist/analysis/natural-language.js +43 -0
- package/dist/analysis/natural-language.js.map +1 -1
- package/dist/analysis/persona-comparison.d.ts +7 -0
- package/dist/analysis/persona-comparison.d.ts.map +1 -1
- package/dist/analysis/persona-comparison.js +8 -1
- package/dist/analysis/persona-comparison.js.map +1 -1
- package/dist/browser-options.d.ts +23 -0
- package/dist/browser-options.d.ts.map +1 -0
- package/dist/browser-options.js +24 -0
- package/dist/browser-options.js.map +1 -0
- package/dist/browser.d.ts +36 -14
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +172 -202
- package/dist/browser.js.map +1 -1
- package/dist/cli-args.d.ts +9 -1
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +35 -7
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-browser-flags.d.ts +33 -0
- package/dist/cli-browser-flags.d.ts.map +1 -0
- package/dist/cli-browser-flags.js +89 -0
- package/dist/cli-browser-flags.js.map +1 -0
- package/dist/cli.js +1058 -478
- package/dist/cli.js.map +1 -1
- package/dist/cognitive/index.d.ts +5 -13
- package/dist/cognitive/index.d.ts.map +1 -1
- package/dist/cognitive/index.js +44 -15
- package/dist/cognitive/index.js.map +1 -1
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +16 -6
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +9 -5
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +102 -36
- package/dist/daemon.js.map +1 -1
- package/dist/device-names.d.ts +10 -0
- package/dist/device-names.d.ts.map +1 -0
- package/dist/device-names.js +16 -0
- package/dist/device-names.js.map +1 -0
- package/dist/device-presets-devtools.d.ts +3 -0
- package/dist/device-presets-devtools.d.ts.map +1 -0
- package/dist/device-presets-devtools.js +823 -0
- package/dist/device-presets-devtools.js.map +1 -0
- package/dist/devices.d.ts +35 -0
- package/dist/devices.d.ts.map +1 -0
- package/dist/devices.js +214 -0
- package/dist/devices.js.map +1 -0
- package/dist/eval-script.d.ts +29 -0
- package/dist/eval-script.d.ts.map +1 -0
- package/dist/eval-script.js +46 -0
- package/dist/eval-script.js.map +1 -0
- package/dist/help-client.d.ts +48 -0
- package/dist/help-client.d.ts.map +1 -0
- package/dist/help-client.js +96 -0
- package/dist/help-client.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +165 -2281
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-tools/base/advanced-interaction-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/advanced-interaction-tools.js +21 -21
- package/dist/mcp-tools/base/advanced-interaction-tools.js.map +1 -1
- package/dist/mcp-tools/base/assertion-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/assertion-tools.js +6 -3
- package/dist/mcp-tools/base/assertion-tools.js.map +1 -1
- package/dist/mcp-tools/base/audit-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/audit-tools.js +15 -4
- package/dist/mcp-tools/base/audit-tools.js.map +1 -1
- package/dist/mcp-tools/base/browser-state-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/browser-state-tools.js +33 -27
- package/dist/mcp-tools/base/browser-state-tools.js.map +1 -1
- package/dist/mcp-tools/base/bug-analysis-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/bug-analysis-tools.js +9 -2
- package/dist/mcp-tools/base/bug-analysis-tools.js.map +1 -1
- package/dist/mcp-tools/base/capture-tools.d.ts +60 -4
- package/dist/mcp-tools/base/capture-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/capture-tools.js +118 -14
- package/dist/mcp-tools/base/capture-tools.js.map +1 -1
- package/dist/mcp-tools/base/index.d.ts +6 -5
- package/dist/mcp-tools/base/index.d.ts.map +1 -1
- package/dist/mcp-tools/base/index.js +7 -6
- package/dist/mcp-tools/base/index.js.map +1 -1
- package/dist/mcp-tools/base/interaction-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/interaction-tools.js +20 -6
- package/dist/mcp-tools/base/interaction-tools.js.map +1 -1
- package/dist/mcp-tools/base/navigation-tools.d.ts +1 -1
- package/dist/mcp-tools/base/navigation-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/navigation-tools.js +83 -3
- package/dist/mcp-tools/base/navigation-tools.js.map +1 -1
- package/dist/mcp-tools/base/site-knowledge-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/site-knowledge-tools.js +11 -23
- package/dist/mcp-tools/base/site-knowledge-tools.js.map +1 -1
- package/dist/mcp-tools/base/visual-testing-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/visual-testing-tools.js +13 -3
- package/dist/mcp-tools/base/visual-testing-tools.js.map +1 -1
- package/dist/mcp-tools/enterprise-stubs.d.ts +2 -2
- package/dist/mcp-tools/enterprise-stubs.d.ts.map +1 -1
- package/dist/mcp-tools/enterprise-stubs.js +29 -16
- package/dist/mcp-tools/enterprise-stubs.js.map +1 -1
- package/dist/mcp-tools/index.d.ts +19 -14
- package/dist/mcp-tools/index.d.ts.map +1 -1
- package/dist/mcp-tools/index.js +2 -2
- package/dist/mcp-tools/index.js.map +1 -1
- package/dist/mcp-tools/red-zone-refusal.d.ts +33 -0
- package/dist/mcp-tools/red-zone-refusal.d.ts.map +1 -0
- package/dist/mcp-tools/red-zone-refusal.js +43 -0
- package/dist/mcp-tools/red-zone-refusal.js.map +1 -0
- package/dist/mcp-tools/tier-gate.js +1 -1
- package/dist/mcp-tools/tier-gate.js.map +1 -1
- package/dist/mcp-tools/tool-categories.d.ts.map +1 -1
- package/dist/mcp-tools/tool-categories.js +2 -0
- package/dist/mcp-tools/tool-categories.js.map +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +18 -2
- package/dist/output.js.map +1 -1
- package/dist/performance/metrics.d.ts +8 -3
- package/dist/performance/metrics.d.ts.map +1 -1
- package/dist/performance/metrics.js +16 -5
- package/dist/performance/metrics.js.map +1 -1
- package/dist/recording/contact-sheet.js.map +1 -1
- package/dist/security/tool-permissions.d.ts.map +1 -1
- package/dist/security/tool-permissions.js +1 -0
- package/dist/security/tool-permissions.js.map +1 -1
- package/dist/testing/coverage.d.ts +2 -2
- package/dist/testing/coverage.d.ts.map +1 -1
- package/dist/testing/coverage.js +6 -2
- package/dist/testing/coverage.js.map +1 -1
- package/dist/testing/flaky-detection.d.ts +2 -2
- package/dist/testing/flaky-detection.d.ts.map +1 -1
- package/dist/testing/flaky-detection.js +11 -3
- package/dist/testing/flaky-detection.js.map +1 -1
- package/dist/testing/nl-test-suite.d.ts +20 -0
- package/dist/testing/nl-test-suite.d.ts.map +1 -1
- package/dist/testing/nl-test-suite.js +7 -1
- package/dist/testing/nl-test-suite.js.map +1 -1
- package/dist/testing/suite-results.d.ts +27 -0
- package/dist/testing/suite-results.d.ts.map +1 -0
- package/dist/testing/suite-results.js +54 -0
- package/dist/testing/suite-results.js.map +1 -0
- package/dist/testing/test-repair.d.ts +2 -2
- package/dist/testing/test-repair.d.ts.map +1 -1
- package/dist/testing/test-repair.js +6 -2
- package/dist/testing/test-repair.js.map +1 -1
- package/dist/types.d.ts +61 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +17 -103
- package/dist/types.js.map +1 -1
- package/dist/visual/ab-comparison.d.ts.map +1 -1
- package/dist/visual/ab-comparison.js +7 -2
- package/dist/visual/ab-comparison.js.map +1 -1
- package/dist/visual/cross-browser.d.ts +7 -2
- package/dist/visual/cross-browser.d.ts.map +1 -1
- package/dist/visual/cross-browser.js +33 -5
- package/dist/visual/cross-browser.js.map +1 -1
- package/dist/visual/distance-metrics.d.ts +7 -0
- package/dist/visual/distance-metrics.d.ts.map +1 -1
- package/dist/visual/distance-metrics.js.map +1 -1
- package/dist/visual/heatmap-overlay.js.map +1 -1
- package/dist/visual/llm-relevance.d.ts.map +1 -1
- package/dist/visual/llm-relevance.js.map +1 -1
- package/dist/visual/regression.d.ts +17 -7
- package/dist/visual/regression.d.ts.map +1 -1
- package/dist/visual/regression.js +77 -38
- package/dist/visual/regression.js.map +1 -1
- package/dist/visual/responsive.d.ts +22 -0
- package/dist/visual/responsive.d.ts.map +1 -1
- package/dist/visual/responsive.js +44 -7
- package/dist/visual/responsive.js.map +1 -1
- package/dist/visual/visual-overlays.js.map +1 -1
- package/dist/webhooks.d.ts +67 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +128 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +23 -24
package/README.md
CHANGED
|
@@ -1,62 +1,78 @@
|
|
|
1
|
-
# CBrowser
|
|
1
|
+
# CBrowser: Cognitive Browser Automation
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **Browser automation that thinks like your users.** 130 MCP tools, 21 built-in personas, a CLI, and a library. It predicts where a real person gives up before they do.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/cbrowser)
|
|
6
6
|
[](https://cbrowser.ai/docs)
|
|
7
7
|
[](LICENSE)
|
|
8
|
-
[](https://modelcontextprotocol.io)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
[](https://nodejs.org/)
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
14
|
-
npx cbrowser cognitive-effort --url "https://your-site.com" --persona first-timer
|
|
13
|
+
npx cbrowser agent-ready-audit "https://your-site.com" --html
|
|
15
14
|
```
|
|
16
15
|
|
|
17
16
|
---
|
|
18
17
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
Get from zero to your first cognitive insight in 3 commands:
|
|
18
|
+
## Quickstart
|
|
22
19
|
|
|
23
20
|
```bash
|
|
24
|
-
# 1. Install
|
|
25
|
-
npm install cbrowser
|
|
21
|
+
# 1. Install (Node.js 20.9 or newer). Installing also downloads Chromium.
|
|
22
|
+
npm install -g cbrowser
|
|
23
|
+
|
|
24
|
+
# 2. Check the environment
|
|
25
|
+
cbrowser doctor
|
|
26
26
|
|
|
27
|
-
#
|
|
28
|
-
|
|
27
|
+
# 3. Free, keyless audits
|
|
28
|
+
cbrowser agent-ready-audit "https://your-site.com" --html
|
|
29
|
+
cbrowser empathy-audit "https://your-site.com" --personas cognitive-adhd,low-vision-magnified --html
|
|
29
30
|
|
|
30
|
-
#
|
|
31
|
-
|
|
31
|
+
# 4. A simulated visitor (needs an Anthropic API key)
|
|
32
|
+
cbrowser config set-api-key <your-anthropic-key>
|
|
33
|
+
cbrowser cognitive-journey --persona first-timer --start "https://your-site.com" --goal "sign up"
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
If the browser download was skipped (for example with `--ignore-scripts`), run `npx playwright install chromium`.
|
|
35
37
|
|
|
36
|
-
**
|
|
38
|
+
**Stuck? Ask the docs.** `cbrowser ask` sends your question to cbrowser.ai and prints an AI answer grounded in the documentation, with its sources. No account or API key is needed; it is rate-limited.
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
|
-
|
|
41
|
+
cbrowser ask "Which persona should I use for a screen reader user?"
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
The `question_answer` MCP tool does the same from Claude, including on the local `npx cbrowser mcp-server`.
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
### What needs an API key
|
|
47
|
+
|
|
48
|
+
| Free, no key | Needs an Anthropic API key (each step is a model call) |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `navigate`, `click`, `fill`, `type`, `scroll`, `screenshot`, `extract`, `evaluate` | `cognitive-journey` |
|
|
51
|
+
| `agent-ready-audit`, `ai-benchmark`, `empathy-audit` (without `--goal`) | `explore` (a short cognitive journey) |
|
|
52
|
+
| `test-suite`, `repair-tests`, `flaky-check`, `hunt-bugs`, `chaos` | `compare-personas` (one journey per persona) |
|
|
53
|
+
| `ai-visual`, `cross-browser`, `responsive`, `ab`, `perf`, `a11y audit` | `competitive-benchmark` (one journey per site) |
|
|
54
|
+
| `capture`, `har`, `network`, `console`, `daemon`, `ask` | `empathy-audit --goal` (the journey part) |
|
|
55
|
+
|
|
56
|
+
Since 20.0 nothing falls back to a keyless guess. The old keyless modes of `explore` and `competitive-benchmark` reported goals as reached when a goal word, "the" included, appeared on the page, so they now refuse without a key. A journey that is replayed from a saved trace is free (see [Replay](#replay-a-journey-for-free)).
|
|
57
|
+
|
|
58
|
+
**Output for scripts and screen readers:** `--no-color` (or `NO_COLOR`), `--plain` (no emoji or box drawing; pass and fail marks become `[PASS]` and `[FAIL]`), and `--json-output` (one JSON envelope on stdout).
|
|
45
59
|
|
|
46
60
|
---
|
|
47
61
|
|
|
48
62
|
## Table of Contents
|
|
49
63
|
|
|
50
|
-
- [
|
|
64
|
+
- [Quickstart](#quickstart)
|
|
65
|
+
- [Upgrading to 20.0.0](#upgrading-to-2000)
|
|
51
66
|
- [Cognitive Transport Chain](#cognitive-transport-chain)
|
|
52
|
-
- [Visual Overlays
|
|
67
|
+
- [Visual Overlays and Attention Analysis](#visual-overlays-and-attention-analysis)
|
|
53
68
|
- [AI Friendliness Suite](#ai-friendliness-suite)
|
|
54
69
|
- [Cognitive User Simulation](#cognitive-user-simulation)
|
|
55
70
|
- [Accessibility Empathy Testing](#accessibility-empathy-testing)
|
|
56
71
|
- [Constitutional AI Safety](#constitutional-ai-safety)
|
|
57
|
-
- [
|
|
72
|
+
- [Browser Control from the CLI](#browser-control-from-the-cli)
|
|
58
73
|
- [Natural Language Testing](#natural-language-testing)
|
|
59
74
|
- [Visual Testing](#visual-testing)
|
|
75
|
+
- [Screen Capture](#screen-capture)
|
|
60
76
|
- [Competitive UX Benchmark](#competitive-ux-benchmark)
|
|
61
77
|
- [Geo Proxy](#geo-proxy)
|
|
62
78
|
- [MCP Server Integration](#mcp-server-integration)
|
|
@@ -64,14 +80,47 @@ npx cbrowser config set-api-key <your-anthropic-key>
|
|
|
64
80
|
- [API Reference](#api-reference)
|
|
65
81
|
- [Configuration](#configuration)
|
|
66
82
|
- [Enterprise Edition](#enterprise-edition)
|
|
67
|
-
- [Contributing](#contributing)
|
|
68
83
|
- [License](#license)
|
|
69
84
|
|
|
70
85
|
---
|
|
71
86
|
|
|
87
|
+
## Upgrading to 20.0.0
|
|
88
|
+
|
|
89
|
+
20.0 is a breaking release. Most of it makes commands that used to succeed silently either do what they claim or fail out loud. The full list is in [CHANGELOG.md](CHANGELOG.md).
|
|
90
|
+
|
|
91
|
+
**Runtime**
|
|
92
|
+
- Node.js 20.9 or newer. Node 18 is end of life and sharp 0.35 dropped it; stay on cbrowser 19.x if you need Node 18.
|
|
93
|
+
|
|
94
|
+
**Behaviour you may notice**
|
|
95
|
+
- The default page size is **1920x1080** (was 1280x800), the size `desktop` means everywhere else. Set `CBROWSER_VIEWPORT_WIDTH`/`CBROWSER_VIEWPORT_HEIGHT` or `viewport` in the config file to keep the old size.
|
|
96
|
+
- Pages render in the host's locale and timezone unless you set `--locale`/`--timezone`, `CBROWSER_LOCALE`/`CBROWSER_TIMEZONE` or the config file (it was en-US and America/Denver). Env vars and the config file are no longer overridden by built-in values.
|
|
97
|
+
- A one-off `--device` or `--geo` no longer sticks to later commands.
|
|
98
|
+
- `explore`, `CBrowser.journey()` and `competitive-benchmark` need an Anthropic API key. Their keyless heuristic modes are gone (see above).
|
|
99
|
+
- Commands that fail exit 1. That includes unknown subcommands, failed clicks and navigations through the daemon, `record start/stop/save` (which never recorded across commands and now refuse), `perf audit` and `visual compare` failures, and `daemon status` when nothing is running.
|
|
100
|
+
- Commands that check their flags reject flags they never read. `--quiet` is gone, since nothing read it.
|
|
101
|
+
- `--json-output`: `extract`, `analyze` and `network list` put their data in `data`. Other commands still return captured text lines in `data.output`.
|
|
102
|
+
- `--plain` and `--json-output` text keep pass, fail and warning marks as `[PASS]`, `[FAIL]` and `[WARN]`.
|
|
103
|
+
- With `--html` and an `--output` that does not end in `.json`, the HTML report goes to `<name>.report.html` instead of overwriting the JSON.
|
|
104
|
+
- `repair-tests` saves its report with `--json-out <file>`; `--json` prints it.
|
|
105
|
+
- Size names: `mobile` is 393x852, `tablet` 834x1194 and `desktop` 1920x1080 in every tool (the CLI's `responsive` and MCP `responsive_test` used smaller sizes). The old sizes remain as `tablet-sm` (768x1024) and `desktop-md` (1440x900); `desktop-xl` is 2560x1440.
|
|
106
|
+
|
|
107
|
+
**MCP**
|
|
108
|
+
- `npx cbrowser mcp-server` (stdio) now registers the same tool set as the hosted server, 130 tools plus 7 local-only ones. It had its own copy of 82 tools.
|
|
109
|
+
- Red-zone refusals from `click`, `smart_click`, `press_key`, `type_text`, `drag` and `evaluate_script` are tool errors with one shape (`isError`, `zone: "red"`, `howToRun`). On the hosted server a refused call is refunded.
|
|
110
|
+
- `get_network_requests` returns the newest 50. `manage_cookies` `set` writes a session cookie unless `expires` is given.
|
|
111
|
+
- `compare_personas_record_result` and `compare_personas_summarize` are removed; nothing could create the session they needed.
|
|
112
|
+
- The five Enterprise marketing stubs use the Enterprise server's tool names and parameters.
|
|
113
|
+
|
|
114
|
+
**CI**
|
|
115
|
+
- The GitHub Action's `sensitivity` input is removed (test-suite never read it).
|
|
116
|
+
|
|
117
|
+
Upgrading from 18.x? The 19.0 change was the agent-ready `accessibility` axis becoming `agentPerceivability`: `score.accessibility` is `score.agentPerceivability`, `summary.dynamicContentCount` is `summary.deferredLoadingPatterns`, and `comparison.bestAccessibility` is `comparison.bestAgentPerceivability`.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
72
121
|
## Cognitive Transport Chain
|
|
73
122
|
|
|
74
|
-
The eight-layer Sequential Transport Chain computes
|
|
123
|
+
The eight-layer Sequential Transport Chain computes how hard a page is for a given persona, and predicts whether they abandon. Each layer answers one question about the visitor:
|
|
75
124
|
|
|
76
125
|
| Layer | The Question It Answers | Research Basis |
|
|
77
126
|
|-------|------------------------|----------------|
|
|
@@ -84,66 +133,60 @@ The eight-layer Sequential Transport Chain computes exactly how hard your page i
|
|
|
84
133
|
| **Readability** | Can they decode the words on the page? | Perry & Zorzi (2013) reading model |
|
|
85
134
|
| **Reading Attention** | Can they hold the line long enough to finish? | Sustained attention (split from Readability) |
|
|
86
135
|
|
|
87
|
-
The chain is *sequential* because attention is a budget, not a checklist. Each layer's cost is paid from whatever the layers before it left behind: a visitor who burned working memory just finding the button has less left for the form, and a persona who arrives at your pricing table already frustrated reads it differently
|
|
136
|
+
The chain is *sequential* because attention is a budget, not a checklist. Each layer's cost is paid from whatever the layers before it left behind: a visitor who burned working memory just finding the button has less left for the form, and a persona who arrives at your pricing table already frustrated reads it differently from one who got there clean. That is why a page that exhausts people early scores differently from one that is uniformly hard, and why the bottleneck layer matters more than the average.
|
|
88
137
|
|
|
89
|
-
Two layers were split out of their
|
|
138
|
+
Two layers were split out of their neighbours because they fail for different reasons. **Motor Procedure** is separate from **Motor** because hitting a target and completing a sequence are different failures: you can land every click and still lose your place halfway through a form. **Reading Attention** is separate from **Readability** because decoding text and holding your place in it are different abilities: an ADHD reader typically decodes fine and loses the thread, and a single "reading" score cannot say that.
|
|
90
139
|
|
|
91
|
-
|
|
92
|
-
npx cbrowser cognitive-effort --url "https://your-site.com" --persona first-timer
|
|
93
|
-
# → CTC: 0.76, abandonment risk: 42%, bottleneck: decision
|
|
94
|
-
```
|
|
140
|
+
The chain runs through the MCP tool `cognitive_effort` (there is no CLI command for it):
|
|
95
141
|
|
|
96
|
-
|
|
142
|
+
```text
|
|
143
|
+
cognitive_effort(url: "https://your-site.com", persona: "first-timer")
|
|
144
|
+
-> CTC score, per-layer breakdown, bottleneck layer, abandonment risk, motor overlay
|
|
145
|
+
```
|
|
97
146
|
|
|
98
147
|
---
|
|
99
148
|
|
|
100
|
-
## Visual Overlays
|
|
101
|
-
|
|
102
|
-
See where users look, what they miss, and whether your CTAs capture attention — per persona:
|
|
149
|
+
## Visual Overlays and Attention Analysis
|
|
103
150
|
|
|
104
|
-
|
|
105
|
-
# Full visual cognitive story — 4 annotated images + narrative
|
|
106
|
-
npx cbrowser visual-cognitive-story --url "https://your-site.com" --persona cognitive-adhd
|
|
151
|
+
See where users look, what they miss, and whether your calls to action capture attention, per persona. These are MCP tools:
|
|
107
152
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
153
|
+
| MCP tool | What it returns |
|
|
154
|
+
|---|---|
|
|
155
|
+
| `visual_cognitive_story` | Four annotated images and a narrative for one persona |
|
|
156
|
+
| `attention_analysis` | Predicted attention heatmap for one persona |
|
|
157
|
+
| `attention_compare` | How two personas experience the same page |
|
|
158
|
+
| `journey_heatmap_gif` | An animated heatmap of a journey |
|
|
114
159
|
|
|
115
|
-
**Overlays
|
|
116
|
-
- **Attention heatmap** — CIE-Lab saliency on grayscale base (red = high attention)
|
|
117
|
-
- **Motor accessibility** — Green/yellow/red per element by P(hit)
|
|
118
|
-
- **Attention quality** — CTAs green, distractors red, headings blue
|
|
119
|
-
- **Comparison diff** — Blue = persona A attention, red = persona B
|
|
160
|
+
**Overlays:** attention heatmap (CIE-Lab saliency on a grayscale base, red is high attention), motor accessibility (green, yellow or red per element by probability of a hit), attention quality (calls to action green, distractors red, headings blue) and a comparison diff (blue is persona A, red is persona B).
|
|
120
161
|
|
|
121
|
-
**Metrics:** CTA capture rate, value
|
|
162
|
+
**Metrics:** CTA capture rate, value-prop salience, distractor ratio, quality score (0-100), entropy.
|
|
122
163
|
|
|
123
164
|
---
|
|
124
165
|
|
|
125
166
|
## AI Friendliness Suite
|
|
126
167
|
|
|
127
|
-
|
|
168
|
+
Make your site work for AI agents as well as people:
|
|
128
169
|
|
|
129
170
|
| Tool | What It Does |
|
|
130
171
|
|------|-------------|
|
|
131
|
-
| `agent_ready_audit` |
|
|
132
|
-
| `ai_benchmark` |
|
|
133
|
-
| `webmcp_ready_audit` |
|
|
134
|
-
| `remediation_patches` |
|
|
135
|
-
| `llms_txt_generate` |
|
|
172
|
+
| `agent_ready_audit` | Scores findability, stability, agent-perceivability and semantics (A-F grade) |
|
|
173
|
+
| `ai_benchmark` | Compares AI-friendliness across competitor URLs |
|
|
174
|
+
| `webmcp_ready_audit` | Audits a site for WebMCP readiness |
|
|
175
|
+
| `remediation_patches` | Generates code fixes for audit findings |
|
|
176
|
+
| `llms_txt_generate` | Generates an AI-readable llms.txt for a site |
|
|
136
177
|
|
|
137
178
|
```bash
|
|
138
|
-
|
|
139
|
-
|
|
179
|
+
cbrowser agent-ready-audit "https://your-site.com" --html
|
|
180
|
+
cbrowser ai-benchmark --urls "https://site-a.com,https://site-b.com" --html
|
|
140
181
|
```
|
|
141
182
|
|
|
183
|
+
The agent-perceivability axis measures whether a machine can perceive your elements (ARIA present, elements carry text). It is not a WCAG conformance score; run `empathy-audit` for that, and expect the two to differ.
|
|
184
|
+
|
|
142
185
|
---
|
|
143
186
|
|
|
144
187
|
## Cognitive User Simulation
|
|
145
188
|
|
|
146
|
-
|
|
189
|
+
Research-backed cognitive traits and motivational values model how real users think, struggle and give up:
|
|
147
190
|
|
|
148
191
|
| Trait | Research Basis | What It Models |
|
|
149
192
|
|-------|---------------|----------------|
|
|
@@ -151,238 +194,235 @@ npx cbrowser ai-benchmark "https://site-a.com,https://site-b.com"
|
|
|
151
194
|
| **Working Memory** | Miller (1956) | 7±2 item capacity; affects form complexity tolerance |
|
|
152
195
|
| **Comprehension** | Card, Moran & Newell (1983) | UI convention understanding; GOMS model timing |
|
|
153
196
|
| **Risk Tolerance** | Kahneman & Tversky (1979) | Prospect theory; loss aversion affects CTA clicks |
|
|
154
|
-
| **Self-Efficacy** | Bandura (1977) | Belief in ability to solve problems; low
|
|
155
|
-
| **Satisficing** | Simon (1956) | Accept "good enough"
|
|
156
|
-
| **Trust Calibration** | Fogg (2003) |
|
|
157
|
-
| **Information Foraging** | Pirolli & Card (1999) | "Scent" following
|
|
158
|
-
| **Social Proof** | Cialdini (2001) | Influence of reviews, ratings
|
|
197
|
+
| **Self-Efficacy** | Bandura (1977) | Belief in ability to solve problems; low means faster abandonment |
|
|
198
|
+
| **Satisficing** | Simon (1956) | Accept "good enough" or optimize; faster decisions |
|
|
199
|
+
| **Trust Calibration** | Fogg (2003) | Trust signals; affects click-through |
|
|
200
|
+
| **Information Foraging** | Pirolli & Card (1999) | "Scent" following; predicts navigation patterns |
|
|
201
|
+
| **Social Proof** | Cialdini (2001) | Influence of reviews, ratings and popularity indicators |
|
|
159
202
|
| **FOMO** | Przybylski et al. (2013) | Fear of missing out; urgency and scarcity responses |
|
|
160
203
|
|
|
161
|
-
|
|
204
|
+
The [Trait Index](https://cbrowser.ai/docs/Trait-Index) lists every trait with its citations, including Persistence, Resilience, Curiosity, Change Blindness, Anchoring Bias, Time Horizon, Attribution Style, Metacognitive Planning, Procedural Fluency, Transfer Learning, Authority Sensitivity, Emotional Contagion, Mental Model Rigidity, Interrupt Recovery, Reading Tendency and Site Familiarity.
|
|
162
205
|
|
|
163
206
|
**Full documentation:** [Research Methodology](https://cbrowser.ai/docs/Research-Methodology) · [Trait Index](https://cbrowser.ai/docs/Trait-Index) · [Bibliography](https://cbrowser.ai/docs/Bibliography)
|
|
164
207
|
|
|
165
|
-
###
|
|
208
|
+
### 21 Built-in Personas
|
|
166
209
|
|
|
167
|
-
**
|
|
210
|
+
**10 general:** power-user, first-timer, mobile-user, screen-reader-user, elderly-user, impatient-user, distracted-user, careful-reader, explorer, task-focused
|
|
168
211
|
|
|
169
212
|
**11 accessibility:** motor-impairment-tremor, low-vision-magnified, cognitive-adhd, dyslexic-user, deaf-user, elderly-low-vision, color-blind-deuteranopia, autism-spectrum, intellectual-disability, aphasia-receptive, dyscalculia
|
|
170
213
|
|
|
214
|
+
`cbrowser persona list` shows them with any custom personas you have made.
|
|
215
|
+
|
|
171
216
|
### Values System
|
|
172
217
|
|
|
173
|
-
Beyond cognitive traits, CBrowser models
|
|
218
|
+
Beyond cognitive traits, CBrowser models motivational values from three psychological frameworks:
|
|
174
219
|
|
|
175
220
|
| Framework | Research Basis |
|
|
176
221
|
|-----------|---------------|
|
|
177
|
-
| **Schwartz's Universal Values** | Schwartz (1992)
|
|
178
|
-
| **Self-Determination Theory** | Deci & Ryan (1985)
|
|
179
|
-
| **Maslow's Hierarchy** | Maslow (1943)
|
|
222
|
+
| **Schwartz's Universal Values** | Schwartz (1992): Power, Achievement, Hedonism, Stimulation, Self-Direction, Universalism, Benevolence, Tradition, Conformity, Security |
|
|
223
|
+
| **Self-Determination Theory** | Deci & Ryan (1985): Autonomy, Competence, Relatedness |
|
|
224
|
+
| **Maslow's Hierarchy** | Maslow (1943): 5 need levels |
|
|
180
225
|
|
|
181
|
-
See [Values Framework](https://cbrowser.ai/docs/Values-Framework)
|
|
226
|
+
See [Values Framework](https://cbrowser.ai/docs/Values-Framework).
|
|
182
227
|
|
|
183
|
-
### Custom
|
|
228
|
+
### Custom Personas
|
|
184
229
|
|
|
185
230
|
```bash
|
|
186
|
-
# Interactive questionnaire (
|
|
187
|
-
|
|
231
|
+
# Interactive questionnaire (13 core traits)
|
|
232
|
+
cbrowser persona-questionnaire start
|
|
188
233
|
|
|
189
|
-
# Comprehensive questionnaire (all
|
|
190
|
-
|
|
234
|
+
# Comprehensive questionnaire (all 30 traits)
|
|
235
|
+
cbrowser persona-questionnaire start --comprehensive --name "my-tester"
|
|
191
236
|
|
|
192
|
-
# From a description
|
|
193
|
-
|
|
237
|
+
# From a description
|
|
238
|
+
cbrowser persona create "A 68-year-old retiree who just got their first smartphone" --name retiree
|
|
194
239
|
```
|
|
195
240
|
|
|
196
241
|
### Abandonment Detection
|
|
197
242
|
|
|
198
|
-
|
|
243
|
+
A cognitive journey stops when a realistic user would give up:
|
|
199
244
|
|
|
200
|
-
```
|
|
201
|
-
|
|
245
|
+
```text
|
|
246
|
+
ABANDONED after 8 steps
|
|
202
247
|
Reason: Patience depleted (0.08) - "This is taking too long..."
|
|
203
248
|
Friction points:
|
|
204
249
|
1. Password requirements unclear (step 4)
|
|
205
250
|
2. Form validation error not visible (step 6)
|
|
206
251
|
```
|
|
207
252
|
|
|
253
|
+
### Replay a Journey for Free
|
|
254
|
+
|
|
255
|
+
Record a journey once with `--trace`, then replay it with no model calls. Replay is deterministic; a page that has changed since the recording stops the replay at the step that diverged.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
cbrowser cognitive-journey --persona first-timer --start "https://your-site.com" --goal "sign up" --trace
|
|
259
|
+
cbrowser cognitive-journey --persona first-timer --start "https://your-site.com" --goal "sign up" \
|
|
260
|
+
--replay-trace ~/.cbrowser/traces/<journeyId>.jsonl
|
|
261
|
+
```
|
|
262
|
+
|
|
208
263
|
---
|
|
209
264
|
|
|
210
265
|
## Accessibility Empathy Testing
|
|
211
266
|
|
|
212
|
-
Simulate how
|
|
267
|
+
Simulate how people with disabilities experience your site. Without `--goal` it checks the page for barriers and needs no key; with `--goal` it also runs a short journey per persona.
|
|
213
268
|
|
|
214
269
|
```bash
|
|
215
|
-
|
|
216
|
-
--
|
|
217
|
-
--
|
|
270
|
+
cbrowser empathy-audit "https://your-site.com" \
|
|
271
|
+
--personas motor-impairment-tremor,dyslexic-user \
|
|
272
|
+
--device iphone-16 \
|
|
218
273
|
--html
|
|
219
274
|
```
|
|
220
275
|
|
|
276
|
+
Persona names accept the short aliases too (`adhd`, `autism`, `tremor`, `dyslexia`, ...). `--disabilities` is the older spelling of `--personas`.
|
|
277
|
+
|
|
221
278
|
---
|
|
222
279
|
|
|
223
280
|
## Constitutional AI Safety
|
|
224
281
|
|
|
225
|
-
AI agents need boundaries. CBrowser classifies every action by risk
|
|
282
|
+
AI agents need boundaries. CBrowser classifies every action by risk:
|
|
226
283
|
|
|
227
284
|
| Zone | Examples | Behavior |
|
|
228
285
|
|------|----------|----------|
|
|
229
|
-
| 🟢 **Green** | Navigate, read, screenshot |
|
|
230
|
-
| 🟡 **Yellow** | Click buttons, fill forms |
|
|
231
|
-
| 🔴 **Red** | Submit, delete, purchase |
|
|
232
|
-
| ⬛ **Black** | Bypass auth, inject scripts | Never
|
|
286
|
+
| 🟢 **Green** | Navigate, read, screenshot | Runs |
|
|
287
|
+
| 🟡 **Yellow** | Click buttons, fill forms | Logged and runs |
|
|
288
|
+
| 🔴 **Red** | Submit, delete, purchase | Refused unless forced |
|
|
289
|
+
| ⬛ **Black** | Bypass auth, inject scripts | Never runs |
|
|
290
|
+
|
|
291
|
+
**How red is decided:** by the element an action would activate as well as by the selector text. The selector string is classified first, so naming a dangerous action in a selector is refused even when the element reads harmless. The element is then classified however it is addressed: the same "Delete account" button is refused by its label, its id, its test id or a structural path, and an element with only a delegated click listener is judged by its own text. A click on a container is judged at the point it lands (beneath fixed bars and overlays, into open shadow roots, slots and same-origin frames, up to the control, pointer-cursor item or text-bearing item there) and the click is sent to that judged point. A refused click is never retried with a "healed" selector.
|
|
233
292
|
|
|
234
|
-
**
|
|
293
|
+
**Gated:** `click`, `smart_click`, hover-click and the daemon's click; `press_key`, `type_text` and `keyboard` (Enter, including a typed or pressed newline, or Space on the focused control, followed into shadow roots and same-origin frames, and Enter in a field whose form submits one, judged together with a combobox's `aria-activedescendant` item); a `drag` whose press and release share a control; and the natural-language runner's `click at X, Y`. Caller-supplied page script is red by itself: `evaluate_script` over MCP, `evaluate`/`eval` on the CLI and the daemon's evaluate are refused without force and run nothing, because a script can activate any control without passing the element gate. Names below a control (icon labels, image alts, slotted and open-shadow text, `<label for>`) and the path a form submits to feed the same keyword classification. `force: true` on the MCP `click`, `smart_click`, `press_key`, `type_text`, `drag` and `evaluate_script` tools, or `--force` on the CLI, proceeds and reports the zone.
|
|
235
294
|
|
|
236
|
-
Not judged, by design
|
|
295
|
+
**Not judged, by design:** clicking or typing into a text field or a contenteditable editor; choosing a value with a native checkbox, radio or select, or a `role=checkbox`, `radio` or `switch` (the submit that commits them is judged, but a switch that saves as it changes commits immediately); and a link's address (a link to `/buy` is navigation). **Not gated:** cognitive journeys and other engines that choose their own clicks.
|
|
296
|
+
|
|
297
|
+
**Known limits:** labels inside closed shadow roots or drawn by CSS, controls inside cross-origin frames, icon-only controls with no accessible name, a confirmation button with neutral text ("Confirm", "OK") inside a dialog, a form with no `action` or an empty `formaction`, an `aria-activedescendant` id that only resolves outside the field's own root, a Tab inside typed text that moves focus before a later Enter, one round trip between the check and the click in which a page could swap the element, and keyword false positives such as a "Purchase history" tab, a "Buyer protection" link, a `role=option` picker such as "Pay with PayPal", or a harmless "Apply" in a form posting to `/checkout/discount`. Classification uses English keyword patterns; when the element cannot be read, the selector text alone decides.
|
|
237
298
|
|
|
238
299
|
---
|
|
239
300
|
|
|
240
|
-
##
|
|
301
|
+
## Browser Control from the CLI
|
|
302
|
+
|
|
303
|
+
Each `cbrowser` command is its own process. The persistent profile keeps cookies and the last URL between commands, but not the page itself, so the next command reloads it. To keep one live page across commands (scroll position, open menus, form state), start the daemon:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
cbrowser daemon start --device iphone-16 --timeout 45m
|
|
307
|
+
cbrowser navigate "https://your-site.com"
|
|
308
|
+
cbrowser scroll down 600
|
|
309
|
+
cbrowser click "Pricing"
|
|
310
|
+
cbrowser screenshot pricing.png
|
|
311
|
+
cbrowser network list --filter api --json
|
|
312
|
+
cbrowser console --filter error
|
|
313
|
+
cbrowser daemon stop
|
|
314
|
+
```
|
|
241
315
|
|
|
242
|
-
|
|
316
|
+
While the daemon runs, `navigate`, `click`, `fill`, `hover`, `type`, `press`, `keyboard`, `screenshot`, `extract`, `run`, `scroll`, `evaluate`, `capture`, `har`, `network` and `console` use its browser. Commands that would open a second browser on its profile refuse until you stop it.
|
|
243
317
|
|
|
244
|
-
|
|
245
|
-
- **Site Model Learning** — Persistent knowledge graph across sessions
|
|
246
|
-
- **Cross-Session Profiles** — AES-256-GCM encrypted cookie/state profiles
|
|
247
|
-
- **Goal Decomposition** — Sub-goal trees with fallback strategies
|
|
318
|
+
Global browser flags work on every command that opens a browser: `--device <name>` (200+ presets; `cbrowser device list`), `--viewport 390x844` or a size name, `--browser chromium|firefox|webkit`, `--geo <preset or lat,lon>`, `--locale`, `--timezone`, `--no-headless` and `--no-persistent`. Flags also take `--flag=value`.
|
|
248
319
|
|
|
249
320
|
---
|
|
250
321
|
|
|
251
322
|
## Natural Language Testing
|
|
252
323
|
|
|
253
324
|
```txt
|
|
254
|
-
# Test:
|
|
255
|
-
go to https://your-site.com
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
click "Place Order"
|
|
261
|
-
verify url contains "/confirmation"
|
|
325
|
+
# Test: Search
|
|
326
|
+
go to https://your-site.com
|
|
327
|
+
type "lamps" in the search box
|
|
328
|
+
click the search button
|
|
329
|
+
verify page contains "results"
|
|
330
|
+
verify url contains "/search"
|
|
262
331
|
```
|
|
263
332
|
|
|
264
333
|
```bash
|
|
265
|
-
|
|
334
|
+
cbrowser test-suite search-test.txt --html --output report.json
|
|
266
335
|
|
|
267
336
|
# Auto-repair broken tests
|
|
268
|
-
|
|
337
|
+
cbrowser repair-tests broken-test.txt --auto-apply --verify
|
|
269
338
|
```
|
|
270
339
|
|
|
340
|
+
Steps that would submit, delete or buy (for example `click "Place Order"`) are red zone, and the test runner never forces them. Keep those out of unattended suites or test them against a sandbox account.
|
|
341
|
+
|
|
271
342
|
---
|
|
272
343
|
|
|
273
344
|
## Visual Testing
|
|
274
345
|
|
|
275
346
|
```bash
|
|
276
347
|
# AI visual regression
|
|
277
|
-
|
|
278
|
-
|
|
348
|
+
cbrowser ai-visual capture "https://your-site.com" --name homepage
|
|
349
|
+
cbrowser ai-visual test "https://staging.your-site.com" homepage --html
|
|
279
350
|
|
|
280
|
-
# Cross-browser (
|
|
281
|
-
|
|
351
|
+
# Cross-browser (Chromium, Firefox, WebKit)
|
|
352
|
+
cbrowser cross-browser "https://your-site.com" --html
|
|
282
353
|
|
|
283
|
-
# Responsive (mobile, tablet, desktop)
|
|
284
|
-
|
|
354
|
+
# Responsive (mobile, tablet, desktop by default)
|
|
355
|
+
cbrowser responsive "https://your-site.com" --html
|
|
285
356
|
|
|
286
|
-
# A/B comparison (staging
|
|
287
|
-
|
|
357
|
+
# A/B comparison (staging against production)
|
|
358
|
+
cbrowser ab "https://staging.your-site.com" "https://your-site.com" --html
|
|
288
359
|
```
|
|
289
360
|
|
|
290
361
|
---
|
|
291
362
|
|
|
292
|
-
##
|
|
363
|
+
## Screen Capture
|
|
293
364
|
|
|
294
|
-
|
|
365
|
+
Record a GIF, animated WebP or video of a page, plus a frame manifest an AI can read:
|
|
295
366
|
|
|
296
367
|
```bash
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
--goal "sign up for free trial" \
|
|
300
|
-
--persona first-timer \
|
|
301
|
-
--html
|
|
368
|
+
cbrowser capture start "https://your-site.com" --duration 5s --format gif,webp
|
|
369
|
+
cbrowser capture start "https://your-site.com" --until-element-gone ".spinner" --timeout 20s
|
|
302
370
|
```
|
|
303
371
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
## Upgrading to 19.0.0
|
|
307
|
-
|
|
308
|
-
One breaking change: the agent-ready **accessibility** axis is now
|
|
309
|
-
**agentPerceivability**, and three deprecated aliases are removed.
|
|
372
|
+
With the daemon running, `capture start` records the daemon's page while you drive it with other commands, and `capture stop` finishes it.
|
|
310
373
|
|
|
311
|
-
|
|
312
|
-
|---|---|
|
|
313
|
-
| `score.accessibility` | `score.agentPerceivability` |
|
|
314
|
-
| `summary.dynamicContentCount` | `summary.deferredLoadingPatterns` |
|
|
315
|
-
| `comparison.bestAccessibility` | `comparison.bestAgentPerceivability` |
|
|
316
|
-
| issue `category: "accessibility"` | `category: "agentPerceivability"` |
|
|
374
|
+
---
|
|
317
375
|
|
|
318
|
-
|
|
319
|
-
upgraded within that range you can switch keys before upgrading and take this
|
|
320
|
-
release with no further change.
|
|
376
|
+
## Competitive UX Benchmark
|
|
321
377
|
|
|
322
|
-
|
|
323
|
-
your elements — ARIA present, elements carry text. It is **not** a WCAG
|
|
324
|
-
conformance score, and it returned 100 on a page where `empathy_audit` found two
|
|
325
|
-
WCAG violations. Both numbers were right; calling one of them "accessibility" was
|
|
326
|
-
not. Run `empathy_audit` for conformance, and expect the two to differ.
|
|
378
|
+
Run identical cognitive journeys on your site and your competitors' (needs an Anthropic API key; one journey per site):
|
|
327
379
|
|
|
328
|
-
|
|
329
|
-
|
|
380
|
+
```bash
|
|
381
|
+
cbrowser competitive-benchmark \
|
|
382
|
+
--sites "https://your-site.com,https://competitor-a.com,https://competitor-b.com" \
|
|
383
|
+
--goal "sign up for free trial" \
|
|
384
|
+
--persona first-timer \
|
|
385
|
+
--html
|
|
386
|
+
```
|
|
330
387
|
|
|
331
388
|
---
|
|
332
389
|
|
|
333
390
|
## Geo Proxy
|
|
334
391
|
|
|
335
|
-
Test from 10 global regions via residential proxies:
|
|
392
|
+
Test from 10 global regions via residential proxies. Today `agent-ready-audit` is the command that routes through them:
|
|
336
393
|
|
|
337
394
|
```bash
|
|
338
|
-
|
|
339
|
-
--start "https://your-site.com" \
|
|
340
|
-
--persona first-timer \
|
|
341
|
-
--goal "sign up" \
|
|
342
|
-
--geo-region uk
|
|
395
|
+
cbrowser agent-ready-audit "https://your-site.com" --geo-region uk
|
|
343
396
|
```
|
|
344
397
|
|
|
345
398
|
**Regions:** `us-west`, `us-east`, `us-central`, `uk`, `germany`, `france`, `japan`, `australia`, `canada`, `brazil`
|
|
346
399
|
|
|
347
|
-
Geo routing needs your own residential-proxy credentials
|
|
348
|
-
mechanism and no keys. Set `IPROYAL_USERNAME` / `IPROYAL_PASSWORD`, or place a
|
|
349
|
-
`geo-proxy.json` at `~/.cbrowser/`. Without either, `--geo-region` fails loudly
|
|
350
|
-
rather than silently running from your own IP.
|
|
351
|
-
|
|
352
|
-
A `geo-proxy.json` may define additional regions; they merge over the ten above.
|
|
400
|
+
Geo routing needs your own residential-proxy credentials; the package ships the mechanism and no keys. Set `IPROYAL_USERNAME` / `IPROYAL_PASSWORD`, or place a `geo-proxy.json` in `~/.cbrowser/`. Without either, `--geo-region` exits 1 rather than silently running from your own IP. A `geo-proxy.json` may define additional regions; they merge over the ten above.
|
|
353
401
|
|
|
354
|
-
|
|
355
|
-
> including `india` and `singapore`. Those are not in the shipped defaults and
|
|
356
|
-
> resolve to nothing on a clean install — they existed only in a local config
|
|
357
|
-
> file on one machine. Advertising them was a claim the package could not keep.
|
|
402
|
+
For location without a proxy (the browser's reported geolocation, not its IP), use `--geo new-york` or `--geo 40.71,-74.00` on any command.
|
|
358
403
|
|
|
359
404
|
---
|
|
360
405
|
|
|
361
406
|
## MCP Server Integration
|
|
362
407
|
|
|
363
|
-
CBrowser runs as an MCP server for Claude.ai, Claude Desktop
|
|
408
|
+
CBrowser runs as an MCP server for Claude.ai, Claude Desktop and Claude Code.
|
|
364
409
|
|
|
365
|
-
### Claude.ai (
|
|
410
|
+
### Claude.ai (no install)
|
|
366
411
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
1. Go to [Customize → Connectors](https://claude.ai/customize/connectors) → "Add custom connector"
|
|
412
|
+
1. Go to [Customize → Connectors](https://claude.ai/customize/connectors) and choose "Add custom connector".
|
|
370
413
|
2. Paste: `https://demo.cbrowser.ai/mcp`
|
|
371
|
-
3.
|
|
372
|
-
4. Go to Customize → Skills → Upload the zip
|
|
373
|
-
|
|
374
|
-
> **Note:** The Claude.ai Skill is a lightweight knowledge file for the web interface. It is NOT the same as the Claude Code Skill (see below).
|
|
414
|
+
3. Optionally download the [Claude.ai Skill (.zip)](https://cbrowser.ai/downloads/cbrowser-claudeai.skill), which gives Claude context about the tools and workflows, and upload it under Customize → Skills.
|
|
375
415
|
|
|
376
|
-
|
|
416
|
+
The Claude.ai Skill is a small knowledge file for the web interface. It is not the Claude Code Skill below.
|
|
377
417
|
|
|
378
|
-
|
|
418
|
+
### Claude Code Skill
|
|
379
419
|
|
|
380
420
|
```bash
|
|
381
421
|
curl -fsSL https://raw.githubusercontent.com/alexandriashai/cbrowser/main/scripts/install-skill.sh | bash
|
|
382
|
-
npm install -g cbrowser
|
|
422
|
+
npm install -g cbrowser
|
|
383
423
|
```
|
|
384
424
|
|
|
385
|
-
|
|
425
|
+
See the [Skill Installation Guide](https://cbrowser.ai/docs/claude-skill-installation).
|
|
386
426
|
|
|
387
427
|
### Claude Desktop
|
|
388
428
|
|
|
@@ -409,50 +449,57 @@ The Claude Code Skill is a full CLI integration with workflow routing, TypeScrip
|
|
|
409
449
|
}
|
|
410
450
|
```
|
|
411
451
|
|
|
412
|
-
|
|
452
|
+
The local stdio server registers the same 130 tools as the hosted one, plus 7 that keep their state in the local process (`empathy_audit_init`, `empathy_audit_record_barrier`, `empathy_audit_complete_persona`, `empathy_audit_summarize`, `get_emotional_state`, `list_emotional_personas`, `trigger_emotional_event`). `cbrowser mcp-remote` runs your own HTTP server for remote clients.
|
|
453
|
+
|
|
454
|
+
### 130 MCP Tools
|
|
413
455
|
|
|
414
456
|
| Category | Tools | Count |
|
|
415
457
|
|----------|-------|-------|
|
|
416
|
-
| **Navigation** | `navigate`, `
|
|
417
|
-
| **Interaction** | `click`, `smart_click`, `fill`, `dismiss_overlay` |
|
|
418
|
-
| **
|
|
419
|
-
| **Cognitive
|
|
420
|
-
| **
|
|
421
|
-
| **
|
|
422
|
-
| **
|
|
423
|
-
| **
|
|
424
|
-
| **
|
|
425
|
-
| **
|
|
426
|
-
| **
|
|
427
|
-
| **
|
|
428
|
-
| **
|
|
429
|
-
| **
|
|
430
|
-
| **
|
|
431
|
-
| **
|
|
432
|
-
| **
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
458
|
+
| **Navigation and extraction** | `navigate`, `list_devices`, `screenshot`, `extract` | 4 |
|
|
459
|
+
| **Interaction** | `click`, `smart_click`, `fill`, `scroll`, `dismiss_overlay`, `hover`, `type_text`, `press_key`, `handle_dialog`, `upload_file`, `drag` | 11 |
|
|
460
|
+
| **Browser state** | `evaluate_script`, `get_console_messages`, `get_network_requests`, `manage_cookies`, `manage_storage`, `manage_tabs` | 6 |
|
|
461
|
+
| **Cognitive journeys** | `cognitive_journey_init`, `cognitive_journey_update_state`, `list_cognitive_personas` | 3 |
|
|
462
|
+
| **Cognitive transport and comparison** | `cognitive_effort`, `cognitive_load_estimate`, `cognitive_distance`, `cognitive_coverage`, `cognitive_interpolate`, `compare_personas`, `compare_personas_init`, `compare_personas_complete` | 8 |
|
|
463
|
+
| **Attention and visual testing** | `attention_analysis`, `attention_compare`, `transport_map`, `visual_baseline`, `visual_regression`, `cross_browser_test`, `cross_browser_diff`, `responsive_test`, `ab_comparison` | 9 |
|
|
464
|
+
| **Audits** | `agent_ready_audit`, `empathy_audit`, `webmcp_ready_audit`, `competitive_benchmark`, `site_cognitive_assessment`, `visual_cognitive_story` | 6 |
|
|
465
|
+
| **Analysis and bugs** | `analyze_page`, `generate_tests`, `find_element_by_intent`, `ai_benchmark`, `hunt_bugs`, `chaos_test` | 6 |
|
|
466
|
+
| **Testing** | `nl_test_inline`, `nl_test_file`, `repair_test`, `detect_flaky_tests`, `coverage_map`, `assert` | 6 |
|
|
467
|
+
| **Performance** | `perf_baseline`, `perf_regression`, `list_baselines` | 3 |
|
|
468
|
+
| **Remediation and llms.txt** | `remediation_patches`, `llms_txt_generate`, `llms_txt_validate`, `llms_txt_diff`, `structured_data_suggest` | 5 |
|
|
469
|
+
| **Site knowledge** | `page_understand`, `site_model_status`, `site_model_query`, `site_profile_list`, `site_profile_status`, `site_profile_delete`, `question_answer` | 7 |
|
|
470
|
+
| **Personas and values** | `persona_create_*` (6), `persona_traits_list`, `persona_manager`, `persona_update`, `persona_delete`, `persona_lookup`, `persona_values_list`, `persona_values_lookup`, `persona_trait_lookup`, `persona_category_guidance`, `persona_questionnaire_get`, `persona_questionnaire_build`, `list_influence_patterns` | 18 |
|
|
471
|
+
| **Capture and artifacts** | `capture_start`, `capture_stop`, `capture_status`, `journey_heatmap_gif`, `artifact_fetch` | 5 |
|
|
472
|
+
| **Sessions and browser** | `save_session`, `load_session`, `list_sessions`, `delete_session`, `status`, `browser_health`, `browser_recover`, `reset_browser`, `heal_stats` | 9 |
|
|
473
|
+
| **Security** | `security_audit` | 1 |
|
|
474
|
+
| **Marketing** | `marketing_personas_list`, `marketing_campaign_create`, `marketing_campaign_run`, `marketing_campaign_report_result` | 4 |
|
|
475
|
+
| **Utility** | `ask_user` | 1 |
|
|
476
|
+
| **Enterprise** *(stubs in the public package)* | `set_api_key`, `clear_api_key`, `api_key_status`, `get_api_key_prompt`, `cognitive_journey_autonomous`, `marketing_influence_matrix`, `marketing_lever_analysis`, `marketing_funnel_analyze`, `marketing_compete`, `marketing_audience_discover`, `marketing_discover_status`, `stealth_*` (5), `cloudflare_detect`, `cloudflare_wait` | 18 |
|
|
477
|
+
|
|
478
|
+
The 18 Enterprise tools are listed by the public package so clients can discover them; they run on [CBrowser Enterprise](#enterprise-edition) and answer with an upgrade notice elsewhere.
|
|
479
|
+
|
|
480
|
+
### Token Cost and Selective Loading
|
|
481
|
+
|
|
482
|
+
All 130 tool definitions take a large share of an LLM's context. To expose only what you need, register tool families yourself:
|
|
437
483
|
|
|
438
484
|
```typescript
|
|
439
485
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
486
|
+
import { CBrowser } from "cbrowser";
|
|
440
487
|
import {
|
|
441
488
|
registerNavigationTools,
|
|
442
489
|
registerInteractionTools,
|
|
443
490
|
registerExtractionTools,
|
|
444
491
|
} from "cbrowser/mcp-tools";
|
|
445
492
|
|
|
493
|
+
const browser = new CBrowser({ headless: true });
|
|
446
494
|
const server = new McpServer({ name: "my-app", version: "1.0.0" });
|
|
447
|
-
const context = { getBrowser: () => browser };
|
|
495
|
+
const context = { getBrowser: async () => browser };
|
|
448
496
|
|
|
449
|
-
// ~5,000 tokens instead of ~45,000
|
|
450
497
|
registerNavigationTools(server, context);
|
|
451
498
|
registerInteractionTools(server, context);
|
|
452
499
|
registerExtractionTools(server, context);
|
|
453
500
|
```
|
|
454
501
|
|
|
455
|
-
**
|
|
502
|
+
**Families:** `registerNavigationTools`, `registerInteractionTools`, `registerAdvancedInteractionTools`, `registerExtractionTools`, `registerBrowserStateTools`, `registerAssertionTools`, `registerAnalysisTools`, `registerAuditTools`, `registerBugAnalysisTools`, `registerCaptureTools`, `registerCognitiveTools`, `registerPersonaComparisonTools`, `registerVisualTestingTools`, `registerTestingTools`, `registerPerformanceTools`, `registerRemediationTools`, `registerLlmsTxtTools`, `registerSiteKnowledgeTools`, `registerValuesTools`, `registerPersonaLifecycleTools`, `registerPersonaCreationTools`, `registerSessionTools`, `registerHealingTools`, `registerBrowserManagementTools`, `registerSecurityTools`, `registerMarketingTools`, `registerGifTools`, `registerArtifactTools`, `registerAskUserTool`.
|
|
456
503
|
|
|
457
504
|
---
|
|
458
505
|
|
|
@@ -469,17 +516,20 @@ jobs:
|
|
|
469
516
|
runs-on: ubuntu-latest
|
|
470
517
|
steps:
|
|
471
518
|
- uses: actions/checkout@v4
|
|
472
|
-
- uses: alexandriashai/cbrowser@
|
|
519
|
+
- uses: alexandriashai/cbrowser@v20.0.0
|
|
473
520
|
with:
|
|
474
|
-
test-file: tests/e2e/
|
|
475
|
-
sensitivity: strict
|
|
521
|
+
test-file: tests/e2e/search.txt
|
|
476
522
|
```
|
|
477
523
|
|
|
524
|
+
The action installs cbrowser and the browsers, then runs one of: `test-file` (a natural-language suite, with a JSON and an HTML report), `url` (writes a page analysis), or `command` (any cbrowser command). Outputs land in `cbrowser-output/` and are uploaded as an artifact. Pin the action to a release tag.
|
|
525
|
+
|
|
478
526
|
### Docker
|
|
479
527
|
|
|
528
|
+
There is no published image. Build one from the repository's `Dockerfile`:
|
|
529
|
+
|
|
480
530
|
```bash
|
|
481
|
-
docker
|
|
482
|
-
|
|
531
|
+
docker build -t cbrowser .
|
|
532
|
+
docker run --rm -v "$(pwd)/tests:/work/tests" cbrowser test-suite tests/search.txt --html
|
|
483
533
|
```
|
|
484
534
|
|
|
485
535
|
---
|
|
@@ -487,16 +537,16 @@ docker run --rm -v $(pwd)/tests:/work/tests ghcr.io/alexandriashai/cbrowser:late
|
|
|
487
537
|
## API Reference
|
|
488
538
|
|
|
489
539
|
```typescript
|
|
490
|
-
import { CBrowser } from
|
|
540
|
+
import { CBrowser } from "cbrowser";
|
|
491
541
|
|
|
492
542
|
const browser = new CBrowser({
|
|
493
543
|
headless: true,
|
|
494
544
|
persistent: true,
|
|
495
545
|
});
|
|
496
546
|
|
|
497
|
-
await browser.navigate(
|
|
547
|
+
await browser.navigate("https://example.com");
|
|
498
548
|
|
|
499
|
-
const result = await browser.smartClick(
|
|
549
|
+
const result = await browser.smartClick("Sign In", {
|
|
500
550
|
maxRetries: 3,
|
|
501
551
|
minConfidence: 0.8,
|
|
502
552
|
});
|
|
@@ -512,26 +562,38 @@ await browser.close();
|
|
|
512
562
|
### Modular Imports
|
|
513
563
|
|
|
514
564
|
```typescript
|
|
515
|
-
import { runVisualRegression, runCrossBrowserTest } from
|
|
516
|
-
import { runNLTestSuite, detectFlakyTests, repairTest } from
|
|
517
|
-
import { huntBugs, runChaosTest, findElementByIntent } from
|
|
518
|
-
import { capturePerformanceBaseline, detectPerformanceRegression } from
|
|
565
|
+
import { runVisualRegression, runCrossBrowserTest } from "cbrowser/visual";
|
|
566
|
+
import { runNLTestSuite, detectFlakyTests, repairTest } from "cbrowser/testing";
|
|
567
|
+
import { huntBugs, runChaosTest, findElementByIntent } from "cbrowser/analysis";
|
|
568
|
+
import { capturePerformanceBaseline, detectPerformanceRegression } from "cbrowser/performance";
|
|
519
569
|
```
|
|
520
570
|
|
|
571
|
+
Also exported: `cbrowser/mcp-tools`, `cbrowser/mcp-remote`, `cbrowser/values` and `cbrowser/stealth`.
|
|
572
|
+
|
|
521
573
|
---
|
|
522
574
|
|
|
523
575
|
## Configuration
|
|
524
576
|
|
|
577
|
+
Environment variables override the config file, and command-line flags override both.
|
|
578
|
+
|
|
525
579
|
| Variable | Default | Description |
|
|
526
580
|
|----------|---------|-------------|
|
|
527
581
|
| `CBROWSER_DATA_DIR` | `~/.cbrowser` | Data storage directory |
|
|
528
|
-
| `CBROWSER_HEADLESS` | `true` |
|
|
529
|
-
| `CBROWSER_BROWSER` | `chromium` |
|
|
582
|
+
| `CBROWSER_HEADLESS` | `true` | Set `false` to show the browser |
|
|
583
|
+
| `CBROWSER_BROWSER` | `chromium` | `chromium`, `firefox` or `webkit` |
|
|
584
|
+
| `CBROWSER_VIEWPORT_WIDTH` / `CBROWSER_VIEWPORT_HEIGHT` | `1920` / `1080` | Default page size |
|
|
585
|
+
| `CBROWSER_DEVICE` | none | Default device preset |
|
|
586
|
+
| `CBROWSER_LOCALE` / `CBROWSER_TIMEZONE` | the host's | Browser locale and timezone |
|
|
530
587
|
| `CBROWSER_TIMEOUT` | `30000` | Default timeout (ms) |
|
|
531
|
-
| `CBROWSER_PROXY` |
|
|
588
|
+
| `CBROWSER_PROXY` | none | Proxy URL (or `CBROWSER_PROXY_SERVER`, `_USERNAME`, `_PASSWORD`) |
|
|
589
|
+
| `CBROWSER_RECORD_VIDEO` | `false` | Record video of browser sessions |
|
|
590
|
+
| `NO_COLOR` | unset | Disable colour output |
|
|
591
|
+
|
|
592
|
+
**Config file:** the first of `./.cbrowserrc.json`, `./.cbrowserrc`, `./cbrowser.config.json`, `<data dir>/config.json` or `~/.cbrowserrc.json`. Keys include `browser`, `headless`, `viewport` (`{ "width", "height" }`), `device`, `locale`, `timezone`, `timeout` and `recordVideo`.
|
|
532
593
|
|
|
533
594
|
```bash
|
|
534
|
-
|
|
595
|
+
cbrowser config set-api-key <key> # for cognitive journeys
|
|
596
|
+
cbrowser doctor # check Node, Playwright, the browsers and the key
|
|
535
597
|
```
|
|
536
598
|
|
|
537
599
|
---
|
|
@@ -542,38 +604,36 @@ npx cbrowser config set-api-key # Required for cognitive journeys
|
|
|
542
604
|
|
|
543
605
|
| Feature | Description |
|
|
544
606
|
|---------|-------------|
|
|
545
|
-
| **Marketing Suite** | Test which design
|
|
546
|
-
| **8 Marketing Personas** | B2B (enterprise-buyer, startup-founder, procurement-manager, technical-evaluator)
|
|
547
|
-
| **Influence Matrix** | Conversion effectiveness for variant
|
|
548
|
-
| **Lever Analysis** | Which
|
|
549
|
-
| **Constitutional Stealth** |
|
|
607
|
+
| **Marketing Suite** | Test which design, copy and UX patterns influence which buyer segments |
|
|
608
|
+
| **8 Marketing Personas** | B2B (enterprise-buyer, startup-founder, procurement-manager, technical-evaluator) and consumer (impulse-shopper, price-researcher, loyal-customer, skeptical-first-timer) |
|
|
609
|
+
| **Influence Matrix** | Conversion effectiveness for each variant and persona combination |
|
|
610
|
+
| **Lever Analysis** | Which persuasion patterns work for each persona |
|
|
611
|
+
| **Constitutional Stealth** | Stealth measures for authorized penetration testing |
|
|
550
612
|
| **Web Security Scan** | OWASP-based security scanning |
|
|
613
|
+
| **Your own API key** | Per-account Anthropic keys for autonomous journeys |
|
|
551
614
|
|
|
552
|
-
|
|
615
|
+
Unlimited tool use, with no credits.
|
|
553
616
|
|
|
554
617
|
---
|
|
555
618
|
|
|
556
619
|
## License
|
|
557
620
|
|
|
558
|
-
**MIT License
|
|
621
|
+
**MIT License.** Free and open source. See [LICENSE](LICENSE).
|
|
559
622
|
|
|
560
623
|
---
|
|
561
624
|
|
|
562
625
|
© 2026 Alexandria Eden · [cbrowser.ai](https://cbrowser.ai) · [alexandria.shai.eden@gmail.com](mailto:alexandria.shai.eden@gmail.com)
|
|
563
626
|
|
|
564
|
-
---
|
|
565
|
-
|
|
566
627
|
## Links
|
|
567
628
|
|
|
568
|
-
- **[Documentation](https://cbrowser.ai/docs)
|
|
629
|
+
- **[Documentation](https://cbrowser.ai/docs)**: guides and API reference
|
|
569
630
|
- [NPM Package](https://www.npmjs.com/package/cbrowser)
|
|
570
631
|
- [GitHub](https://github.com/alexandriashai/cbrowser)
|
|
571
632
|
- [Issue Tracker](https://github.com/alexandriashai/cbrowser/issues)
|
|
572
|
-
- [Roadmap](https://cbrowser.ai/docs/Roadmap)
|
|
573
633
|
|
|
574
634
|
### Research
|
|
575
635
|
|
|
576
|
-
- [Research Methodology](https://cbrowser.ai/docs/Research-Methodology)
|
|
577
|
-
- [Trait Index](https://cbrowser.ai/docs/Trait-Index)
|
|
578
|
-
- [Bibliography](https://cbrowser.ai/docs/Bibliography)
|
|
579
|
-
- [Persona Index](https://cbrowser.ai/docs/Persona-Index)
|
|
636
|
+
- [Research Methodology](https://cbrowser.ai/docs/Research-Methodology): how the traits were selected and validated
|
|
637
|
+
- [Trait Index](https://cbrowser.ai/docs/Trait-Index): every cognitive trait with citations
|
|
638
|
+
- [Bibliography](https://cbrowser.ai/docs/Bibliography): academic references
|
|
639
|
+
- [Persona Index](https://cbrowser.ai/docs/Persona-Index): every cognitive and marketing persona
|