@jobshimo/browser-link 0.0.1 → 0.1.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/LICENSE +21 -21
- package/README.md +102 -83
- package/dist/cli.js +19 -19
- package/dist/commands/about.d.ts +17 -15
- package/dist/commands/about.js +161 -186
- package/dist/commands/about.js.map +1 -1
- package/dist/commands/menu.d.ts +2 -3
- package/dist/commands/menu.js +111 -131
- package/dist/commands/menu.js.map +1 -1
- package/dist/commands/welcome.d.ts +8 -7
- package/dist/commands/welcome.js +78 -121
- package/dist/commands/welcome.js.map +1 -1
- package/dist/extension/background.js +90 -90
- package/dist/extension/icons/icon.svg +14 -14
- package/dist/extension/manifest.json +28 -28
- package/dist/extension/popup.html +88 -88
- package/dist/installers/index.d.ts +2 -3
- package/dist/installers/index.js +4 -4
- package/dist/installers/index.js.map +1 -1
- package/dist/installers/opencode.js +49 -21
- package/dist/installers/opencode.js.map +1 -1
- package/dist/map/db.js +28 -28
- package/dist/map/queries.js +4 -4
- package/dist/tools/server-instructions.js +46 -46
- package/package.json +64 -61
- package/dist/commands/tty.d.ts +0 -51
- package/dist/commands/tty.js +0 -148
- package/dist/commands/tty.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Martín Miguel Bernal
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Martín Miguel Bernal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,83 +1,102 @@
|
|
|
1
|
-
# @jobshimo/browser-link
|
|
2
|
-
|
|
3
|
-
> ⚠️
|
|
4
|
-
>
|
|
5
|
-
> This package opens a bridge between
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
> tab is
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
15
|
-
>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
# @jobshimo/browser-link
|
|
2
|
+
|
|
3
|
+
> ⚠️ **Read this before installing**
|
|
4
|
+
>
|
|
5
|
+
> This package opens a bridge between your MCP client (Claude Code,
|
|
6
|
+
> OpenCode, …) and the Chrome tabs you explicitly enable through a
|
|
7
|
+
> companion extension. On every tab where you press "Conectar" in the
|
|
8
|
+
> extension popup, the agent can read its DOM, click, type, run
|
|
9
|
+
> arbitrary JavaScript, and follow links — including any logged-in
|
|
10
|
+
> session, saved card, wallet, banking page or admin panel that tab is
|
|
11
|
+
> currently showing.
|
|
12
|
+
>
|
|
13
|
+
> Treat the agent like a junior dev with remote control of those tabs.
|
|
14
|
+
> Only enable tabs where you would let an automated process act on your
|
|
15
|
+
> behalf, and disconnect them when you are done. You are responsible for
|
|
16
|
+
> every action the agent performs on the tabs you explicitly enable.
|
|
17
|
+
|
|
18
|
+
MCP server that bridges any MCP-compatible client (Claude Code, OpenCode,
|
|
19
|
+
and friends) to the Chrome tabs you grant access to, through a small
|
|
20
|
+
WebSocket relay and a companion Chrome extension. Ships with a persistent
|
|
21
|
+
UI map so the agent remembers selectors, flows and gotchas it learned
|
|
22
|
+
about each app, across sessions.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -g @jobshimo/browser-link
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This puts the `browser-link` binary on your PATH on macOS, Linux and Windows.
|
|
31
|
+
|
|
32
|
+
## Set it up
|
|
33
|
+
|
|
34
|
+
The fastest path is the interactive menu (built on `@clack/prompts` —
|
|
35
|
+
flicker-free in PowerShell, Windows Terminal, macOS Terminal, iTerm, every
|
|
36
|
+
Linux TTY):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
browser-link
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
That opens the welcome / disclaimer screen (English or Spanish), and then
|
|
43
|
+
the setup menu where you can register browser-link with **Claude Code** or
|
|
44
|
+
**OpenCode**, see the Chrome extension install steps, run a doctor
|
|
45
|
+
diagnose, and open the about / help page.
|
|
46
|
+
|
|
47
|
+
If you prefer direct commands:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
browser-link install # register in every detected client
|
|
51
|
+
browser-link install --client claude # register only in Claude Code
|
|
52
|
+
browser-link install --client opencode # register only in OpenCode
|
|
53
|
+
browser-link uninstall --client opencode # remove from one client
|
|
54
|
+
browser-link extension # show the Chrome extension assets path + steps
|
|
55
|
+
browser-link doctor # diagnose current setup
|
|
56
|
+
browser-link about # what this is, how it works, every tool
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
After `install`, restart the MCP client so it picks up the new entry.
|
|
60
|
+
After `extension`, follow the printed steps to load the unpacked extension
|
|
61
|
+
in Chrome. Then click "Conectar" on every tab you want the agent to reach
|
|
62
|
+
— and only on those.
|
|
63
|
+
|
|
64
|
+
## Supported MCP clients
|
|
65
|
+
|
|
66
|
+
| Client | Config file written |
|
|
67
|
+
| ------------------------------------------------- | -------------------------------------------------------------- |
|
|
68
|
+
| [Claude Code](https://docs.claude.com/claude-code) | `~/.claude.json` (`%USERPROFILE%\.claude.json` on Windows) |
|
|
69
|
+
| [OpenCode](https://opencode.ai) | `~/.config/opencode/opencode.json` on **every** OS (Win incl.) |
|
|
70
|
+
|
|
71
|
+
Both registrations are idempotent — re-running `install` updates the
|
|
72
|
+
entry instead of duplicating it. `uninstall --client <id>` removes it
|
|
73
|
+
cleanly without touching anything else in the file.
|
|
74
|
+
|
|
75
|
+
## Tools exposed
|
|
76
|
+
|
|
77
|
+
Browser bridge: `browser.list_tabs`, `browser.ping`, `browser.navigate`,
|
|
78
|
+
`browser.snapshot`, `browser.click`, `browser.type`, `browser.evaluate`,
|
|
79
|
+
`browser.console`, `browser.network`, `browser.network_body`.
|
|
80
|
+
|
|
81
|
+
UI map (persistent across sessions): `browser.map.recall`,
|
|
82
|
+
`browser.map.save`, `browser.map.record_use`, `browser.map.forget`,
|
|
83
|
+
`browser.map.rename_app`, `browser.map.apps`.
|
|
84
|
+
|
|
85
|
+
The server also ships usage instructions for the agent via the MCP
|
|
86
|
+
`initialize` handshake — no manual prompt setup required.
|
|
87
|
+
|
|
88
|
+
## Where the data lives
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
macOS ~/Library/Application Support/browser-link/map.db
|
|
92
|
+
Linux $XDG_DATA_HOME/browser-link/map.db (default: ~/.local/share/browser-link/map.db)
|
|
93
|
+
Windows %APPDATA%/browser-link/map.db
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Override with `BROWSER_LINK_DATA_DIR`. The database is local to your
|
|
97
|
+
machine and never uploaded anywhere by this package. The WebSocket relay
|
|
98
|
+
binds to `127.0.0.1:17529` (loopback only).
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
MIT — see [LICENSE](https://github.com/jobshimo/browser-link/blob/main/LICENSE).
|
package/dist/cli.js
CHANGED
|
@@ -5,25 +5,25 @@ import { uninstallAll, uninstallFor } from './commands/uninstall.js';
|
|
|
5
5
|
import { printExtensionInstructions } from './commands/extension.js';
|
|
6
6
|
import { printAbout } from './commands/about.js';
|
|
7
7
|
import { loadConfig } from './config.js';
|
|
8
|
-
const HELP = `browser-link — bridge Claude Code to the Chrome tabs you enable.
|
|
9
|
-
|
|
10
|
-
Usage:
|
|
11
|
-
browser-link When invoked from an interactive terminal,
|
|
12
|
-
opens a setup menu (register Claude Code,
|
|
13
|
-
show extension steps, run doctor, about).
|
|
14
|
-
When invoked by Claude Code (no TTY),
|
|
15
|
-
starts the MCP server over stdio.
|
|
16
|
-
browser-link install Register browser-link with Claude Code.
|
|
17
|
-
browser-link uninstall Remove the registration.
|
|
18
|
-
browser-link extension Show the path of the Chrome extension assets
|
|
19
|
-
and per-OS install instructions.
|
|
20
|
-
browser-link doctor Diagnose current setup (Claude Code, server, extension, map DB).
|
|
21
|
-
browser-link about Show the full explanation of what this is and how it works.
|
|
22
|
-
browser-link help This message.
|
|
23
|
-
|
|
24
|
-
Environment:
|
|
25
|
-
BROWSER_LINK_DATA_DIR Override the DB location (defaults per OS).
|
|
26
|
-
BROWSER_LINK_BIN Override the command stored in client configs
|
|
8
|
+
const HELP = `browser-link — bridge Claude Code to the Chrome tabs you enable.
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
browser-link When invoked from an interactive terminal,
|
|
12
|
+
opens a setup menu (register Claude Code,
|
|
13
|
+
show extension steps, run doctor, about).
|
|
14
|
+
When invoked by Claude Code (no TTY),
|
|
15
|
+
starts the MCP server over stdio.
|
|
16
|
+
browser-link install Register browser-link with Claude Code.
|
|
17
|
+
browser-link uninstall Remove the registration.
|
|
18
|
+
browser-link extension Show the path of the Chrome extension assets
|
|
19
|
+
and per-OS install instructions.
|
|
20
|
+
browser-link doctor Diagnose current setup (Claude Code, server, extension, map DB).
|
|
21
|
+
browser-link about Show the full explanation of what this is and how it works.
|
|
22
|
+
browser-link help This message.
|
|
23
|
+
|
|
24
|
+
Environment:
|
|
25
|
+
BROWSER_LINK_DATA_DIR Override the DB location (defaults per OS).
|
|
26
|
+
BROWSER_LINK_BIN Override the command stored in client configs
|
|
27
27
|
(e.g. "node /path/to/dist/index.js" for dev).`;
|
|
28
28
|
function parseClient(argv) {
|
|
29
29
|
const idx = argv.findIndex((a) => a === '--client');
|
package/dist/commands/about.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import type { Language } from './welcome.js';
|
|
2
2
|
interface AboutI18n {
|
|
3
3
|
title: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
whatTitle: string;
|
|
5
|
+
what: string;
|
|
6
|
+
howTitle: string;
|
|
7
|
+
how: string;
|
|
8
|
+
bindingTitle: string;
|
|
9
|
+
binding: string;
|
|
10
|
+
bridgeToolsTitle: string;
|
|
11
|
+
bridgeTools: string;
|
|
12
|
+
mapToolsTitle: string;
|
|
13
|
+
mapTools: string;
|
|
14
|
+
privacyTitle: string;
|
|
15
|
+
privacy: string;
|
|
16
|
+
helpTitle: string;
|
|
17
|
+
help: string;
|
|
17
18
|
}
|
|
18
19
|
export declare const I18N_ABOUT: Record<Language, AboutI18n>;
|
|
19
|
-
|
|
20
|
+
/** Interactive about screen — used from the setup menu. Falls back to the
|
|
21
|
+
* caller's prompt loop afterwards (no explicit "press any key"). */
|
|
20
22
|
export declare function runAbout(language?: Language): Promise<void>;
|
|
21
|
-
/**
|
|
23
|
+
/** Non-interactive about — `browser-link about`. Plain output, no prompts. */
|
|
22
24
|
export declare function printAbout(language?: Language): void;
|
|
23
25
|
export {};
|