Back

Hermes Agent Tutorial 5: CLI and TUI — Terminal Interface Complete Guide

Master Hermes Agent's terminal interface: CLI entry points, TUI features, keybindings, slash commands, personalities system, and session management.

Tutorial Overview

Series index: Hermes Agent Tutorial Series

This tutorial covers Hermes Agent’s Terminal Interface — the CLI commands and TUI features for users who prefer terminal interaction.

Note: If you deployed Hermes via Messaging Gateway (Tutorial 4), this article provides terminal basics. If you’re here for terminal-only usage, this is your primary interface guide.

What you will learn

  • ✅ CLI entry points and their purposes
  • ✅ TUI features: multiline editing, autocomplete, history
  • ✅ Key slash commands and their usage
  • ✅ Personalities system for different contexts
  • ✅ Session management and persistence

CLI Entry Points

Main commands

Hermes provides several CLI commands for different purposes:

Command Purpose Usage
hermes Interactive TUI Start conversation
hermes gateway Messaging gateway Deploy to platforms
hermes model Model management Switch providers
hermes setup Configuration wizard Initial setup
hermes config Settings management View/edit config
hermes skills Skills management List/create skills
hermes memory Memory management View/export memory
hermes doctor Diagnostics Troubleshoot issues

Command flow

flowchart TD
    A[hermes] --> B[Interactive TUI]
    C[hermes gateway] --> D[Platform daemon]
    E[hermes model] --> F[Provider switch]
    G[hermes setup] --> H[Config wizard]
    I[hermes doctor] --> J[Health check]

    style B fill:#e1f5ff
    style D fill:#fff3e0

TUI Features

Terminal User Interface

When you run hermes, you get a full TUI with:

flowchart LR
    subgraph TUI
        A[Header: Model + Usage]
        B[Conversation area]
        C[Input box]
        D[Status line]
    end

    style A fill:#e8f5e9
    style B fill:#e1f5ff

Multiline editing

Press Ctrl+J or Alt+Enter to create newlines in your message:

You: I need to create a function that:
1. Validates input
2. Processes data
3. Returns result

[Ctrl+J for new line]

Autocomplete

Hermes provides autocomplete for:

  • Slash commands: Type / and press Tab
  • Model names: /model + Tab
  • Skills: /skill + Tab

History navigation

  • Ctrl+P / Ctrl+N: Previous/Next message
  • Ctrl+R: Search history
  • / : Arrow keys also work

Interrupt handling

  • Ctrl+C: Interrupt current response
  • Send new message: Redirects agent mid-task
  • /stop: Graceful stop command

Key Commands

Essential slash commands

Command Purpose Example
/new Fresh conversation /new
/reset Clear context /reset
/model View/change model /model openrouter:claude-3
/retry Regenerate last response /retry
/undo Undo last turn /undo
/compress Compress context /compress
/usage Show token usage /usage
/insights Session analytics /insights --days 7
/skills Browse skills /skills
/stop Interrupt work /stop
/exit Exit Hermes /exit

Model switching

/model                          # View current model
/model openrouter:auto          # Switch to auto-select
/model anthropic:claude-4       # Switch to Claude 4
/model openai:gpt-4o            # Switch to GPT-4o

Memory commands

/memory show                    # View user profile
/memory list                    # List insights
/memory search "api design"     # Search past sessions

Context management

/compress                       # Compress long context
/usage                          # Show current usage
/reset                          # Full context reset

Personalities System

What are personalities?

Personalities are preset configurations for different contexts:

flowchart TD
    A[Base Hermes] --> B[Developer]
    A --> C[Researcher]
    A --> D[Writer]
    A --> E[Assistant]

    style A fill:#e1f5ff

Available personalities

Personality Focus Ideal for
developer Code, debugging Programming tasks
researcher Analysis, synthesis Literature review
writer Drafts, editing Content creation
assistant General help Everyday tasks

Switch personalities

/personality developer
/personality researcher
/personality default

Create custom personality

# Create personality file
nano ~/.hermes/personalities/my-work.md

Format:

---
name: my-work
description: Work-focused assistant
---

## Style
- Professional tone
- Bullet-point summaries
- Action-oriented recommendations

## Preferences
- Focus on actionable output
- Minimize explanation unless asked

Activate:

/personality my-work

Session Management

Session persistence

Hermes automatically saves sessions to:

~/.hermes/sessions/
├── 2026-04-13-001.json
├── 2026-04-13-002.json
└── ...

Session commands

Command Purpose
/new Start new session
/resume SESSION Resume past session
/sessions List sessions

Resume a session

/sessions                      # List recent sessions
/resume 2026-04-12-003         # Resume specific session

Find past conversations:

/search "authentication bug"
/search --from 2026-04-01 --to 2026-04-10

Platform-Specific Status

For CLI users

/status                        # Show daemon status
/platforms                     # Show connected platforms

Set home platform (for gateway users)

/sethome telegram              # Telegram as primary
/sethome cli                   # CLI as primary

Configuration

View configuration

hermes config show

Set values

hermes config set model.default "openrouter:auto"
hermes config set memory.nudges.enabled true
hermes config set transcription.provider whisper

Edit config file

nano ~/.hermes/config.yaml

Example config:

model:
  default: openrouter:auto
  fallback: openrouter:claude-3-haiku

memory:
  nudges:
    enabled: true
    interval: 10  # turns

gateway:
  telegram:
    enabled: true
    token: "YOUR_TOKEN"

transcription:
  provider: whisper

Troubleshooting

TUI not starting

Cause: Terminal compatibility issue.

Fix:

# Check terminal type
echo $TERM

# Force basic mode
hermes --mode simple

Commands not working

Cause: Slash command syntax wrong.

Fix: Commands start with / and no arguments need quotes:

/model openrouter:auto    # Correct
/model "openrouter:auto"  # Incorrect

Session not persisting

Cause: Session saving disabled.

Fix:

hermes config set sessions.save true

Summary

CLI/TUI is Hermes’s native interface:

  1. Multiple entry pointshermes, hermes gateway, hermes model
  2. Rich TUI — Multiline, autocomplete, history
  3. Slash commands/model, /memory, /skills
  4. Personalities — Context-specific presets
  5. Session management — Auto-save, resume, search

Key takeaways

  • hermes starts interactive TUI
  • ✅ Tab completes commands and models
  • /model switches providers instantly
  • ✅ Personalities customize behavior
  • ✅ Sessions auto-persist and searchable

Series navigation:


Decision Note: You now have two deployment options mastered. Messaging Gateway (Tutorial 4) and CLI/TUI (this article). Tutorial 6 applies to both — multi-model configuration enhances whichever interface you use.