Tear down the mise Hermes CLI on Remove Hermes

Remove Hermes dropped the desktop package and its ~/.hermes runtime but
never touched the mise CLI, on the assumption the install-time handoff
had already removed it. A CLI the app never superseded -- an interrupted
install, or the terminal CLI from before the app existed -- was left
stranded on PATH after uninstall.

Add a --remove mode to omarchy-install-hermes-cli that performs the same
teardown the desktop takeover already does (mise rm -g + mise uninstall,
and the marked stub), and call it from omarchy-remove-ai-hermes. The tool
spec and ownership marker stay defined in one place, so the takeover and
teardown paths cannot drift. Scoped to what Omarchy owns: a Hermes the
user installed themselves is left alone.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Spencer BullandClaude committed 2026-09-01 22:51:03 -05:00
1 parent f7078b9136
commit 36d52254a7
4 files changed
+84 -2

No files matched your search

+20 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# omarchy:summary=Install the Hermes CLI as a mise-backed wrapper in ~/.local/bin
# omarchy:args=[--check|--now|--owns]
# omarchy:args=[--check|--now|--owns|--remove]
# omarchy:examples=omarchy install hermes cli | omarchy install hermes cli --now
# Hermes pins every one of its dependencies exactly and declares
@@ -112,6 +112,25 @@ if [[ $mode == "--owns" ]]; then
if ours; then exit 0; else exit 1; fi
fi
# --remove tears down a Hermes CLI this installer put in place -- the mise tool
# it installs and the stub it marks -- so Remove Hermes clears a CLI the app
# never superseded (an interrupted install, or the terminal CLI from before the
# app existed) rather than leaving it stranded on PATH. Scoped to what is ours:
# the tool spec is this installer's, and the stub goes only when it carries the
# marker, so a Hermes the user installed themselves is untouched. Idempotent --
# nothing installed means nothing to do -- and it is the same teardown the
# desktop takeover above performs, kept in one place so the two cannot drift.
if [[ $mode == "--remove" ]]; then
mise rm -g "$tool" >/dev/null 2>&1 || true
mise uninstall --all "$tool" >/dev/null 2>&1 || true
if ours; then
rm -f "$HOME/.local/bin/hermes"
fi
exit 0
fi
# --check lets callers tell a cold stub from a working one before they commit
# to a path that assumes Hermes is ready.
if [[ $mode == "--check" ]]; then