claude-bridge-cli 2.0.12 → 2.0.18
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 +74 -74
- package/bin/cli.js +391 -391
- package/lib/bridge.js +1147 -1037
- package/lib/relay-client.js +152 -152
- package/package.json +34 -26
package/README.md
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
# claude-bridge-cli
|
|
2
|
-
|
|
3
|
-
Use Claude Code from your browser. Runs a local server that connects your browser tools to the Claude CLI on your machine.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g claude-bridge-cli
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Requires Node.js 18+ and [Claude Code CLI](https://www.npmjs.com/package/@anthropic-ai/claude-code) installed.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
### Local mode (same machine)
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
claude-bridge-cli start --port 8091
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Starts an HTTP server on `127.0.0.1:8091` wrapping `claude -p`. Send prompts via `POST /ask`.
|
|
22
|
-
|
|
23
|
-
### Relay mode (remote access)
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
claude-bridge-cli start \
|
|
27
|
-
--relay-url wss://your-relay-server.example.com/agent/ws \
|
|
28
|
-
--machine my-laptop \
|
|
29
|
-
--token <your-machine-bearer>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Connect to Claude on this machine from another device (requires a relay server).
|
|
33
|
-
|
|
34
|
-
### Auto-start on boot
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
claude-bridge-cli install-service --relay-url ... --machine ... --token ...
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Registers as a system service (Windows Scheduled Task / macOS LaunchAgent / Linux systemd user unit).
|
|
41
|
-
|
|
42
|
-
## API
|
|
43
|
-
|
|
44
|
-
| Endpoint | Method | Description |
|
|
45
|
-
|---|---|---|
|
|
46
|
-
| `/health` | GET | Health check |
|
|
47
|
-
| `/ask` | POST | Send a prompt to Claude |
|
|
48
|
-
| `/sessions` | GET | List all sessions |
|
|
49
|
-
| `/sessions/:id/messages` | GET | Get session messages |
|
|
50
|
-
| `/sessions/:id/stop` | POST | Stop a running session |
|
|
51
|
-
| `/sessions/:id/star` | POST | Toggle star on a session |
|
|
52
|
-
| `/sessions/:id/marks` | GET/PATCH | Per-message marks |
|
|
53
|
-
| `/sessions/:id/title` | PATCH | Rename a session |
|
|
54
|
-
| `/chatgpt-bindings` | GET/POST | Conversation bindings |
|
|
55
|
-
|
|
56
|
-
## Configuration
|
|
57
|
-
|
|
58
|
-
All options can be set via CLI flags or environment variables:
|
|
59
|
-
|
|
60
|
-
| Flag | Env var | Default |
|
|
61
|
-
|---|---|---|
|
|
62
|
-
| `--port` | `BRIDGE_PORT` | 8091 |
|
|
63
|
-
| `--host` | `BRIDGE_HOST` | 127.0.0.1 |
|
|
64
|
-
| `--cwd` | `BRIDGE_CWD` | Current directory |
|
|
65
|
-
| `--timeout` | `BRIDGE_TIMEOUT` | 7200 (seconds) |
|
|
66
|
-
| `--relay-url` | `BRIDGE_RELAY_URL` | — |
|
|
67
|
-
| `--machine` | `BRIDGE_MACHINE_NAME` | — |
|
|
68
|
-
| `--token` | `BRIDGE_MACHINE_TOKEN` | — |
|
|
69
|
-
| `--cf-id` | `BRIDGE_CF_ID` | — |
|
|
70
|
-
| `--cf-secret` | `BRIDGE_CF_SECRET` | — |
|
|
71
|
-
|
|
72
|
-
## License
|
|
73
|
-
|
|
74
|
-
MIT
|
|
1
|
+
# claude-bridge-cli
|
|
2
|
+
|
|
3
|
+
Use Claude Code from your browser. Runs a local server that connects your browser tools to the Claude CLI on your machine.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g claude-bridge-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Node.js 18+ and [Claude Code CLI](https://www.npmjs.com/package/@anthropic-ai/claude-code) installed.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Local mode (same machine)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
claude-bridge-cli start --port 8091
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Starts an HTTP server on `127.0.0.1:8091` wrapping `claude -p`. Send prompts via `POST /ask`.
|
|
22
|
+
|
|
23
|
+
### Relay mode (remote access)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
claude-bridge-cli start \
|
|
27
|
+
--relay-url wss://your-relay-server.example.com/agent/ws \
|
|
28
|
+
--machine my-laptop \
|
|
29
|
+
--token <your-machine-bearer>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Connect to Claude on this machine from another device (requires a relay server).
|
|
33
|
+
|
|
34
|
+
### Auto-start on boot
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
claude-bridge-cli install-service --relay-url ... --machine ... --token ...
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Registers as a system service (Windows Scheduled Task / macOS LaunchAgent / Linux systemd user unit).
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
| Endpoint | Method | Description |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `/health` | GET | Health check |
|
|
47
|
+
| `/ask` | POST | Send a prompt to Claude |
|
|
48
|
+
| `/sessions` | GET | List all sessions |
|
|
49
|
+
| `/sessions/:id/messages` | GET | Get session messages |
|
|
50
|
+
| `/sessions/:id/stop` | POST | Stop a running session |
|
|
51
|
+
| `/sessions/:id/star` | POST | Toggle star on a session |
|
|
52
|
+
| `/sessions/:id/marks` | GET/PATCH | Per-message marks |
|
|
53
|
+
| `/sessions/:id/title` | PATCH | Rename a session |
|
|
54
|
+
| `/chatgpt-bindings` | GET/POST | Conversation bindings |
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
All options can be set via CLI flags or environment variables:
|
|
59
|
+
|
|
60
|
+
| Flag | Env var | Default |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `--port` | `BRIDGE_PORT` | 8091 |
|
|
63
|
+
| `--host` | `BRIDGE_HOST` | 127.0.0.1 |
|
|
64
|
+
| `--cwd` | `BRIDGE_CWD` | Current directory |
|
|
65
|
+
| `--timeout` | `BRIDGE_TIMEOUT` | 7200 (seconds) |
|
|
66
|
+
| `--relay-url` | `BRIDGE_RELAY_URL` | — |
|
|
67
|
+
| `--machine` | `BRIDGE_MACHINE_NAME` | — |
|
|
68
|
+
| `--token` | `BRIDGE_MACHINE_TOKEN` | — |
|
|
69
|
+
| `--cf-id` | `BRIDGE_CF_ID` | — |
|
|
70
|
+
| `--cf-secret` | `BRIDGE_CF_SECRET` | — |
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT
|