claudelink-bridge 0.1.0 → 0.1.1
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 +182 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# claudelink-bridge
|
|
2
|
+
|
|
3
|
+
> Local bridge server that connects the [ClaudeLink Chrome extension](https://github.com/devops-monk/claude-link) to Claude Code CLI running on your machine.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/claudelink-bridge)
|
|
6
|
+
[](https://www.npmjs.com/package/claudelink-bridge)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](#)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## What is this?
|
|
13
|
+
|
|
14
|
+
ClaudeLink is a Chrome extension that lets you send browser content — screenshots, selected text, page context, form data — directly to **Claude Code CLI** without leaving your browser.
|
|
15
|
+
|
|
16
|
+
This package (`claudelink-bridge`) is the local server that makes it work. It:
|
|
17
|
+
|
|
18
|
+
- Runs a **WebSocket server on `localhost:9999`** that the extension connects to
|
|
19
|
+
- Receives prompts and context from the browser
|
|
20
|
+
- Passes them to your local `claude` CLI and streams the response back
|
|
21
|
+
- Can be installed as a **background service** that starts automatically on login
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Chrome Extension ←──WebSocket──→ claudelink-bridge ←──spawns──→ claude CLI
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Everything stays on your machine. No data is sent to any external server.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
- **Node.js** v18 or higher
|
|
34
|
+
- **Claude Code CLI** — [install here](https://docs.anthropic.com/en/docs/claude-code)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Check Node.js version
|
|
38
|
+
node --version
|
|
39
|
+
|
|
40
|
+
# Install Claude Code CLI
|
|
41
|
+
npm install -g @anthropic-ai/claude-code
|
|
42
|
+
|
|
43
|
+
# Log in (one time)
|
|
44
|
+
claude
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
### Recommended — install as a background service (runs automatically on login)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx claudelink-bridge setup
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This single command:
|
|
58
|
+
1. Checks that Node.js and Claude Code CLI are installed
|
|
59
|
+
2. Installs the bridge as a background service
|
|
60
|
+
3. Starts it immediately
|
|
61
|
+
|
|
62
|
+
| Platform | Method |
|
|
63
|
+
|----------|--------|
|
|
64
|
+
| **macOS** | launchd plist in `~/Library/LaunchAgents/` |
|
|
65
|
+
| **Linux** | systemd user service |
|
|
66
|
+
| **Windows** | Task Scheduler entry at login |
|
|
67
|
+
|
|
68
|
+
After setup, you never need to think about the bridge again — it starts automatically every time you log in.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### Manual — run in the foreground
|
|
73
|
+
|
|
74
|
+
If you prefer to start it manually:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx claudelink-bridge start
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Keep the terminal open while using the extension. Press `Ctrl+C` to stop.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Commands
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npx claudelink-bridge setup # Install as auto-start background service (run once)
|
|
88
|
+
npx claudelink-bridge start # Run manually in the foreground
|
|
89
|
+
npx claudelink-bridge status # Check if the service is running
|
|
90
|
+
npx claudelink-bridge stop # Stop the background service
|
|
91
|
+
npx claudelink-bridge kill # Force-kill whatever is on port 9999
|
|
92
|
+
npx claudelink-bridge uninstall # Remove the background service
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Configuration
|
|
98
|
+
|
|
99
|
+
### Custom port
|
|
100
|
+
|
|
101
|
+
By default the bridge listens on port `9999`. To use a different port:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
CLAUDELINK_PORT=9998 npx claudelink-bridge setup
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Then update the port in the extension: **Popup → Settings → Bridge port**.
|
|
108
|
+
|
|
109
|
+
### Logs (macOS / Linux)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# View bridge output
|
|
113
|
+
cat ~/.claudelink/bridge.log
|
|
114
|
+
|
|
115
|
+
# View errors
|
|
116
|
+
cat ~/.claudelink/bridge-error.log
|
|
117
|
+
|
|
118
|
+
# Follow live
|
|
119
|
+
tail -f ~/.claudelink/bridge.log
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Troubleshooting
|
|
125
|
+
|
|
126
|
+
**Status indicator is red ("Disconnected")**
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npx claudelink-bridge status
|
|
130
|
+
npx claudelink-bridge start # restart if stopped
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**`EADDRINUSE` — port already in use**
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npx claudelink-bridge kill # kill whatever is on the port
|
|
137
|
+
npx claudelink-bridge start # start fresh
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**"Failed to start claude" in the output panel**
|
|
141
|
+
|
|
142
|
+
Make sure Claude Code CLI is installed and logged in:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
npm install -g @anthropic-ai/claude-code
|
|
146
|
+
claude --version
|
|
147
|
+
claude # log in if prompted
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Bridge stops after system update (macOS/Linux)**
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npx claudelink-bridge setup # re-register the service
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Remove everything**
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npx claudelink-bridge uninstall
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Security
|
|
165
|
+
|
|
166
|
+
- The bridge only accepts WebSocket connections from `chrome-extension://` origins — no other apps or websites can connect to it
|
|
167
|
+
- All prompts and responses stay local — the bridge only communicates with your local `claude` binary
|
|
168
|
+
- No telemetry, no analytics, no external API calls
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Related
|
|
173
|
+
|
|
174
|
+
- [ClaudeLink Chrome Extension](https://github.com/devops-monk/claude-link) — the browser extension
|
|
175
|
+
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) — Anthropic's official CLI
|
|
176
|
+
- [DevOps-Monk](https://devops-monk.com) — more developer tools
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## License
|
|
181
|
+
|
|
182
|
+
MIT © [DevOps-Monk](https://devops-monk.com)
|