* [](https://hermes-agent.nousresearch.com/docs/)
* Using Hermes
* CLI Interface
On this page

# CLI Interface
Hermes Agent's CLI is a full terminal user interface (TUI) — not a web UI. It features multiline editing, slash-command autocomplete, conversation history, interrupt-and-redirect, and streaming tool output. Built for people who live in the terminal.
First-time setup
One command — `hermes setup --portal` — and you're ready to `hermes chat` . See [Nous Portal](https://hermes-agent.nousresearch.com/docs/integrations/nous-portal) .
tip
Hermes also ships a modern TUI with modal overlays, mouse selection, and non-blocking input. Launch it with `hermes --tui` — see the [TUI](https://hermes-agent.nousresearch.com/docs/user-guide/tui) guide.

## Running the CLI ​
```
# Start an interactive session (default) hermes # Single query mode (non-interactive) hermes chat -q "Hello" # Single query from a file or stdin — nothing is shell-interpreted, so # arbitrary text (quotes, $(...), backticks) arrives verbatim hermes chat --query-file prompt.txt hermes chat --query-file - < prompt.txt # With a specific model hermes chat --model "anthropic/claude-sonnet-4" # With a specific provider hermes chat --provider nous        # Use Nous Portal hermes chat --provider openrouter  # Force OpenRouter # With specific toolsets hermes chat --toolsets "web,terminal,skills" # Start with one or more skills preloaded (rendered once into the session's prompt) hermes chat -s hermes-agent-dev,github-auth # Resume previous sessions hermes --resume < session_id > # Resume a specific session by ID (-r) hermes --resume "my thread" # Resume by title (latest "" continuation in the lineage) hermes -c "my thread" --create-if-missing  # Resume that tit
```

...

### Plugin management ​
Portable packages remain disabled until explicitly enabled. Hermes currently
loads portable Agent Skills and stdio MCP entries. See the [plugin developer guide](https://hermes-agent.nousresearch.com/docs/developer-guide/plugins) for the exact supported subset and trust boundary.

...

## Interface Layout ​
`hermes chat` (and the bare `hermes` prompt when `display.interface` is `cli` ) no longer runs the agent inside your terminal process. It discovers or starts the profile's gateway ( `hermes gateway ensure` ), creates or resumes the session there, and attaches over the gateway's local WebSocket — the same session a Desktop window, the TUI, or a Telegram topic can open at the same time.

...

A `--safe-mode` / `--ignore-user-config` launch reads no profile default model, so it must name one; the refusal prints a complete example such as `hermes chat --safe-mode --provider openrouter --model anthropic/claude-sonnet-4 -q "hello"` .
In this mode the slash surface is `/stop` , `/approve <id> <choice>` , `/answer <id> <text>` , `/discard <admission_id>` , `/branch [title]` , `/model <model> [--provider name]` , `/compress [here [N] | <focus>] [--preview]` , `/yolo [on|off]` , `/help` and `/quit` ; other slash commands print `Unsupported gateway CLI command; use /help.` Use the TUI ( `hermes --tui` ) for the full slash registry.

...

## Keybindings ​
| Key | Action |
| `Enter` | Send message |
| `Alt+Enter` , `Ctrl+J` , or `Shift+Enter` | New line (multi-line input). `Shift+Enter` requires a terminal that distinguishes it from `Enter` — see below. On Windows Terminal, `Alt+Enter` is captured by the terminal (fullscreen toggle); use `Ctrl+Enter` or `Ctrl+J` instead. |
| `Alt+V` | Paste an image from the clipboard when supported by the terminal |
| `Ctrl+V` | Paste text and opportunistically attach clipboard images |
| `Ctrl+T` / `F6` | Open the full-screen live work monitor (subagents and background processes) without losing the composer draft. The live dock appears automatically above the status bar; arrows select a worker or process, `Enter` shows its recent log, `s` steers a worker, and `x` requests stop with confirmation. See [Monitoring subagents](https://hermes-agent.nousresearch.com/docs/user-guide/features/delegation) . |

...

**Multiline paste preview.** When you paste a multi-line block, the CLI echoes a compact single-line preview ( `[pasted: 47 lines, 1,842 chars — press Enter to send]` ) instead of dumping the whole payload into the scrollback. The full content is still what gets sent; this is just display polish.

### `!` Shell Mode ​
Start a line with `!` to run it as a shell command instead of sending it to the agent:
```
> !git status > !ls -la > !pytest -x tests/hermes_cli
```

...

A remote or sandboxed `terminal.backend` ( `ssh` , `docker` , …) is **not** used for `!` commands — they always run on the host where Hermes itself runs, so `!hostname` names your machine while the agent's `terminal` tool names the backend. Ask the agent (or open a shell on the target) to run something _inside_ the backend. Path completion in the composer, by contrast, does follow the configured backend and lists the target's filesystem.

...

## Slash Commands ​
| Command | Description |
| `/help` | Show command help |
| `/model` | Show or change the current model |
| `/tools` | List currently available tools |
| `/skills browse` | Browse the skills hub and official optional skills |
| `/context [all]` | Visual context-usage breakdown — glyph block grid + per-category token table (system prompt / tools / skills / memory / conversation / free space). `/context all` adds per-skill and per-toolset costs. |
| `/sessions` | Open an interactive session picker right inside the classic CLI (same surface the TUI uses). Type to filter, arrow keys to navigate, Enter to resume. |
For the full built-in CLI and messaging lists, see [Slash Commands Reference](https://hermes-agent.nousresearch.com/docs/reference/slash-commands) .

...

## Quick Commands ​
```
# ~/.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 restart : type : alias target : /gateway restart
```
Then type `/status` , `/gpu` , or `/restart` in any chat. See the [Configuration guide](https://hermes-agent.nousresearch.com/docs/user-guide/configuration) for more examples.

## Preloading Skills at Launch ​
If you already know which skills you want active for the session, pass them at launch time:
```
hermes -s hermes-agent-dev,github-auth hermes chat -s github-pr-workflow -s github-auth
```
Hermes loads each named skill into the session prompt before the first turn. The same flag works in interactive mode and single-query mode.

...

## Skill Slash Commands ​
```
/gif-search funny cats /axolotl help me fine-tune Llama 3 on my dataset /github-pr-workflow create a PR for the auth refactor # Just the skill name loads it and lets the agent ask what you need: /excalidraw
```

...

## Multi-line Input ​
```
# ~/.hermes/config.yaml display : cli_multiline_shortcuts : false
```
info
Pasting multi-line text is supported — use any of the newline keys above, or simply paste content directly.

...

## Redirecting the Agent Mid-Turn ​
### Busy Input Mode ​
| Mode | Behavior |
| `"interrupt"` (default) | Your message redirects the active turn. Model generation restarts with displayed reasoning and completed work preserved. A running foreground terminal command is moved to the background (not killed — you get a completion notification) so your message is read immediately; other running tools finish first |
| `"queue"` | Your message is queued as the next turn after the agent finishes. The queue lives on the gateway (crash-durable, visible to every attached client). Classic `hermes chat` always behaves this way: every line typed during a turn queues at the gateway, whatever this key says; `interrupt` and `steer` are TUI and Desktop behaviours |
| `"steer"` | Your message is injected into the current run via `/steer` , arriving at the agent after the next tool call — no interrupt, no new turn |

...

## Tool Progress Display ​
Cycle through display modes with `/verbose` : `off → new → all → verbose` . This command can also be enabled for messaging platforms — see [configuration](https://hermes-agent.nousresearch.com/docs/user-guide/configuration) .

...

### Tool Preview Length ​
```
# ~/.hermes/config.yaml display : tool_preview_length : 80 # Truncate tool previews to 80 chars (0 = no limit)
```
This is useful on narrow terminals or when tool arguments contain very long file paths.

...

## Session Management ​
### Resuming Sessions ​
Resuming restores the full conversation history from SQLite. The agent sees all previous messages, tool calls, and responses — just as if you never left.

...

## Background Sessions ​
### How It Works ​
Each `/bg` prompt spawns a **completely separate agent session** in a daemon thread:
* **Isolated conversation** — the background agent has no knowledge of your current session's history. It receives only the prompt you provide.
* **Same configuration** — the background agent inherits your model, provider, toolsets, reasoning settings, and fallback model from the current session.
* **Non-blocking** — your foreground session stays fully interactive. You can chat, run commands, or even start more background tasks.

...

### Use Cases ​
* **Long-running research** — "/bg research the latest developments in quantum error correction" while you work on code
* **File processing** — "/bg analyze all Python files in this repo and list any security issues" while you continue a conversation
* **Parallel investigations** — start multiple background tasks to explore different angles simultaneously
info
Background sessions do not appear in your main conversation history. They are standalone sessions with their own task ID (e.g., `bg_143022_a1b2c3` ).

## Quiet Mode ​
By default, the CLI runs in quiet mode which:
* Suppresses verbose logging from tools
* Enables kawaii-style animated feedback
* Keeps output clean and user-friendly
For debug output:
```
hermes chat --verbose
```
[Edit this page](https://github.com/NousResearch/hermes-agent/edit/main/website/docs/user-guide/cli.md)
[Previous Learning Path](https://hermes-agent.nousresearch.com/docs/getting-started/learning-path) [Next TUI](https://hermes-agent.nousresearch.com/docs/user-guide/tui)