Appearance
The CLI: Your First Real Task
The CLI is the primary surface for most Hermes work. It's a read-eval-print loop with slash commands, tool-use enforcement, and two modes: interactive (you chat back and forth) and one-shot (you give it a task and it returns the result). This lesson gets you past the hello-world and into a real task you'd normally do by hand.

What you'll learn
- Interactive mode (
hermes) is for conversations; one-shot mode (hermes chat -q) is for fire-and-forget tasks - Slash commands (
/help,/model,/skills,/memory,/new) control the session without leaving the conversation - The tool-use enforcement toggle (
tool_use_enforcement) and YOLO mode (--yolo) control how much autonomy Hermes gets
The problem
A lot of people install Hermes, type "hello," get a response, and think they've seen what it does. Then they close it and go back to doing things by hand. The CLI is a power tool, not a chatbot, the difference between "tell me what disk space looks like" (a chatbot question) and "find what's consuming disk space in /var/log, rotate the three largest files, and summarize what you did" (an agent task) is the difference between a demo and a tool you actually use.
Options & when to use each
| Mode | What it does | When to use it |
|---|---|---|
Interactive (hermes) | REPL, you type, Hermes responds, you iterate | Developing, debugging, exploring, anything where you want to see the thinking |
One-shot (hermes chat -q) | Single query, returns result, exits | Scripts, cron jobs, CI/CD, "do this thing and come back" |
One-shot with verbose (-v) | Shows tool calls and reasoning as they happen | Debugging a one-shot that's not doing what you expected |
One-shot with quiet (-Q) | Suppresses banner, spinner, and tool previews | Piping output to another command, logging |
Build it
Step 1: Start an interactive session
To launch the interactive Read-Eval-Print Loop (REPL) shell environment for Hermes, invoke the main binary from your terminal:
bash
hermesYou'll see a banner with the model name, provider, and session ID. The prompt is a standard read-eval-print loop. Type a message and Hermes responds.
Step 2: Run a real task interactively
Instead of a hello-world, give Hermes a task that requires multiple tool calls:
Find what's consuming the most disk space in /var/log.
For each of the three largest files, check if they're safe to rotate.
If they are, compress them with gzip and report the space saved.Hermes will call du to check sizes, inspect the files, decide which are safe to compress, run gzip, and report the results. This is a task that requires multiple tool calls, conditional logic, and a summary, it's agent work, not a chatbot response.
Watch the tool calls as they happen. The spinner indicates Hermes is working. When it calls a tool, you'll see the tool name and a preview of the arguments. When it finishes, it returns the result.
Step 3: Use slash commands during a session
These work at any point in an interactive session:
| Command | What it does |
|---|---|
/help | List all available slash commands |
/model [name] | Show current model or switch to a different one |
/memory | Show the contents of MEMORY.md and USER.md |
/skills | List installed skills |
/new | Start a fresh session (clears conversation history) |
/reset | Same as /new |
/compress | Manually trigger context compression |
/undo | Remove the last exchange |
/retry | Re-send the last message (useful when a tool call failed transiently) |
/save | Save the conversation to a file |
/usage | Show token usage for the current session |
/quit | Exit |
Step 4: Run a one-shot task
To run a single, isolated query directly from the shell without starting an interactive session, use the query flag option:
bash
hermes chat -q "Check if the PostgreSQL service is running on localhost:5432. If it is, list the databases. If it isn't, report what's wrong."One-shot mode is what you'd use in a cron job, a CI/CD pipeline, or any script where you want Hermes to do one thing and report back. The -q flag means "query" , it takes the prompt, runs it to completion, prints the result, and exits.
For tasks that need more autonomy (skipping the approval prompt for safe commands):
bash
hermes --yolo chat -q "Clean up Docker images older than 7 days and report space reclaimed"The --yolo flag skips the command approval prompt. Only use it for tasks where you've already verified the commands are safe. The safer alternative is to configure approval mode in config.yaml:
bash
hermes config set approvals.mode smartSmart mode auto-approves low-risk commands, denies high-risk ones, and prompts for anything in between. It's the default and the recommended setting for most use.
Step 5: Resume a session
To load the conversation logs and restore the model state from a previous runtime session, use the session management flags:
bash
# Resume the most recent session
hermes --continue
# Resume a specific session by ID
hermes --resume 20260721_143052_a1b2c3
# List recent sessions
hermes sessions listWhat goes wrong
| Mistake | How you notice it | The fix |
|---|---|---|
| Hermes gets stuck in a loop calling the same tool repeatedly | The spinner keeps spinning and you see the same tool call over and over | /stop kills background processes. Then /new starts a fresh session. The old session is saved, you can resume it later with --continue |
| You give a one-shot task that times out | hermes chat -q hangs for minutes with no output | Set a timeout at the shell level: timeout 300 hermes chat -q "..." for a 5-minute cap. Complex tasks can take 5-10 minutes depending on the model |
| Tool calls get denied with "approval required" | You see an approval prompt blocking the task | Either approve the command, or use --yolo for tasks where you trust the scope. For permanent configuration: hermes config set approvals.mode smart |
| Shell commands fail because Hermes is in the wrong directory | Commands reference files that don't exist | Hermes inherits the working directory from where you launched it. Start Hermes from the project root, or use cd in your first message to set the working directory |
Confirm it worked
Verify your installation by running a complete session lifecycle from start to finish. This process tests both the interactive loop and headless execution paths.
bash
# 1. Start an interactive session and run a multi-step task
hermes
# 2. In the session, give it a real task with multiple tool calls:
# "Check disk usage on the root partition. If it's above 80%,
# find the top 5 directories by size and report what's safe to clean up."
# 3. Verify Hermes called at least two different tools (df, du, find, etc.)
# and produced a summary you could act on.
# 4. Exit the session with /quit, then run a one-shot:
hermes chat -q "What files were modified in the last hour in the current directory?"If the one-shot returns actual file names and modification times, the CLI is working correctly in both interactive and one-shot modes.
Next: The TUI & Desktop App , the terminal dashboard and native GUI for when the plain CLI isn't enough.