$ show dodo-reach/hermes-desktop
Hermes Desktop is a native macOS desktop application that serves as a companion for the Hermes AI agent framework. It provides a rich GUI for managing remote Hermes instances over SSH or local connections, including session browsing (chat transcripts), a full terminal emulator (via the vendored SwiftTerm library), Kanban board management, cron job scheduling, file editing, skill browsing, usage analytics, and workflow presets. The architecture is a monolithic SwiftUI + AppKit app with a service layer that communicates with the remote host by generating and executing Python scripts over SSH, parsing JSON responses. The app is designed to be a direct client without any intermediate backend, treating the remote Hermes host as the sole source of truth. It includes a custom design system (HermesUI), localization support (en, zh-Hans, ru), and comprehensive test coverage. While the codebase is well-structured and demonstrates strong SwiftUI and macOS development practices, it has some monolithic views and relies on fragile embedded Python scripts for remote operations.
The LLM identified 4 files worth highlighting for reuse:
Provides a clean abstraction over local and remote process execution via SSH. Defines the `SSHProcessRunning` protocol for testability, allowing mock implementations. Handles SSH master socket management, control path fallback, and shell argument construction. This component can be extracted and reused in any Swift project requiring SSH command execution with a testable interface.
Implements a reusable pattern for executing Python scripts on a remote host via SSH. Encodes a JSON payload and Python body into a self-contained script, executes it, and decodes the JSON response. Used extensively across all remote services (sessions, kanban, cron, skills, usage). The pattern is generic and could be extracted for any project needing remote script execution with structured data exchange.
A collection of custom SwiftUI components forming a cohesive design system: panels (HermesSurfacePanel, HermesInsetSurface), badges, search fields, loading states, validation messages, collapsible split views, and more. These components are self-contained, use consistent theming (HermesTheme), and can be extracted as a standalone SwiftUI component library for macOS apps.
An actor-based structured logging utility for workflow launches. Uses Swift concurrency (`actor`) to ensure thread-safe logging of launch events, errors, and diagnostics. Demonstrates a clean pattern for centralized, structured logging that can be reused in any Swift project requiring audit trails or diagnostic output.