A feature-rich terminal TUI for remotely managing Hermes Agent tmux sessions on cloud servers โ all from a single Docker container.
"I love watching Hermes Agent work through a TUI โ but mine runs on a remote cloud server, and my local network isn't always stable. When the connection drops mid-task, I have no idea if it's still running or already dead. An interrupted task means hours of wasted effort. Sure, I could manage it over raw tmux โ but that's just typing the same boilerplate commands over and over. More time lost."
Note: Hermes Gate is a companion tool for Hermes Agent (Website), an open-source AI agent framework by NousResearch.
Lifecycle clarification: Hermes Gate is a temporary local client. When you quit the TUI, the Docker container stops. Your remote tmux / Hermes Agent sessions on the server are not affected โ they keep running. Just run
./run.shagain to reconnect. Nothing is lost except the local container state.
Running Hermes Agent on a remote server usually means juggling SSH terminals, worrying about dropped connections, and manually managing tmux sessions. Hermes Gate solves all of that:
- Full TUI Experience โ Browse servers, manage sessions, view live Hermes Agent output, and send prompts, all from an interactive terminal UI built with Textual. No raw SSH commands to remember.
- Network Status Monitoring โ Real-time latency monitoring with TCP-level probing. Connection status is displayed in the TUI so you know when the remote server is reachable. Note: if your SSH session drops, you will need to re-enter the session manually.
- Session Persistence via tmux โ Sessions run inside remote tmux, so your remote processes keep running even if you close Hermes Gate. However, note that the Docker container stops on TUI exit โ run
./run.shagain to reattach. - Multi-Server, Multi-Session โ Switch between servers and sessions instantly. Each session is independently tracked and managed.
- One Command Start โ
./run.shbuilds, starts, and drops you into the TUI. Requires Docker and an SSH key in~/.ssh/(see Prerequisites).
- Interactive server selection with quick switching
- Remote tmux session create / connect / destroy
- Live remote Hermes Agent output viewing with prompt sending
- Network status monitoring (real-time latency display and connection status)
- Automatic hostname resolution (via
/etc/hosts) - SSH config alias support (use your
~/.ssh/confighost aliases) - Remote control keys:
Ctrl+Cinterrupt,Ctrl+Eescape (without leaving the TUI)
- Hermes Agent installed and running on the target server
- Docker
- SSH key in
~/.ssh/added to the target server'sauthorized_keys(any key type:id_rsa,id_ed25519, customIdentityFile, or SSH agent)
git clone https://github.com/LehaoLin/hermes-gate.git
cd hermes-gatemacOS / Linux:
./run.shWindows (PowerShell):
.\run.ps1The first run will automatically build the Docker image and launch the TUI. Make sure you have Docker running and your SSH key set up before starting.
macOS / Linux:
./run.sh # Start (skips build if already built)
./run.sh rebuild # Force rebuild then start
./run.sh update # git pull + rebuild + start
./run.sh stop # Stop and remove the container
./run.sh -h # Show helpMultiple terminals can run ./run.sh simultaneously โ each gets an independent TUI session. The container auto-stops when the last session exits.
Windows (PowerShell):
.\run.ps1 # Start (skips build if already built)
.\run.ps1 rebuild # Force rebuild then start
.\run.ps1 update # git pull + rebuild + start
.\run.ps1 stop # Stop and remove the container| Phase | Key | Action |
|---|---|---|
| Server Selection | โโ |
Switch server |
Enter |
Connect to selected server | |
D |
Delete selected server | |
Q |
Quit | |
| Session List | โโ |
Switch session |
Enter |
Enter session | |
N |
New session | |
K |
Kill session | |
R |
Refresh list | |
Ctrl+B |
Back to server selection | |
| Viewer | Type in input + Enter |
Send prompt to remote Hermes Agent |
Ctrl+B |
Back to session list |
Select "โ Add Server..." on the server selection screen. Input format:
username@ip_address e.g. [email protected]
username@hostname e.g. admin@myserver
username@hostname:port e.g. [email protected]:2222
Default port is 22. Non-standard ports must be specified explicitly.
The hermes_gate/ directory is mounted as a volume into the container. After modifying Python code, just restart the container โ no rebuild needed.
The following files require a rebuild (./run.sh rebuild) after changes:
pyproject.toml/requirements.txtDockerfile/entrypoint.sh
docker compose down # Stop and remove container
docker compose logs hermes-gate # View logs
docker exec -it hermes-gate bash # Enter container shellhermes-gate/
โโโ Dockerfile
โโโ docker-compose.yml
โโโ entrypoint.sh
โโโ run.sh
โโโ run.ps1
โโโ pyproject.toml
โโโ hermes_gate/
โโโ __main__.py # Entry point
โโโ app.py # TUI main interface
โโโ servers.py # Server management & hostname resolution
โโโ session.py # Remote tmux session management
โโโ network.py # Network status monitoring
MIT