hermium 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.
Files changed (2) hide show
  1. package/bin/hermium.mjs +28 -1
  2. package/package.json +1 -1
package/bin/hermium.mjs CHANGED
@@ -7,6 +7,32 @@ import { homedir } from 'os'
7
7
  import pc from 'picocolors'
8
8
 
9
9
  const __dirname = dirname(fileURLToPath(import.meta.url))
10
+
11
+ // ─── Runtime detection ─────────────────────────────────────────────────────
12
+
13
+ function detectRuntime() {
14
+ // Check if bun is available on PATH
15
+ try {
16
+ execSync('bun --version', { stdio: 'ignore' })
17
+ return { cmd: 'bun', found: true }
18
+ } catch {
19
+ // fall back to current process
20
+ const exe = process.execPath
21
+ const isBun = exe.includes('bun') || (process.versions && process.versions.bun)
22
+ return { cmd: exe, found: !!isBun }
23
+ }
24
+ }
25
+
26
+ function getRuntimeCmd() {
27
+ const rt = detectRuntime()
28
+ if (!rt.found) {
29
+ console.log(pc.red(' ✗ Bun is required to run Hermium.'))
30
+ console.log(' Install: curl -fsSL https://bun.sh/install | bash')
31
+ console.log(' Or: npm install -g bun')
32
+ process.exit(1)
33
+ }
34
+ return rt.cmd
35
+ }
10
36
  const pkgDir = resolve(__dirname, '..')
11
37
  const serverEntry = resolve(pkgDir, 'dist', 'server', 'index.mjs')
12
38
  const WEB_UI_HOME = resolve(homedir(), '.hermium')
@@ -127,8 +153,9 @@ function cmdStart() {
127
153
  }
128
154
  } catch {}
129
155
 
156
+ const runtime = getRuntimeCmd()
130
157
  const logFd = openSync(LOG_FILE, 'a')
131
- const child = spawn(process.execPath, [serverEntry], {
158
+ const child = spawn(runtime, [serverEntry], {
132
159
  detached: true,
133
160
  stdio: ['ignore', logFd, logFd],
134
161
  env: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermium",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Hermium CLI — self-hosted AI chat dashboard for Hermes Agent",
5
5
  "repository": {
6
6
  "type": "git",