unbrowse 2.10.2 → 2.12.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 CHANGED
@@ -2,28 +2,75 @@
2
2
 
3
3
  This package installs the `unbrowse` CLI.
4
4
 
5
- Turn any website into a reusable API interface for agents. Unbrowse captures network traffic, reverse-engineers the real endpoints underneath the UI, and stores what it learns in a shared marketplace so the next agent can reuse it instantly.
5
+ Unbrowse is a local Model Context Protocol (MCP) server and CLI that turns any website into a reusable API interface for agents. It captures network traffic, reverse-engineers the real endpoints underneath the UI, and stores what it learns in a shared marketplace so the next agent can reuse it instantly.
6
6
 
7
7
  One agent learns a site once. Every later agent gets the fast path.
8
8
 
9
+ Unbrowse is a drop-in replacement for OpenClaw / `agent-browser` browser flows for agents: on the API-native path it is typically ~30x faster, ~90% cheaper, and turns repeated browser work into reusable route assets.
10
+
9
11
  > Security note: capture and execution stay local by default. Credentials stay on your machine. Learned API contracts are published to the shared marketplace only after capture. See [SKILL.md](./SKILL.md) for the full agent-facing API reference and tool-policy guidance.
10
12
 
13
+ ## MCP server
14
+
15
+ Unbrowse implements the Model Context Protocol over stdio. `unbrowse mcp` is the MCP server entrypoint.
16
+
17
+ - Protocol: JSON-RPC 2.0 MCP over stdio
18
+ - Handshake: `initialize`, `notifications/initialized`, `ping`
19
+ - Capability surface today: `tools/list` and `tools/call`
20
+ - Current MCP shape: tools only. No `resources/*` or `prompts/*` methods yet.
21
+ - Runtime model: the MCP server fronts the local Unbrowse runtime on `http://localhost:6969`; hosts talk standard MCP, and Unbrowse uses the local HTTP runtime behind the scenes.
22
+
23
+ Core MCP tools:
24
+
25
+ - Discovery: `unbrowse_health`, `unbrowse_search`, `unbrowse_resolve`, `unbrowse_execute`, `unbrowse_feedback`
26
+ - Auth/cache: `unbrowse_login`, `unbrowse_skills`, `unbrowse_skill`, `unbrowse_sessions`
27
+ - Browser capture: `unbrowse_go`, `unbrowse_snap`, `unbrowse_click`, `unbrowse_fill`, `unbrowse_type`, `unbrowse_press`, `unbrowse_select`, `unbrowse_scroll`, `unbrowse_submit`, `unbrowse_screenshot`, `unbrowse_text`, `unbrowse_markdown`, `unbrowse_cookies`, `unbrowse_eval`, `unbrowse_sync`, `unbrowse_close`
28
+
29
+ Typical MCP host config:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "unbrowse": {
35
+ "command": "npx",
36
+ "args": ["-y", "unbrowse", "mcp"]
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
11
42
  ## Quick start
12
43
 
13
44
  ```bash
14
- # Fastest full setup
15
- npx unbrowse setup
45
+ # Deterministic setup from a repo clone
46
+ git clone --single-branch --depth 1 https://github.com/unbrowse-ai/unbrowse.git ~/unbrowse
47
+ cd ~/unbrowse && ./setup --host off
16
48
  ```
17
49
 
18
- `npx unbrowse setup` downloads the CLI on demand, verifies the bundled Kuri runtime, lets you register with an email-shaped display identity, registers the Open Code `/unbrowse` command when Open Code is detected, and starts the local server.
50
+ `./setup` installs repo dependencies, prebuilds the packaged CLI runtime, installs a stable `unbrowse` shim, and then runs the real first-time bootstrap: ToS acceptance, agent registration + API-key caching, and wallet detection when present.
51
+
52
+ If a wallet is configured, that wallet address becomes the contributor/payment truth: it is synced onto your agent profile, used as the destination for contributor payouts when your routes earn, and used as the spending wallet for paid marketplace routes.
53
+
54
+ Recommended for new installs: set up Crossmint `lobster.cash` during bootstrap. `unbrowse setup` now encourages it, and when the tooling is already present it will try `npx @crossmint/lobster-cli setup` automatically. That wallet becomes the payout destination for contributed routes and the spending wallet for paid marketplace routes.
55
+
56
+ Unbrowse supports wallet providers such as Crossmint `lobster.cash` for x402-gated routes. If you use `lobster.cash`, set `LOBSTER_WALLET_ADDRESS`. Other providers can use `AGENT_WALLET_ADDRESS` and optional `AGENT_WALLET_PROVIDER`.
19
57
 
20
- For daily use:
58
+ For repeat npm use after a healthy publish:
21
59
 
22
60
  ```bash
23
61
  npm install -g unbrowse
24
62
  unbrowse setup
25
63
  ```
26
64
 
65
+ For generic MCP hosts:
66
+
67
+ ```bash
68
+ git clone --single-branch --depth 1 https://github.com/unbrowse-ai/unbrowse.git ~/unbrowse
69
+ cd ~/unbrowse && ./setup --host mcp
70
+ ```
71
+
72
+ That writes a ready-to-import MCP config to `~/.config/unbrowse/mcp/unbrowse.json`. A generic template is also published at [`/mcp.json`](https://www.unbrowse.ai/mcp.json).
73
+
27
74
  If your agent host uses skills:
28
75
 
29
76
  ```bash
@@ -34,11 +81,20 @@ npx skills add unbrowse-ai/unbrowse
34
81
 
35
82
  Unbrowse no longer self-updates at runtime. If you already have Unbrowse installed, upgrade to the latest version after each release or the new flow may not work on your machine.
36
83
 
37
- If you installed the CLI globally:
84
+ If you installed from a repo clone:
38
85
 
39
86
  ```bash
40
- npm install -g unbrowse@latest
41
- unbrowse setup
87
+ cd ~/unbrowse
88
+ git pull --ff-only
89
+ ./setup --host off
90
+ ```
91
+
92
+ If you installed for a generic MCP host:
93
+
94
+ ```bash
95
+ cd ~/unbrowse
96
+ git pull --ff-only
97
+ ./setup --host mcp
42
98
  ```
43
99
 
44
100
  If your agent host uses skills, rerun its skill install/update command too:
@@ -49,27 +105,33 @@ npx skills add unbrowse-ai/unbrowse
49
105
 
50
106
  Need help or want release updates? Join the Discord: [discord.gg/VWugEeFNsG](https://discord.gg/VWugEeFNsG)
51
107
 
52
- Every CLI command auto-starts the local server on `http://localhost:6969` by default. Override with `UNBROWSE_URL`, `PORT`, or `HOST`. On first startup it auto-registers as an agent with the marketplace and caches credentials in `~/.unbrowse/config.json`. `unbrowse setup` now prompts for an email-shaped identity first; headless setups can provide `UNBROWSE_AGENT_EMAIL`.
108
+ Every CLI command auto-starts the local runtime on `http://localhost:6969` by default, and `unbrowse mcp` uses that same runtime behind the MCP stdio surface. Override with `UNBROWSE_URL`, `PORT`, or `HOST`. On first startup it auto-registers as an agent with the marketplace and caches credentials in `~/.unbrowse/config.json`. `unbrowse setup` now prompts for an email-shaped identity first; headless setups can provide `UNBROWSE_AGENT_EMAIL`.
109
+ Public companion docs: [docs.unbrowse.ai](https://docs.unbrowse.ai)
53
110
 
54
111
  Works with Claude Code, Open Code, Cursor, Codex, Windsurf, and any agent host that can call a local CLI or skill.
55
112
 
56
113
  ## What setup does
57
114
 
58
- - Checks local prerequisites for the npm/npx flow.
115
+ - Checks the local runtime/package-manager environment for the repo bootstrap or packaged CLI path.
116
+ - Prebuilds the packaged CLI runtime and installs the stable `unbrowse` shim for the repo bootstrap path.
59
117
  - Verifies the bundled Kuri binary, or builds it from the vendored Kuri source when working from repo source with Zig installed.
60
118
  - Registers the Open Code `/unbrowse` command when Open Code is present.
119
+ - Runs the first-use flow: ToS, agent registration/API-key caching, wallet detection, and Crossmint `lobster.cash` encouragement.
61
120
  - Starts the local Unbrowse server unless `--no-start` is passed.
62
121
 
63
122
  ## Common commands
64
123
 
65
124
  ```bash
66
125
  unbrowse health
126
+ unbrowse mcp
67
127
  unbrowse resolve --intent "get trending searches" --url "https://google.com" --pretty
68
128
  unbrowse login --url "https://calendar.google.com"
69
129
  unbrowse skills
70
130
  unbrowse search --intent "get stock prices"
71
131
  ```
72
132
 
133
+ For most MCP hosts, the standard flow is `unbrowse_resolve` first, then `unbrowse_execute`. For JS-heavy or first-time capture workflows, use the browser tool chain: `unbrowse_go -> unbrowse_snap -> action tools -> unbrowse_submit/unbrowse_sync -> unbrowse_close`.
134
+
73
135
  ## Demo notes
74
136
 
75
137
  - First-time capture/indexing on a site can take 20-80 seconds. That is the slow path; repeats should be much faster.
@@ -80,6 +142,21 @@ unbrowse search --intent "get stock prices"
80
142
 
81
143
  If you tried Unbrowse on a site or API and could not get it to work, add it to [Discussion #53](https://github.com/unbrowse-ai/unbrowse/discussions/53). We use that thread to collect missing or broken targets so we can turn them into requirements for the next eval pass.
82
144
 
145
+ ## Docs
146
+
147
+ The synced skill repo also carries the public docs set:
148
+
149
+ - [Quickstart](./docs/guides/quickstart.md)
150
+ - [API reference](./docs/api.md)
151
+ - [Deployment guide](./docs/deployment.md)
152
+ - [Release checklist](./docs/RELEASING.md)
153
+
154
+ Whitepaper companion docs:
155
+
156
+ - [Whitepaper companion index](./docs/whitepaper/README.md)
157
+ - [For Technical Readers](./docs/whitepaper/for-technical-readers.md)
158
+ - [For Investors](./docs/whitepaper/for-investors.md)
159
+
83
160
  ## How it works
84
161
 
85
162
  When an agent asks for something, Unbrowse first searches the marketplace for an existing skill. If one exists with enough confidence, it executes immediately. If not, Unbrowse captures the site, learns the APIs behind it, publishes a reusable skill, and executes that instead.
@@ -157,6 +234,16 @@ See [SKILL.md](./SKILL.md) for the full API reference including all endpoints, s
157
234
  | GET | `/v1/stats/summary` | Platform stats |
158
235
  | GET | `/health` | Health check |
159
236
 
237
+ ## Docs
238
+
239
+ The standalone skill repo also carries the core repo docs:
240
+
241
+ - [Quickstart guide](./docs/guides/quickstart.md)
242
+ - [API notes](./docs/api.md)
243
+ - [Codex eval harness](./docs/codex-eval-harness.md)
244
+ - [Deployment notes](./docs/deployment.md)
245
+ - [Release checklist](./docs/RELEASING.md)
246
+
160
247
  ## Configuration
161
248
 
162
249
  ### Runtime directories
@@ -2,13 +2,13 @@
2
2
 
3
3
  /**
4
4
  * Thin wrapper — execs the compiled binary if available,
5
- * falls back to source mode (bun/tsx) if not.
5
+ * falls back to the package-managed Node launcher if not.
6
6
  */
7
7
 
8
8
  import { existsSync } from "node:fs";
9
9
  import { join, dirname } from "node:path";
10
10
  import { fileURLToPath } from "node:url";
11
- import { execFileSync, spawn } from "node:child_process";
11
+ import { spawn } from "node:child_process";
12
12
 
13
13
  const __dirname = dirname(fileURLToPath(import.meta.url));
14
14
  const binaryPath = join(__dirname, "unbrowse");
@@ -24,32 +24,16 @@ if (existsSync(binaryPath)) {
24
24
  process.exit(code ?? 1);
25
25
  });
26
26
  } else {
27
- // Fallback: source mode via bun or tsx
28
- const packageRoot = join(__dirname, "..");
29
- const entry = join(packageRoot, "runtime-src", "cli.ts");
30
-
31
- // Try bun first, then node+tsx
32
- try {
33
- execFileSync("which", ["bun"], { stdio: "ignore" });
34
- const child = spawn("bun", [entry, ...process.argv.slice(2)], {
35
- stdio: "inherit",
36
- cwd: process.cwd(),
37
- });
38
- child.on("exit", (code, signal) => {
39
- if (signal) { process.kill(process.pid, signal); return; }
40
- process.exit(code ?? 1);
41
- });
42
- } catch {
43
- // No bun — use node+tsx
44
- const tsxPath = join(packageRoot, "node_modules", "tsx", "dist", "loader.mjs");
45
- const child = spawn(process.execPath, ["--import", tsxPath, entry, ...process.argv.slice(2)], {
46
- stdio: "inherit",
47
- cwd: process.cwd(),
48
- env: { ...process.env, UNBROWSE_PACKAGE_ROOT: packageRoot },
49
- });
50
- child.on("exit", (code, signal) => {
51
- if (signal) { process.kill(process.pid, signal); return; }
52
- process.exit(code ?? 1);
53
- });
54
- }
27
+ // Fallback: delegate to the stable package launcher so
28
+ // npm installs and npx use the same dependency resolution path.
29
+ const launcherPath = join(__dirname, "unbrowse.js");
30
+ const child = spawn(process.execPath, [launcherPath, ...process.argv.slice(2)], {
31
+ stdio: "inherit",
32
+ cwd: process.cwd(),
33
+ env: process.env,
34
+ });
35
+ child.on("exit", (code, signal) => {
36
+ if (signal) { process.kill(process.pid, signal); return; }
37
+ process.exit(code ?? 1);
38
+ });
55
39
  }