hermes-to-claude 0.1.12 → 0.2.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 +48 -3
- package/dist/hbridge.mjs +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Hermes-Claude
|
|
1
|
+
# Hermes-to-Claude (h2c)
|
|
2
2
|
|
|
3
3
|
**Hermes-Agent** controls multiple **Claude Code** instances via HTTP — one agent, many Claude workers. No Pro/Max subscription required.
|
|
4
4
|
|
|
@@ -33,11 +33,22 @@ h2c requires **Node.js ≥ 20**. Install it for your platform:
|
|
|
33
33
|
| macOS | `brew install node` |
|
|
34
34
|
| Windows | `winget install OpenJS.NodeJS` or download from https://nodejs.org |
|
|
35
35
|
|
|
36
|
-
###
|
|
36
|
+
### Installation
|
|
37
|
+
|
|
38
|
+
**For End User**, One command to install globally:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install -g hermes-to-claude
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This makes the `h2c` command available everywhere on your system.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
**For Developer**, For contributors who want to hack on h2c itself:
|
|
37
48
|
|
|
38
49
|
```bash
|
|
39
50
|
git clone https://github.com/xuhancn/hermes-to-claude.git
|
|
40
|
-
cd hermes-claude
|
|
51
|
+
cd hermes-to-claude
|
|
41
52
|
npm install && npm run build
|
|
42
53
|
```
|
|
43
54
|
|
|
@@ -120,6 +131,40 @@ curl -X POST http://<host>:<port>/v1/task/create \
|
|
|
120
131
|
| `cwd` | string | Working directory for the Claude session |
|
|
121
132
|
| `sessionId` | string | Reuse an existing Claude session |
|
|
122
133
|
|
|
134
|
+
### Connect Hermes-Agent
|
|
135
|
+
|
|
136
|
+
Give Hermes-Agent the port and key. Add to `~/.hermes/config.yaml`:
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
# Single h2c instance
|
|
140
|
+
h2c:
|
|
141
|
+
project: my-app
|
|
142
|
+
cwd: /path/to/project
|
|
143
|
+
host: <ip>
|
|
144
|
+
port: <port>
|
|
145
|
+
key: h2c_XXXXXXXX
|
|
146
|
+
|
|
147
|
+
# Multiple machines (10 h2c instances):
|
|
148
|
+
h2c_farm:
|
|
149
|
+
coding:
|
|
150
|
+
host: 192.168.27.88
|
|
151
|
+
port: 9761
|
|
152
|
+
key: h2c_XXXXXXXX
|
|
153
|
+
cwd: /home/xu/coding
|
|
154
|
+
testing:
|
|
155
|
+
host: 192.168.27.243
|
|
156
|
+
port: 9709
|
|
157
|
+
key: h2c_YYYYYYYY
|
|
158
|
+
cwd: /home/xu/testing
|
|
159
|
+
building:
|
|
160
|
+
host: 192.168.27.225
|
|
161
|
+
port: 9352
|
|
162
|
+
key: h2c_ZZZZZZZZ
|
|
163
|
+
cwd: /home/xu/building
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Hermes-Agent reads the config and dispatches tasks to the right machine based on project. See the API reference below.
|
|
167
|
+
|
|
123
168
|
### Health Check
|
|
124
169
|
|
|
125
170
|
Verify the server is reachable — no authentication required:
|
package/dist/hbridge.mjs
CHANGED
|
@@ -1582,7 +1582,7 @@ function stopStatusBar(intervalId) {
|
|
|
1582
1582
|
|
|
1583
1583
|
// src/hbridge/cli.mjs
|
|
1584
1584
|
import { networkInterfaces } from "os";
|
|
1585
|
-
var H2C_VERSION = "
|
|
1585
|
+
var H2C_VERSION = "v217.0.68e55c0";
|
|
1586
1586
|
var server = null;
|
|
1587
1587
|
var statusBarInterval = null;
|
|
1588
1588
|
function getLocalIPs() {
|
|
@@ -1597,6 +1597,7 @@ async function cmd_enable() {
|
|
|
1597
1597
|
console.log("h2c enabled");
|
|
1598
1598
|
console.log("\u{1F4C2} " + cwd);
|
|
1599
1599
|
console.log("\u{1F511} " + ip + ":" + port + " | " + key + " | " + H2C_VERSION);
|
|
1600
|
+
console.log("\n\u{1F449} Hermes-Agent \u2192 https://github.com/xuhancn/hermes-to-claude#3-for-hermes-agent");
|
|
1600
1601
|
server = createServer(key);
|
|
1601
1602
|
server.on("error", (err) => {
|
|
1602
1603
|
if (err.code === "EADDRINUSE") {
|
|
@@ -1639,6 +1640,7 @@ function cmd_status() {
|
|
|
1639
1640
|
console.log(running ? "h2c enabled" : "h2c stopped");
|
|
1640
1641
|
console.log("\u{1F4C2} " + cwd);
|
|
1641
1642
|
console.log("\u{1F511} " + ip + ":" + port + " | " + key + " | " + H2C_VERSION);
|
|
1643
|
+
console.log("\n\u{1F449} Hermes-Agent \u2192 https://github.com/xuhancn/hermes-to-claude#3-for-hermes-agent");
|
|
1642
1644
|
}
|
|
1643
1645
|
function showHelp() {
|
|
1644
1646
|
console.log(`
|