@bulolo/hermes-link 0.1.0 → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 bulolo
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 ADDED
@@ -0,0 +1,109 @@
1
+ # @bulolo/hermes-link
2
+
3
+ Local companion service and CLI for connecting [Hermes Agent](https://github.com/nousresearch/hermes-agent) to your devices through zhiji.
4
+
5
+ ## Requirements
6
+
7
+ - Node.js >= 20
8
+ - A running [Hermes Agent](https://github.com/nousresearch/hermes-agent) installation
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install -g @bulolo/hermes-link
14
+ ```
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ # Start the background daemon
20
+ hermeslink start
21
+
22
+ # Check status
23
+ hermeslink status
24
+
25
+ # View logs
26
+ hermeslink logs
27
+ ```
28
+
29
+ ## Commands
30
+
31
+ | Command | Description |
32
+ |---------|-------------|
33
+ | `hermeslink start` | Start the background daemon |
34
+ | `hermeslink stop` | Stop the daemon |
35
+ | `hermeslink restart` | Restart the daemon |
36
+ | `hermeslink status` | Show daemon and service status |
37
+ | `hermeslink pair` | Generate a pairing URL for your device |
38
+ | `hermeslink config get` | Show current configuration |
39
+ | `hermeslink config set <key> <value>` | Set a configuration value |
40
+ | `hermeslink autostart` | Show autostart status |
41
+ | `hermeslink autostart enable` | Enable autostart on login |
42
+ | `hermeslink autostart disable` | Disable autostart |
43
+ | `hermeslink logs` | Show recent log entries |
44
+ | `hermeslink logs --gateway` | Show Hermes gateway logs |
45
+ | `hermeslink version` | Print version |
46
+
47
+ ## Configuration
48
+
49
+ ```bash
50
+ hermeslink config set port 52379 # Change listen port
51
+ hermeslink config set lan-host 192.168.1.10 # Set LAN IP manually
52
+ hermeslink config set language zh-CN # Set language (auto/en/zh-CN)
53
+ hermeslink config set log-level debug # Set log level (debug/info/warn/error)
54
+ ```
55
+
56
+ Config is stored at `~/.hermeslink/config.json`.
57
+
58
+ ## How It Works
59
+
60
+ ```
61
+ Hermes App (mobile)
62
+
63
+
64
+ hermes-relay.catwiki.ai ──────────────────┐
65
+ │ WebSocket tunnel
66
+ hermeslink (this service)
67
+
68
+
69
+ Hermes Agent (local)
70
+ localhost:8642
71
+ ```
72
+
73
+ `hermeslink` runs a local HTTP server (default port `52379`) and maintains a persistent WebSocket connection to the relay server. The mobile app connects through the relay and proxies requests to your local Hermes Agent.
74
+
75
+ ## Runtime Files
76
+
77
+ All runtime files are stored in `~/.hermeslink/`:
78
+
79
+ | Path | Description |
80
+ |------|-------------|
81
+ | `config.json` | User configuration |
82
+ | `identity.json` | Device identity (ed25519 keypair) |
83
+ | `link.db` | SQLite database (stats, usage) |
84
+ | `logs/` | Log files |
85
+ | `daemon.pid` | Daemon PID file |
86
+
87
+ ## Environment Variables
88
+
89
+ | Variable | Description |
90
+ |----------|-------------|
91
+ | `HERMESLINK_HOME` | Override runtime directory (default `~/.hermeslink`) |
92
+ | `HERMESLINK_LOG_LEVEL` | Override log level |
93
+ | `HERMESLINK_LANG` | Override language |
94
+ | `HERMES_BIN` | Path to `hermes` binary (default: `hermes`) |
95
+
96
+ ## Autostart
97
+
98
+ On macOS, autostart is managed via launchd (`~/Library/LaunchAgents/com.hermes.link.plist`).
99
+ On Linux, via systemd user service or XDG autostart.
100
+ On Windows, via the Startup folder.
101
+
102
+ ```bash
103
+ hermeslink autostart enable
104
+ hermeslink autostart disable
105
+ ```
106
+
107
+ ## License
108
+
109
+ MIT