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
hermesalone launches interactive chat;hermes chat -q "..."runs one-shot- Use
hermes --continueto pick up where you left off - Slash commands like
/model,/compress,/retrywork 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
| Command | Purpose |
|---|---|
hermes | Interactive 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 --yolo | Skip 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
| Flag | What it does |
|---|---|
--version, -V | Show version |
--resume, -r SESSION | Resume session by ID |
--continue, -c [NAME] | Resume by name (or most recent) |
--worktree, -w | Isolated git worktree mode |
--skills, -s NAME | Preload a skill |
--profile, -p NAME | Use a named profile |
--yolo | Skip approval prompts |
--quiet, -Q | Suppress banner, spinner |
--verbose, -v | Show detailed output |
Slash Commands (In-Session)
Type these during an interactive chat session:
| Command | What it does |
|---|---|
/new or /reset | Start a fresh session |
/retry | Resend the last message |
/undo | Remove the last exchange |
/title "name" | Name the current session |
/compress | Summarize earlier turns to save tokens |
/model | Switch model mid-session |
/yolo | Toggle approval bypass |
/skills | Browse and install skills |
/tools | Manage tools (CLI only) |
/help | Show all slash commands |
/quit | Exit 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
- Alias your most common command:
alias hc='hermes --continue --quiet' - Preload skills for specialized tasks:
hermes -s "systematic-debugging" chat -q "Debug this error..." - Export sessions for documentation:
hermes sessions export my-work.jsonl - 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
- Skills: Teaching Your Agent to Learn — go beyond CLI usage
- Advanced Automation — cron jobs and delegation