@agentrhq/webcmd 0.3.3 → 0.4.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 +45 -272
- package/cli-manifest.json +184 -311
- package/clis/_shared/site-auth.js +37 -40
- package/clis/_shared/site-auth.test.js +109 -22
- package/clis/amazon/auth.js +0 -6
- package/clis/band/auth.js +0 -6
- package/clis/blinkit/auth.js +13 -40
- package/clis/blinkit/blinkit.test.js +39 -2
- package/clis/chatgpt/auth.js +0 -6
- package/clis/claude/auth.js +0 -6
- package/clis/coupang/auth.js +0 -6
- package/clis/district/auth.js +0 -2
- package/clis/facebook/auth.js +0 -6
- package/clis/gemini/auth.js +0 -6
- package/clis/github/auth.js +0 -6
- package/clis/grok/auth.js +0 -6
- package/clis/hackernews/hackernews.test.js +20 -1
- package/clis/hackernews/jobs.js +1 -1
- package/clis/hf/auth.js +2 -7
- package/clis/instagram/auth.js +0 -6
- package/clis/linkedin/auth.js +0 -6
- package/clis/linkedin-learning/auth.js +0 -6
- package/clis/manus/auth.js +0 -6
- package/clis/notebooklm/auth.js +0 -6
- package/clis/pixiv/auth.js +1 -7
- package/clis/practo/login.js +12 -38
- package/clis/practo/practo.test.js +13 -9
- package/clis/reddit/auth.js +0 -6
- package/clis/reuters/auth.js +0 -14
- package/clis/suno/auth.js +0 -6
- package/clis/tiktok/auth.js +0 -6
- package/clis/twitter/auth.js +0 -6
- package/clis/upwork/auth.js +0 -6
- package/clis/youtube/auth.js +0 -6
- package/clis/zepto/auth.js +16 -29
- package/clis/zepto/zepto.test.js +45 -2
- package/dist/src/browser/ax-snapshot.js +15 -5
- package/dist/src/browser/ax-snapshot.test.js +49 -0
- package/dist/src/browser/cdp.js +3 -1
- package/dist/src/browser/cdp.test.js +12 -0
- package/dist/src/browser/page.js +6 -2
- package/dist/src/browser/page.test.js +1 -0
- package/dist/src/browser/protocol.d.ts +2 -0
- package/dist/src/browser/runtime/local-cloak/actions.js +42 -21
- package/dist/src/browser/runtime/local-cloak/provider.test.js +33 -5
- package/dist/src/build-manifest.js +3 -3
- package/dist/src/build-manifest.test.js +14 -0
- package/dist/src/docs-sync-review.js +2 -2
- package/dist/src/docs-sync-review.test.js +2 -2
- package/dist/src/hosted/main-lifecycle.test.js +2 -1
- package/dist/src/hosted/manifest.test.js +2 -1
- package/dist/src/hosted/output-parity.test.js +2 -1
- package/dist/src/hosted/root-command-surface.test.js +1 -1
- package/dist/src/hosted/runner.test.js +8 -4
- package/dist/src/skills.test.js +54 -0
- package/hosted-contract.json +191 -366
- package/package.json +5 -4
- package/skills/smart-search/SKILL.md +20 -6
- package/skills/webcmd-adapter-author/SKILL.md +2 -0
- package/skills/webcmd-autofix/SKILL.md +5 -3
- package/skills/webcmd-browser/SKILL.md +28 -13
- package/skills/webcmd-usage/SKILL.md +29 -6
- package/clis/practo/whoami.js +0 -28
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<img width="
|
|
1
|
+
<img width="1280" height="640" alt="Webcmd — stop paying agents to rediscover the web" src="docs/readme-hero.png" />
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
<p align="center">
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
<a href="https://www.npmjs.com/package/@agentrhq/webcmd">
|
|
9
9
|
<img alt="NPM downloads" src="https://img.shields.io/npm/dt/@agentrhq/webcmd.svg?style=for-the-badge&color=1E88E5&labelColor=000000">
|
|
10
10
|
</a>
|
|
11
|
-
<a href="https://
|
|
12
|
-
<img alt="Documentation" src="https://img.shields.io/badge/docs-webcmd.dev-
|
|
11
|
+
<a href="https://webcmd.dev/docs">
|
|
12
|
+
<img alt="Documentation" src="https://img.shields.io/badge/docs-webcmd.dev-7C3AED.svg?style=for-the-badge&labelColor=000000">
|
|
13
13
|
</a>
|
|
14
14
|
<a href="https://github.com/agentrhq/webcmd/blob/main/LICENSE">
|
|
15
15
|
<img alt="License" src="https://img.shields.io/badge/license-Apache%202.0-1E88E5.svg?style=for-the-badge&labelColor=000000">
|
|
16
16
|
</a>
|
|
17
17
|
<a href="https://discord.gg/9YP2C9tvMp">
|
|
18
|
-
<img alt="Join the community on Discord" src="https://img.shields.io/badge/Join%20the%20community-
|
|
18
|
+
<img alt="Join the community on Discord" src="https://img.shields.io/badge/Join%20the%20community-5865F2.svg?style=for-the-badge&logo=discord&logoColor=white&labelColor=000000&logoWidth=20">
|
|
19
19
|
</a>
|
|
20
20
|
<a href="https://x.com/agentrhq">
|
|
21
21
|
<img alt="Follow AgentR on X" src="https://img.shields.io/badge/Built%20by%20%40agentrhq-000000.svg?style=for-the-badge&logo=x&logoColor=white&labelColor=000000&logoWidth=20">
|
|
@@ -28,8 +28,6 @@
|
|
|
28
28
|
|
|
29
29
|
WebCMD learns the navigational context of websites as agents use them, then compiles that knowledge into deterministic commands for faster, cheaper, more reliable browser automation. The goal is simple: stop making agents rediscover the same sites on every run and cut browser-agent token spend by up to 90%.
|
|
30
30
|
|
|
31
|
-
📖 **Full documentation: [docs.webcmd.dev](https://docs.webcmd.dev)**
|
|
32
|
-
|
|
33
31
|
On top of live browser control, WebCMD adds 3 layers of learnings. Each layer collapses cost and variance for the layer above it.
|
|
34
32
|
|
|
35
33
|
| Layer | Scenario | What Webcmd Helps With |
|
|
@@ -39,236 +37,71 @@ On top of live browser control, WebCMD adds 3 layers of learnings. Each layer co
|
|
|
39
37
|
| 3. CLI authoring | The action space is known, but the path is still too variable for one fixed sequence. | Explicitly author a reusable `webcmd <site>` adapter with structured output, so future agents spend tokens on the task instead of navigation. |
|
|
40
38
|
| 4. Extend existing CLIs | The workflow is deterministic enough to stop browsing. | Extend the `webcmd <site>` adapter with a tailored command so the workflow runs instantly with the least amount of tokens. |
|
|
41
39
|
|
|
40
|
+
## Demo
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
https://github.com/user-attachments/assets/04eceadc-d398-4303-984d-ae3197bfa664
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
## Quick Start
|
|
46
45
|
|
|
47
|
-
Webcmd requires
|
|
46
|
+
Webcmd requires Node.js 20+.
|
|
48
47
|
|
|
49
48
|
```bash
|
|
50
|
-
node --version
|
|
51
49
|
npm install -g @agentrhq/webcmd
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 2. Verify the browser runtime
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
webcmd doctor
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
`doctor` checks the Webcmd browser bridge: daemon status, browser runtime installation, profile selection, and a live connectivity probe. Pure public adapters and local passthrough commands do not need a green browser check, but `COOKIE`, `INTERCEPT`, `UI`, and `webcmd browser` workflows do.
|
|
61
|
-
|
|
62
|
-
### 3. Discover commands
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
webcmd list
|
|
66
|
-
webcmd list -f json
|
|
67
|
-
webcmd reddit --help
|
|
68
|
-
webcmd reddit hot --help
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
`webcmd list -f json` is the source of truth for agents. It emits one row per command with the site, command name, arguments, output columns, browser requirement, and strategy.
|
|
72
|
-
|
|
73
|
-
### 4. Run your first command
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
webcmd hackernews top --limit 5
|
|
77
|
-
webcmd reddit popular --limit 5
|
|
78
|
-
webcmd pubmed search "agentic browser automation" --limit 5 -f json
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## For Humans
|
|
82
|
-
|
|
83
|
-
Use Webcmd directly when you want a reliable command instead of a live browser session:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
webcmd list
|
|
87
|
-
webcmd <site> --help
|
|
88
|
-
webcmd <site> <command> --help
|
|
89
|
-
webcmd <site> <command> -f yaml
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
The everyday surface is intentionally small:
|
|
93
|
-
|
|
94
|
-
- `webcmd list` shows every registered adapter and external command.
|
|
95
|
-
- `webcmd <site> <command> ...` runs a built-in, plugin, or private adapter.
|
|
96
|
-
|
|
97
|
-
For example:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
webcmd hackernews top --limit 10
|
|
101
|
-
webcmd reddit subreddit programming --limit 10
|
|
102
|
-
webcmd twitter whoami
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Adapter commands are tagged by strategy:
|
|
106
|
-
|
|
107
|
-
| Strategy | What it means |
|
|
108
|
-
|----------|---------------|
|
|
109
|
-
| `PUBLIC` | No browser or login. Webcmd can call a public endpoint or page directly. |
|
|
110
|
-
| `COOKIE` | Uses the logged-in Webcmd browser profile for authenticated reads. |
|
|
111
|
-
| `INTERCEPT` | Uses the browser to capture a signed or stateful request before replaying it. |
|
|
112
|
-
| `UI` | Drives the page UI directly. |
|
|
113
|
-
| `LOCAL` | Talks to a local app, service, or CLI surface. |
|
|
114
|
-
|
|
115
|
-
Output formats are consistent across adapters:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
webcmd hackernews top -f table
|
|
119
|
-
webcmd hackernews top -f json
|
|
120
|
-
webcmd hackernews top -f yaml
|
|
121
|
-
webcmd hackernews top -f md
|
|
122
|
-
webcmd hackernews top -f csv
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Agents usually want `-f json`; humans usually want table (default) or yaml.
|
|
126
|
-
|
|
127
|
-
## For AI Agents
|
|
128
|
-
|
|
129
|
-
Webcmd is designed to be driven by coding agents such as Codex, Claude Code, Cursor, and similar tools.
|
|
130
|
-
|
|
131
|
-
## Add skills (also refreshes existing links)
|
|
132
|
-
|
|
133
|
-
Add Webcmd skills to your agent environment:
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
50
|
webcmd skills add
|
|
137
51
|
```
|
|
138
52
|
|
|
139
|
-
|
|
53
|
+
When prompted, choose a supported harness such as Codex or Claude, or enter a custom skills path.
|
|
140
54
|
|
|
141
|
-
|
|
55
|
+
In your agent harness, load or tag `webcmd-usage`, then describe the outcome you want.
|
|
142
56
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
| Skill | When to use |
|
|
146
|
-
|-------|-------------|
|
|
147
|
-
| [`webcmd-usage`](./skills/webcmd-usage/SKILL.md) | Orient an agent to Webcmd commands, formats, strategies, plugins, and external CLIs. |
|
|
148
|
-
| [`webcmd-browser`](./skills/webcmd-browser/SKILL.md) | Drive a real browser ad hoc: inspect, click, type, extract, network, tabs, waits. |
|
|
149
|
-
| [`webcmd-adapter-author`](./skills/webcmd-adapter-author/SKILL.md) | Write or extend a reusable site adapter. |
|
|
150
|
-
| [`webcmd-autofix`](./skills/webcmd-autofix/SKILL.md) | Repair an adapter after selectors, APIs, or response shapes drift. |
|
|
151
|
-
| [`webcmd-browser-sitemap`](./skills/webcmd-browser-sitemap/SKILL.md) | Use recorded site knowledge while driving a browser task. |
|
|
152
|
-
| [`webcmd-sitemap-author`](./skills/webcmd-sitemap-author/SKILL.md) | Capture or update reusable sitemap knowledge for future agents. |
|
|
153
|
-
| [`smart-search`](./skills/smart-search/SKILL.md) | Route search and research requests to the right adapter. |
|
|
154
|
-
|
|
155
|
-
The common agent workflow is:
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
webcmd list -f json
|
|
159
|
-
webcmd <site> <command> -f json
|
|
160
|
-
webcmd <site> <command> --trace retain-on-failure -f json
|
|
57
|
+
```text
|
|
58
|
+
Use webcmd to research the latest discussions about browser automation across Hacker News and Reddit, then return a concise comparison with source links.
|
|
161
59
|
```
|
|
162
60
|
|
|
163
|
-
|
|
61
|
+
## What You Can Ask
|
|
164
62
|
|
|
165
|
-
|
|
63
|
+
- “Use webcmd to research agentic browser automation on PubMed and return the title, authors, publication date, abstract, and URL for each result.”
|
|
64
|
+
- “Use webcmd to find active AI infrastructure companies in the YC company directory and return the company, batch, description, location, profile URL, and source links. Keep it read-only.”
|
|
65
|
+
- “Use webcmd to look up parts on Grainger by part number and return price, stock, minimum order quantity, lead time, and product URL.”
|
|
66
|
+
- “Use webcmd with my logged-in `work` profile to summarize unread LinkedIn messages from the last seven days and return the sender, subject or opening text, received time, and conversation URL.”
|
|
67
|
+
- “Repair `webcmd reddit popular --limit 10` and keep returning the title, subreddit, score, comment count, and URL.”
|
|
68
|
+
- “Use webcmd to check Grainger part prices and SAP Ariba purchase-order status, then return a combined summary.”
|
|
166
69
|
|
|
167
|
-
|
|
70
|
+
## See It in Action: X → CLI
|
|
168
71
|
|
|
169
|
-
```
|
|
170
|
-
webcmd
|
|
72
|
+
```text
|
|
73
|
+
Use webcmd with my logged-in `social` profile to collect my recent X bookmarks and return the author, text, and URL.
|
|
171
74
|
```
|
|
172
75
|
|
|
173
|
-
|
|
76
|
+
The agent explores the X workflow once using the logged-in profile.
|
|
77
|
+
It creates a stable command that returns the requested bookmark fields.
|
|
78
|
+
Later agents reuse that command instead of repeating browser exploration; learn the pattern in [X → CLI](https://webcmd.dev/docs/x-session-cli).
|
|
174
79
|
|
|
175
|
-
|
|
80
|
+
## Where Webcmd Works
|
|
176
81
|
|
|
177
|
-
|
|
178
|
-
$ webcmd browser work open https://reddit.com
|
|
179
|
-
{
|
|
180
|
-
"url": "https://reddit.com",
|
|
181
|
-
"page": "page-1783484232033-8"
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Use `webcmd browser work tab list` to inspect all tabs — each entry carries its page ID (`id`/`page`), the owning `session` (adapter sessions appear as `site:<name>`), and whether it is the currently `selected` tab. Pass `--tab <pageId>` to route a single command to a specific tab:
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
webcmd browser work open https://example.com --tab page-1783484232033-8
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
`tab new` creates a tab without changing the session's default tab; only `tab select <pageId>` promotes a tab to the default for later untargeted commands in the same session.
|
|
192
|
-
|
|
193
|
-
Useful browser primitives include:
|
|
194
|
-
|
|
195
|
-
| Area | Commands |
|
|
196
|
-
|------|----------|
|
|
197
|
-
| Navigation | `open`, `back`, `wait`, `scroll`, `close` |
|
|
198
|
-
| Inspection | `state`, `find`, `get`, `frames`, `screenshot`, `extract` |
|
|
199
|
-
| Interaction | `click`, `type`, `fill`, `select`, `keys`, `hover`, `focus`, `check`, `uncheck`, `upload`, `drag` |
|
|
200
|
-
| Network | `network`, `network --detail <key>`, `network --filter <fields>` |
|
|
201
|
-
| Tabs | `tab list`, `tab new`, `tab select`, `tab close`, `bind`, `unbind` |
|
|
202
|
-
| Adapter work | `init`, `verify`, `analyze` |
|
|
203
|
-
|
|
204
|
-
Every interaction command returns structured data: match count, target identity, confidence level, and machine-readable errors. That contract is why agents can recover from mild DOM drift instead of guessing.
|
|
205
|
-
|
|
206
|
-
### Profiles
|
|
207
|
-
|
|
208
|
-
Named profiles let Webcmd keep separate browser identities:
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
webcmd profile list
|
|
212
|
-
webcmd profile rename <context-id> work
|
|
213
|
-
webcmd profile use work
|
|
214
|
-
webcmd --profile work browser work state
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
If multiple browser profiles are connected and no default is selected, Webcmd asks you to choose rather than guessing.
|
|
218
|
-
|
|
219
|
-
## Built-in Commands
|
|
220
|
-
|
|
221
|
-
Webcmd ships a large adapter registry. The list changes over time, so use `webcmd list -f json` for the current surface. Highlights include:
|
|
222
|
-
|
|
223
|
-
| Site/App | Example commands |
|
|
224
|
-
|----------|------------------|
|
|
225
|
-
| `hackernews` | `top`, `new`, `best`, `ask`, `show`, `jobs`, `search`, `read`, `user` |
|
|
226
|
-
| `reddit` | `hot`, `popular`, `search`, `subreddit`, `read`, `user`, `comment`, `save`, `upvote`, `subscribe` |
|
|
227
|
-
| `linkedin` | `search`, `people-search`, `jobs-preferences`, `job-detail`, `profile-read`, `posts`, `inbox`, `safe-send` |
|
|
228
|
-
| `twitter` | `trending`, `search`, `timeline`, `tweets`, `post`, `profile`, `bookmarks`, `notifications`, `follow`, `unfollow` |
|
|
229
|
-
| `tiktok` | `search`, `explore`, `user`, `creator-videos`, `notifications`, `follow`, `comment`, `like`, `save` |
|
|
230
|
-
| `amazon` | `search`, `product`, `offer`, `bestsellers`, `new-releases`, `movers-shakers`, `discussion` |
|
|
231
|
-
| `pubmed` | `search`, `article`, `author`, `citations`, `clinical-trial`, `journal`, `mesh`, `related`, `review` |
|
|
232
|
-
| `chatgpt` | `ask`, `send`, `new`, `read`, `history`, `detail`, `image`, `deep-research-result`, `model` |
|
|
233
|
-
| `claude` | `ask`, `send`, `new`, `read`, `history`, `detail`, `status` |
|
|
234
|
-
| `gemini` | `ask`, `new`, `image`, `deep-research`, `deep-research-result`, `models` |
|
|
235
|
-
| `notebooklm` | `list`, `open`, `summary`, `source-list`, `source-get`, `source-fulltext`, `generate-audio`, `generate-slides` |
|
|
236
|
-
|
|
237
|
-
Current registry size is generated from [`cli-manifest.json`](./cli-manifest.json); this README intentionally lists highlights, not a frozen catalog.
|
|
238
|
-
|
|
239
|
-
## External CLI Hub
|
|
240
|
-
|
|
241
|
-
Webcmd can expose existing command-line tools through the same discovery and invocation surface:
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
webcmd external install gh
|
|
245
|
-
webcmd external register my-tool \
|
|
246
|
-
--binary my-tool \
|
|
247
|
-
--install "npm i -g my-tool" \
|
|
248
|
-
--desc "My internal CLI"
|
|
249
|
-
webcmd external list
|
|
250
|
-
|
|
251
|
-
webcmd gh pr list --limit 5
|
|
252
|
-
webcmd docker ps
|
|
253
|
-
```
|
|
82
|
+
Beyond website adapters, Webcmd can work through authenticated browser sessions, APIs, desktop apps, and local tools.
|
|
254
83
|
|
|
255
|
-
|
|
84
|
+
| Group | Supported surfaces | Representative outcomes |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| research and communities | Hacker News, Reddit, PubMed | Compare current discussions, find primary research, and return concise summaries with source links. |
|
|
87
|
+
| social and professional | X/Twitter, LinkedIn, TikTok | Collect bookmarks, monitor public posts, or research people and creators with a named profile when needed. |
|
|
88
|
+
| AI tools | ChatGPT, Claude, Gemini, NotebookLM | Retrieve conversations, research outputs, notebooks, and generated materials from the tools you already use. |
|
|
89
|
+
| shopping and bookings | Amazon, Blinkit, Zepto, BigBasket, District, Practo | Compare products, availability, prices, appointments, events, and delivery options. |
|
|
256
90
|
|
|
257
|
-
|
|
91
|
+
This list is illustrative; ask your agent to use webcmd to discover what is currently available.
|
|
258
92
|
|
|
259
|
-
|
|
93
|
+
## Learn More
|
|
260
94
|
|
|
261
|
-
|
|
262
|
-
webcmd plugin install github:user/repo
|
|
263
|
-
webcmd plugin list -f json
|
|
264
|
-
webcmd plugin update --all
|
|
265
|
-
webcmd plugin uninstall <name>
|
|
266
|
-
webcmd plugin create <name>
|
|
267
|
-
```
|
|
95
|
+
Webcmd Cloud can run supported commands and browser sessions on hosted infrastructure. It is in active development and is not yet stable.
|
|
268
96
|
|
|
269
|
-
|
|
97
|
+
- [Prompt Cookbook](https://webcmd.dev/docs/agent-prompts)
|
|
98
|
+
- [How Webcmd Works](https://webcmd.dev/docs/concepts)
|
|
99
|
+
- [Local or Cloud](https://webcmd.dev/docs/local-or-cloud)
|
|
100
|
+
- [Publish a Community Plugin](https://webcmd.dev/docs/publish-community-plugin)
|
|
101
|
+
- [X → CLI](https://webcmd.dev/docs/x-session-cli)
|
|
102
|
+
- [Command Surface](https://webcmd.dev/docs/cli-reference)
|
|
270
103
|
|
|
271
|
-
|
|
104
|
+
## Community
|
|
272
105
|
|
|
273
106
|
<!-- webcmd-community-plugins:start -->
|
|
274
107
|
### Community plugins
|
|
@@ -278,69 +111,9 @@ Use plugins for private company workflows, community adapters, or experiments th
|
|
|
278
111
|
| [`skyscanner`](./plugins/skyscanner/) | Skyscanner flight search commands for Webcmd | [Rishabh](https://github.com/rishabhraj36) |
|
|
279
112
|
<!-- webcmd-community-plugins:end -->
|
|
280
113
|
|
|
281
|
-
##
|
|
282
|
-
|
|
283
|
-
When a site is not covered yet, author a reusable adapter instead of leaving an agent to spend tokens clicking through the same browser flow every time.
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
webcmd browser init <site>/<command>
|
|
287
|
-
webcmd validate <site>/<command>
|
|
288
|
-
webcmd verify <site>/<command> --smoke
|
|
289
|
-
webcmd browser work verify <site>/<command>
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
Adapter files import the public Webcmd registry/error APIs:
|
|
293
|
-
|
|
294
|
-
```js
|
|
295
|
-
import { cli, Strategy } from '@agentrhq/webcmd/registry';
|
|
296
|
-
import { CommandExecutionError } from '@agentrhq/webcmd/errors';
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
Private adapters can live in `~/.webcmd/clis/<site>/<command>.js`; bundled upstream adapters live in [`clis/`](./clis/), while community upstream adapters live as plugins under [`plugins/`](./plugins/). For the full authoring workflow, install and use [`webcmd-adapter-author`](./skills/webcmd-adapter-author/SKILL.md).
|
|
300
|
-
|
|
301
|
-
## Configuration
|
|
302
|
-
|
|
303
|
-
| Variable | Default | Description |
|
|
304
|
-
|----------|---------|-------------|
|
|
305
|
-
| `WEBCMD_PROFILE` | none | Browser runtime profile alias/context ID to use when multiple profiles are available. |
|
|
306
|
-
| `WEBCMD_WINDOW` | command-specific | `foreground` or `background` browser window mode. |
|
|
307
|
-
| `WEBCMD_BROWSER_CONNECT_TIMEOUT` | `45` | Seconds to wait for the browser bridge. |
|
|
308
|
-
| `WEBCMD_BROWSER_COMMAND_TIMEOUT` | `60` | Seconds to wait for one browser command. |
|
|
309
|
-
| `WEBCMD_CDP_ENDPOINT` | none | Manual CDP endpoint for remote browsers or Electron apps. |
|
|
310
|
-
| `WEBCMD_CDP_TARGET` | none | Filter CDP targets by URL substring. |
|
|
311
|
-
| `WEBCMD_CACHE_DIR` | `~/.webcmd/cache` | Browser state and network capture cache. |
|
|
312
|
-
| `WEBCMD_VERBOSE` | `false` | Enable verbose logs. Also enabled by `-v`. |
|
|
313
|
-
|
|
314
|
-
Common paths:
|
|
315
|
-
|
|
316
|
-
| Path | Purpose |
|
|
317
|
-
|------|---------|
|
|
318
|
-
| `~/.webcmd/` | User-level Webcmd state. |
|
|
319
|
-
| `~/.webcmd/clis/` | Private adapters. |
|
|
320
|
-
| `~/.webcmd/cache/browser-network/` | Cached browser network captures. |
|
|
321
|
-
| `~/.webcmd/external-clis.yaml` | User external CLI registry entries. |
|
|
322
|
-
| `~/.agents/skills/` | Common global skills directory for agent skill managers. |
|
|
323
|
-
| `.agents/skills/` | Common workspace-local skills directory. |
|
|
324
|
-
|
|
325
|
-
## Troubleshooting
|
|
326
|
-
|
|
327
|
-
- **Browser bridge is unavailable**: run `webcmd doctor -v` and follow the daemon/profile/runtime hint it prints.
|
|
328
|
-
- **Multiple profiles are connected**: run `webcmd profile list`, then `webcmd profile use <name>` or pass `--profile <name>`.
|
|
329
|
-
- **Authenticated adapter returns empty or unauthorized**: log into the target site in the Webcmd-managed browser profile, then retry.
|
|
330
|
-
- **A site changed and an adapter fails**: rerun with `--trace retain-on-failure -f json`, inspect the trace summary, and use `webcmd-autofix`.
|
|
331
|
-
- **A browser target is stale**: run `webcmd browser <session> state` again and use the fresh numeric ref or locator.
|
|
332
|
-
- **Node errors on startup**: Webcmd requires Node.js >= 20. Check `node --version`.
|
|
333
|
-
|
|
334
|
-
## Development
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
npm install
|
|
338
|
-
npm test
|
|
339
|
-
npm run typecheck
|
|
340
|
-
npm run build
|
|
341
|
-
```
|
|
114
|
+
## Contributing
|
|
342
115
|
|
|
343
|
-
|
|
116
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
344
117
|
|
|
345
118
|
## License
|
|
346
119
|
|