📑 Table of contents

Mastering the Hermes Agent CLI

Hermes Agent 🟢 Beginner ⏱️ 12 min read 📅 2026-05-05

Mastering the Hermes Agent CLI — Complete Terminal Guide

If you have followed the previous articles in this series, you have installed Hermes Agent (introduction and installation), configured your models and providers (dedicated guide), and discovered the available tools (the 68 tools). Now it is time to get practical: mastering the Hermes Agent CLI, your primary interface for daily interaction with the agent.

This guide covers the entire Hermes terminal: the two available interfaces, slash commands, keyboard shortcuts, session management, command-line configuration, personalities, and concrete workflows that will save you considerable time.

Two interfaces, one agent

Hermes Agent offers two command-line interfaces:

Classic interface (hermes)

hermes

This is the default interface, built on prompt_toolkit. It offers autocomplete, multi-line editing and clear display in your terminal. Fast, lightweight and proven.

Modern TUI interface (hermes --tui)

hermes --tui

The TUI (Terminal User Interface) adds modal overlays, mouse selection and non-blocking input. Both interfaces share the same sessions, slash commands and configuration — you can switch between them seamlessly.

My advice: start with the classic interface to get familiar, then switch to the TUI once slash commands feel natural.

Advanced launch

The CLI is not just for interactive sessions. Here are the most useful patterns:

# Standard interactive session
hermes

# Single query (non-interactive)
hermes chat -q "Explain the difference between TCP and UDP"

# With a specific model
hermes chat --model "anthropic/claude-sonnet-4"

# With a specific provider
hermes chat --provider openrouter

# With specific toolsets
hermes chat --toolsets "web,terminal,skills"

# Preload skills at launch
hermes -s hermes-agent-dev,github-auth
hermes chat -s github-pr-workflow -q "Open a draft PR"

# Verbose mode (debug)
hermes chat --verbose

Each flag lets you precisely control the agent behavior without modifying your permanent configuration. Ideal for one-off tests or automated scripts.

Slash commands — your control panel

Slash commands are the heart of CLI interaction with Hermes. Type / to see the autocomplete list. Here are the essential commands, organized by usage.

  • /help — Shows all available commands. First reflex when you don't know what to type.
  • /tools — Lists currently available tools in the session. Useful for verifying a tool is active before asking the agent to use it.
  • /model — Shows or changes the current model mid-session, without leaving the conversation.
  • /skills browse — Browse the skills hub and official optional skills.

Session management

  • /save — Manually saves the current conversation.
  • /new — Starts a new conversation while staying in the CLI.
  • /title My Session — Names the current session for easy retrieval in history.

Advanced productivity

  • /voice on — Enables voice mode. Press Ctrl+B to record a voice message.
  • /voice tts — Toggles spoken playback for Hermes replies.
  • /memory — Accesses the agent memory (persistent context between sessions).
  • /background <prompt> — Launches a task in a background session in isolation, immediately freeing the prompt to continue working.
  • /reasoning high — Increases the model reasoning effort.
  • /busy queue / /busy steer / /busy interrupt — Changes input behavior when the agent is working.

Note: commands are case-insensitive. /HELP works the same as /help. Installed skills also automatically become slash commands.

Essential keyboard shortcuts

CLI mastery comes through shortcuts. Here are the ones you must know:

Editing shortcuts:
- Enter — Send message
- Alt+Enter or Ctrl+J — New line (multi-line input)
- Ctrl+G — Opens external editor ($EDITOR) for drafting long prompts
- Ctrl+X Ctrl+E — Emacs-style alternative for external editor
- Tab — Accept auto-suggestion or autocomplete slash commands
- Ctrl+V — Paste text (and opportunistically attach clipboard images)
- Alt+V — Paste an image from clipboard

Agent control:
- Ctrl+C — Interrupt current operation (double-press within 2 seconds to force exit)
- Ctrl+D — Exit Hermes
- Ctrl+Z — Suspend Hermes to background (Unix). Type fg to resume.

Multi-line input

Two methods for writing multi-line prompts:

  1. Alt+Enter or Ctrl+J — Manually inserts a line break
  2. Backslash continuation — End a line with \ to continue:
❯ Write a function that:
\ 1. Takes a list of numbers
\ 2. Returns the sum

Tip: when you paste a multi-line block, the CLI shows a compact preview instead of polluting the scrollback. The sent content remains complete.

Opening an external editor

For complex long prompts, Ctrl+G opens vim, nano, VS Code or any editor configured in $EDITOR. Save and quit — the content is sent as the next prompt. Perfect for technical specs or drafted requests.

Interrupting and redirecting the agent

One of the major strengths of the Hermes CLI: you are never blocked.

Three interruption modes:

  1. interrupt (default) — Type a message while the agent is working. It gets interrupted and your new message is processed immediately.
  2. queue — Your message is queued and sent on the next turn. Useful for preparing instructions without canceling in-flight work.
  3. steer — Your message is injected via /steer, arriving after the next tool call — no interrupt, no new turn. Perfect for "by the way, also check the tests" while the agent is editing code.

Configure the default mode:

# ~/.hermes/config.yaml
display:
  busy_input_mode: "steer"  # or "queue" or "interrupt"

Or change mid-session: /busy steer, /busy queue, /busy interrupt.

For running terminal commands: they are killed immediately (SIGTERM, then SIGKILL after 1 second).

Session recovery and management

Resuming a session

When you exit a session, Hermes displays a resume command:

Resume this session with: hermes --resume 20260225_143052_a1b2c3
Session: 20260225_143052_a1b2c3
Duration: 12m 34s
Messages: 28 (5 user, 18 tool calls)

Resume options:

hermes --continue          # Resume most recent session
hermes -c                  # Short form
hermes -c "my project"     # Resume a named session
hermes --resume 20260225_143052_a1b2c3  # Resume by ID
hermes --resume "refactoring auth"       # Resume by title
hermes -r 20260225_143052_a1b2c3        # Short form

Resuming restores the full conversation history from SQLite: messages, tool calls and responses. The agent sees everything, as if you never left.

Session history

hermes sessions list

This command displays all past sessions with their ID, title, duration and message count. Use /title Session Name mid-session or hermes sessions rename <id> <name> to organize your history.

Automatic context compression

Long conversations are automatically summarized when approaching the context limit:

# ~/.hermes/config.yaml
compression:
  enabled: true
  threshold: 0.50  # Compress at 50% of limit

auxiliary:
  compression:
    model: "google/gemini-3-flash-preview"

When compression triggers, middle turns are summarized while the first 3 and last 20 turns are always preserved.

CLI management commands

Changing models

hermes model

Launches an interactive assistant to choose your provider and model. You can switch at any time — no lock-in.

Diagnosing issues

hermes doctor

Scans your configuration, checks tokens, permissions and dependencies. First reflex when something doesn't work.

Updating

hermes update

Updates Hermes Agent to the latest version.

CLI configuration

# Set a config value
hermes config set model anthropic/claude-opus-4
hermes config set terminal.backend docker
hermes config set OPENROUTER_API_KEY sk-or-...

# Show current configuration
hermes config show

Hermes intelligently separates secrets from normal settings. Tokens go to .env, everything else to config.yaml.

Quick Commands — your custom shortcuts

Define custom commands that execute shell commands instantly without invoking the LLM:

# ~/.hermes/config.yaml
quick_commands:
  status:
    type: exec
    command: systemctl status hermes-agent
  gpu:
    type: exec
    command: nvidia-smi --query-gpu=utilization.gpu,memory.used --format=csv,noheader

Type /status or /gpu in any chat. Powerful for repetitive tasks.

Personalities — changing the agent tone

Personalities modify the agent behavior and style:

/personality helpful      # Classic help
/personality concise      # Short, direct responses
/personality technical    # Technical expert style
/personality creative     # Creative and inspired
/personality teacher      # Pedagogical
/personality kawaii       # Cute style
/personality pirate       # "Arr, matey!"
/personality shakespeare  # Shakespearean style

You can also create custom personalities in config.yaml:

personalities:
  senior_dev: "You are a senior developer. Be direct and precise."

Background sessions

Launch long tasks without blocking your main session:

/background Analyze the logs in /var/log and summarize today's errors

Each /background task creates a completely isolated agent session with the same configuration as your main session. Results appear as panels in your terminal when complete.

Input pipeline and output flow

Understanding how Hermes processes your messages helps you use it more effectively:

Input pipeline:
1. Your message is captured by the CLI
2. Text is cleaned (markdown stripping for final responses)
3. Session context is loaded (history + config)
4. Active skills inject their system instructions
5. The complete prompt is sent to the model

Output flow:
1. The model responds in streaming
2. Tool calls are displayed in real-time
3. Tool results are injected into context
4. The cycle repeats until the final response
5. The session is automatically saved to ~/.hermes/state.db

The real-time status bar keeps you informed about the active model, consumed tokens, context percentage (color-coded), estimated cost and duration.

Useful CLI flags

Flag Description
hermes -c Resume last session
hermes -r <id> Resume specific session
hermes -s <skills> Preload skills
hermes -q "<prompt>" Single non-interactive query
hermes --model "<model>" Use specific model
hermes --provider <name> Force provider
hermes --toolsets "<list>" Select toolsets
hermes --tui Modern TUI interface
hermes chat --verbose Debug mode
hermes -w Isolated git worktree

Concrete workflows

Workflow 1: Quick project debugging

hermes -c "my web project" The authentication test is failing. Find the problem and suggest a fix.

Workflow 2: Parallel research

 I am working on a PostgreSQL migration.
/background Search for PostgreSQL 16 breaking changes vs 15
/background Analyze project dependencies for impacted queries

Workflow 3: Code audit with specialized model

hermes chat --model "anthropic/claude-sonnet-4" --toolsets "terminal,skills" -q "Audit the src/ directory for security vulnerabilities"

Workflow 4: Pair programming session

hermes -s hermes-agent-dev,github-auth
/personality technical
❯ Implement full-text search with Elasticsearch

Workflow 5: Survival kit for issues

hermes doctor          # 1. Diagnose
hermes model           # 2. Check provider
hermes setup           # 3. Re-run configuration
hermes sessions list   # 4. Check sessions
hermes -c              # 5. Resume

Conclusion

The Hermes Agent CLI is much more than a simple terminal chatbot. It is a genuine work environment combining multi-line editing, session resumption, background tasks, configurable personalities and a complete set of slash commands. Once keyboard shortcuts are mastered and workflows are in place, the CLI becomes your primary productivity interface with AI.

The key takeaway: start simple with hermes, learn the fundamental slash commands (/help, /tools, /model, /new, /save), master Alt+Enter for multi-line prompts and Ctrl+C to interrupt, then explore advanced features like background sessions and quick commands. CLI power lies in progression: each learned command is a permanent time gain.

To go further, check out the other articles in this series and the official documentation.