CLI Mastery: Commands, Sessions, and Slash Commands

A practical guide to Hermes Agent's CLI — every command, flag, session trick, and slash command you need to be productive.

TLDR: The Hermes CLI has 30+ subcommands organized into categories: chat (interactive/one-shot), sessions (list/resume/prune), config (set/edit/check), tools/skills (list/install/enable), profiles (create/use/delete), gateway (run/install/start/stop), cron (create/list/edit), and auth (add/list/remove). Master the / slash commands in-session for fast iterations. This guide is your comprehensive CLI reference.

Key Takeaways

  • hermes alone launches interactive chat; hermes chat -q "..." runs one-shot
  • Use hermes --continue to pick up where you left off
  • Slash commands like /model, /compress, /retry work mid-session
  • Profiles (hermes profile create) isolate configs for work vs personal use
  • Gateway subsystem connects to Telegram, Discord, Slack, and 10+ platforms

Essential Commands

Chat Commands

CommandPurpose
hermesInteractive session (daily driver)
hermes chat -q "query"Single query, non-interactive
hermes chat -m "model"Start with a specific model
hermes chat -t "web,terminal"Start with specific toolsets
hermes chat --yoloSkip dangerous-command warnings

The --yolo flag skips approval prompts for destructive commands like rm -rf. Use with caution.

Session Management

Every conversation is saved and resumable — this is one of Hermes’s most powerful features.

hermes sessions list           # List recent sessions
hermes sessions browse         # Interactive picker
hermes sessions rename ID "T"  # Rename a session
hermes sessions delete ID      # Delete a session
hermes sessions prune          # Clean up old sessions
hermes sessions stats          # Storage statistics

Resuming sessions:

hermes --continue              # Resume most recent session
hermes --continue "my-work"    # Resume by name
hermes --resume SESSION_ID     # Resume by specific ID

This is useful for long-running work — pick up exactly where you left off, including all context, tool results, and state.

Configuration

hermes config                  # View current config
hermes config edit             # Open config.yaml in $EDITOR
hermes config set key val      # Set a specific value
hermes config path             # Print config file path
hermes config env-path         # Print .env path
hermes config check            # Check for missing/outdated config

Common configs to set early:

hermes config set model.default "deepseek/deepseek-chat"
hermes config set terminal.timeout 300
hermes config set memory.memory_enabled true
hermes config set compression.enabled true

Tools & Skills

hermes tools                   # Interactive tool toggling
hermes tools list              # See all tools and status
hermes tools enable web        # Enable web toolset
hermes tools disable browser   # Disable browser toolset

hermes skills list             # Installed skills
hermes skills search "cron"    # Search hub for skills
hermes skills install "NAME"   # Install a skill
hermes skills uninstall N      # Remove a skill

Profiles

Profiles let you run completely independent Hermes instances — each with its own config, sessions, skills, and memory:

hermes profile list            # List all profiles
hermes profile create "work"   # Create a new profile
hermes profile use "work"      # Set as default
hermes profile delete "work"   # Delete a profile

Useful if you use Hermes for both work and personal projects.

Global Flags

FlagWhat it does
--version, -VShow version
--resume, -r SESSIONResume session by ID
--continue, -c [NAME]Resume by name (or most recent)
--worktree, -wIsolated git worktree mode
--skills, -s NAMEPreload a skill
--profile, -p NAMEUse a named profile
--yoloSkip approval prompts
--quiet, -QSuppress banner, spinner
--verbose, -vShow detailed output

Slash Commands (In-Session)

Type these during an interactive chat session:

CommandWhat it does
/new or /resetStart a fresh session
/retryResend the last message
/undoRemove the last exchange
/title "name"Name the current session
/compressSummarize earlier turns to save tokens
/modelSwitch model mid-session
/yoloToggle approval bypass
/skillsBrowse and install skills
/toolsManage tools (CLI only)
/helpShow all slash commands
/quitExit CLI

Pro tip: Use /compress when you’re deep in a long session and approaching context limits — it condenses earlier turns without losing essential context.

Gateway Subsystem

The gateway connects Hermes to messaging platforms (covered in depth in the Multi-Platform Gateway guide):

hermes gateway run             # Start gateway in foreground
hermes gateway install         # Install as systemd service
hermes gateway start/stop      # Control the service
hermes gateway status          # Check if running

Automation

Built-in cron scheduler:

hermes cron list               # See all jobs
hermes cron create "8am"       # Create a daily job
hermes cron edit "JOB_ID"      # Edit a job
hermes cron remove "JOB_ID"    # Delete a job

Credential pool for managing multiple API keys:

hermes auth add                # Add a credential
hermes auth list "openrouter"  # List pooled keys
hermes auth remove "openrouter" 1  # Remove by index

Tips & Tricks

  1. Alias your most common command: alias hc='hermes --continue --quiet'
  2. Preload skills for specialized tasks: hermes -s "systematic-debugging" chat -q "Debug this error..."
  3. Export sessions for documentation: hermes sessions export my-work.jsonl
  4. Worktree mode for parallel agents on the same repo: hermes -w

FAQ

Q: What’s the difference between --continue and --resume? --continue resumes by session name (or the most recent session if no name given). --resume requires a specific session ID from hermes sessions list.

Q: Can I run multiple Hermes sessions at the same time? Yes — use profiles (hermes profile create) for independent instances, or --worktree mode (hermes -w) for parallel agent work on the same git repo.

Q: How do I change models without restarting? Use /model in-session. It’s instant — no restart needed.

Next Steps