Files
omarchy-pkgs/pkgbuilds/hermes-desktop/hermes-desktop.sh
T
Omabot a57f63914f Build Hermes Desktop from source instead of packaging the CLI
Install > AI is for GUI apps, so the package becomes the desktop shell and the
terminal agent moves to a lazy mise stub that omarchy installs itself.

Nous builds Hermes Desktop for macOS and Windows only -- their download page
offers a .dmg and an .exe and points Linux users at a terminal install -- so
there is no vendor binary to repackage the way grok-bot repackages xAI's deb.
Their electron-builder config does carry a Linux target though, untested by
upstream but working: npm ci at the workspace root, npm run pack in
apps/desktop, and electron-builder stages node-pty and get-windows for
linux-x64 on its own. 337 MB unpacked, 129 MB packaged.

The app is only a shell -- it runs `hermes serve` against a CLI it does not
ship, and clones its own unpinned copy into ~/.hermes when it finds none. So
/usr/bin/hermes-desktop makes sure the CLI is there before handing over, and
says so plainly rather than bootstrapping a second Hermes where Omarchy's
installer isn't around to do it properly.
2026-08-19 02:42:15 -07:00

20 lines
797 B
Bash

#!/bin/bash
# The desktop app is only a shell: it runs `hermes serve` against a Hermes CLI
# it does not ship. Finding none, it clones its own copy with the upstream
# install script -- an unpinned checkout in ~/.hermes that no package manages.
#
# So make sure the CLI is there first. Omarchy installs it with its own script;
# elsewhere, say so rather than letting the app quietly bootstrap a second
# Hermes behind the user's back.
if ! command -v hermes >/dev/null 2>&1; then
if command -v omarchy-install-hermes-cli >/dev/null 2>&1; then
omarchy-install-hermes-cli --now
else
echo "The Hermes CLI is not installed, so Hermes Desktop will install its" >&2
echo "own copy under ~/.hermes. Install the CLI first to avoid that." >&2
fi
fi
exec /opt/hermes-desktop/Hermes "$@"