Files
omarchy/bin/omarchy-agent-hermes
T
Spencer BullandCodex XHigh 288e387a22 Preserve Hermes session workspace metadata
Keep the one-shot session on Hermes' native CLI source so it records the launch directory before the exact session is resumed in the TUI.

Co-Authored-By: Codex XHigh <noreply@openai.com>
2026-08-27 22:50:28 -05:00

22 lines
625 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Seed Hermes literally and resume the resulting interactive session
# omarchy:args=<prompt>
# omarchy:hidden=true
set -euo pipefail
prompt=${1:?usage: omarchy-agent-hermes <prompt>}
usage=$(mktemp)
trap 'rm -f "$usage"' EXIT
# TUI startup queries pass through Hermes' slash, shell, and interpolation
# dispatcher. One-shot treats the prompt literally and records its session ID.
hermes --yolo --usage-file "$usage" --oneshot "$prompt"
session_id=$(jq -er '.session_id | strings | select(length > 0)' "$usage")
rm -f "$usage"
trap - EXIT
exec hermes chat --yolo --tui --resume "$session_id"