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.
This commit is contained in:
Omabot committed 2026-08-19 02:42:15 -07:00
1 parent ee051b4f8e
commit a57f63914f
7 files changed
+135 -122

No files matched your search

@@ -0,0 +1,4 @@
{
"source": "local",
"release_ring": "fast"
}
+112
View File
@@ -0,0 +1,112 @@
# Maintainer: David Heinemeier Hansson <david@hey.com>
# Nous builds Hermes Desktop for macOS and Windows only -- their download page
# offers a .dmg and an .exe and tells Linux users to install from a terminal --
# so there is no vendor binary to repackage. Their electron-builder config does
# carry a Linux target, though, and it works; this builds it.
#
# The app is only a shell: it runs `hermes serve` against a Hermes CLI it does
# not ship, and clones its own copy with the upstream install script when it
# finds none. /usr/bin/hermes-desktop heads that off. See hermes-desktop.sh.
pkgname=hermes-desktop
pkgver=2026.8.18
pkgrel=1
pkgdesc='Native desktop shell for Hermes Agent'
arch=('x86_64')
url='https://github.com/NousResearch/hermes-agent'
license=('MIT')
depends=(
'alsa-lib'
'at-spi2-core'
'cairo'
'dbus'
'expat'
'gcc-libs'
'gdk-pixbuf2'
'glib2'
'glibc'
'gtk3'
'hicolor-icon-theme'
'libcups'
'libdrm'
'libglvnd'
'libnotify'
'libx11'
'libxcb'
'libxcomposite'
'libxdamage'
'libxext'
'libxfixes'
'libxkbcommon'
'libxrandr'
'mesa'
'nspr'
'nss'
'pango'
'systemd-libs'
'xdg-utils'
)
optdepends=('omarchy: installs the Hermes CLI the app needs on first launch')
# The build runs the repo's own npm workspace install, which fetches Electron
# and rebuilds node-pty against it.
makedepends=('git' 'imagemagick' 'nodejs' 'npm' 'python')
# Electron bundles prebuilt binaries that stripping corrupts.
options=('!strip' '!debug')
_srcdir="hermes-agent-${pkgver}"
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
'hermes-desktop.sh'
'hermes-desktop.desktop'
'hermes-desktop.png')
sha256sums=('1e3d39d3638ec15fa9d31af262568a953e9272090deb1c50c44cd401175f5b80'
'716978c836ad46aa4ad173366d3a5d322c174fadf2f8095e6ce81301e1cad048'
'a71e5b3599515b97ea694d51771edede69107a221f301f91c088a5d81de7a8c0'
'd60d164e24fdcf6532133b8ea43c77a201e4b9e9dbc396187b58d51d8590ef52')
build() {
cd "${srcdir}/${_srcdir}"
# The desktop workspace resolves against the repo root, so the install has to
# happen there rather than in apps/desktop.
npm ci
cd apps/desktop
npm run pack
}
package() {
cd "${srcdir}/${_srcdir}/apps/desktop/release/linux-unpacked"
install -dm755 "${pkgdir}/opt/${pkgname}"
cp -a . "${pkgdir}/opt/${pkgname}/"
install -Dm755 "${srcdir}/hermes-desktop.sh" "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 "${srcdir}/hermes-desktop.desktop" \
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -Dm644 "${srcdir}/hermes-desktop.png" \
"${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/${pkgname}.png"
local size
for size in 512 256 128 64 48; do
magick "${srcdir}/hermes-desktop.png" -resize "${size}x${size}" "${srcdir}/icon-${size}.png"
install -Dm644 "${srcdir}/icon-${size}.png" \
"${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.png"
done
install -Dm644 "${pkgdir}/opt/${pkgname}/LICENSE.electron.txt" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.electron.txt"
# Chromium's setuid sandbox is only needed where unprivileged user namespaces
# are unavailable; where they work, setuid root is the worse of the two.
if ! { [[ -L /proc/self/ns/user ]] && unshare --user true; }; then
chmod 4755 "${pkgdir}/opt/${pkgname}/chrome-sandbox"
else
chmod 0755 "${pkgdir}/opt/${pkgname}/chrome-sandbox"
fi
}
@@ -0,0 +1,13 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Hermes
GenericName=AI Agent
Comment=The self-improving AI agent that grows with you
Exec=hermes-desktop %U
Icon=hermes-desktop
Terminal=false
Categories=Development;
Keywords=ai;agent;assistant;hermes;nous;
StartupNotify=true
StartupWMClass=Hermes
Binary file not shown.

After

Width:  |  Height:  |  Size: 561 KiB

@@ -0,0 +1,19 @@
#!/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 "$@"