CLI Essential Commands Every User Should Know

The Hermes CLI at a Glance

The Hermes Agent command-line interface is your primary way to interact with the agent. While you can connect Hermes to Telegram or Discord for mobile access, the CLI offers the most powerful and flexible experience.

After installing Hermes, open your terminal and type:

hermes --help

Hermes Agent v0.8 β€” Self-improving AI Agent

USAGE:

hermes [OPTIONS] [MESSAGE]

OPTIONS:

-m, --model AI model to use

-s, --session Session to use or create

-c, --continue Continue last session

-f, --file Include file(s) in context

-p, --pipe Read from stdin

-o, --output Write response to file

-v, --verbose Show detailed logs

--no-confirm Skip confirmation prompts

--json Output responses as JSON

--version Show version

--help Show this help

COMMANDS:

config Manage configuration

session Manage sessions

skill Manage skills

memory Manage long-term memory

cron Manage scheduled tasks

Basic Usage Patterns

Interactive Mode (Default)

Just type hermes to start an interactive conversation:

hermes

You'll enter a REPL where you can type messages and receive responses in real-time.

One-Shot Mode

Send a single message and get the response without entering interactive mode:

hermes "What is the capital of France?"

This is perfect for quick questions or scripting. The output goes to stdout, so you can pipe it:

hermes "Generate a random UUID" | pbcopy  # macOS

hermes "Generate a random UUID" | xclip # Linux

File Context Mode

Include files in your conversation for analysis or modification:

# Include a single file

hermes -f src/app.ts "Add error handling to all routes"

# Include multiple files

hermes -f src/app.ts -f src/routes.ts -f package.json "Review this project"

# Include all files matching a pattern

hermes -f "src/*/.ts" "Find potential memory leaks"

Pipe Mode

Pipe data from other commands directly into Hermes:

# Analyze logs

cat /var/log/nginx/error.log | hermes -p "Summarize the errors from the last hour"

# Explain code

cat src/parser.ts | hermes -p "Explain this code to a junior developer"

# Process data

curl -s https://api.example.com/data | hermes -p "Convert this JSON to a CSV table"

# Git diff review

git diff HEAD~3 | hermes -p "Review these changes and suggest improvements"

Session Management

Sessions are persistent conversation threads. Each session maintains its own history, context, and state.

Essential Session Commands

# Start with a named session

hermes -s my-project

# Continue the last session

hermes -c

# List all sessions

hermes session list

# Show session details

hermes session info my-project

# Delete a session

hermes session delete old-project

# Export session history

hermes session export my-project > session-log.md

In-App Session Commands

While in interactive mode, use slash commands:

> /session new api-redesign

/session switch my-project

/sessions

/session rename api-redesign api-v2

/session delete api-v2

Session Best Practices

  • One session per project β€” Keeps context focused
  • Descriptive names β€” blog-migration not session-1
  • Clean up regularly β€” Delete completed sessions to save disk space
  • Export important sessions β€” Save logs before deleting
  • Configuration

    Hermes uses a YAML configuration file at ~/.hermes/config.yaml. You can edit it directly or use the CLI:

    # View all configuration
    

    hermes config list

    # Get a specific value

    hermes config get default_model

    # Set a value

    hermes config set default_model anthropic/claude-3.5-sonnet

    # Reset to defaults

    hermes config reset

    Key Configuration Options

    # ~/.hermes/config.yaml
    

    api_key: sk-or-v1-your-key-here

    provider: openrouter

    default_model: anthropic/claude-3.5-sonnet

    temperature: 0.7

    max_tokens: 4096

    # Behavior

    auto_confirm: false # Auto-confirm file changes

    verbose: false # Show detailed logs

    theme: dark # Terminal color theme

    # Sessions

    session_dir: ~/.hermes/sessions

    max_session_history: 100 # Messages to keep in memory

    # Memory

    memory_enabled: true

    memory_dir: ~/.hermes/memory

    # Model aliases

    model_aliases:

    fast: openai/gpt-4o-mini

    smart: anthropic/claude-3.5-sonnet

    For a deep dive, see our Configuration Guide.

    Skills Management

    Skills extend Hermes' capabilities. Think of them as plugins that teach Hermes new tricks.

    # List installed skills
    

    hermes skill list

    # Search community skills

    hermes skill search "web scraping"

    # Install a skill

    hermes skill install github-pr-review

    # Remove a skill

    hermes skill remove github-pr-review

    # Update all skills

    hermes skill update --all

    In-App Skill Commands

    > /skills                     # List active skills
    

    /skill info web-search # Show skill details

    /skill toggle web-search # Enable/disable a skill

    Memory Management

    Hermes' long-term memory persists across sessions. Use it to store preferences, facts, and project context.

    # Save a memory
    

    hermes memory save "I prefer tabs over spaces"

    # List all memories

    hermes memory list

    # Search memories

    hermes memory search "deployment"

    # Delete a specific memory

    hermes memory delete 42

    # Clear all memories

    hermes memory clear

    Power-User Shortcuts

    Chaining Commands

    Use one-shot mode for automated workflows:

    # Generate, then run
    

    hermes "Generate a Python script that checks if port 8080 is open" -o check_port.py && python check_port.py

    # Analyze and fix

    hermes -f src/broken.ts "Find and fix the bug" --no-confirm

    # Batch processing

    for file in src/*.ts; do

    hermes -f "$file" "Add JSDoc comments to all functions" --no-confirm

    done

    Output Formatting

    Control output format for scripting:

    # JSON output for parsing
    

    hermes --json "List 5 random city names"

    # Output: {"cities": ["Tokyo", "Berlin", ...]}

    # Write directly to file

    hermes -o report.md "Generate a project status report for the web-scraper session"

    # Suppress thinking blocks

    hermes --quiet "What time is it in Tokyo?"

    Environment Variables

    Set defaults via environment variables:

    export HERMES_MODEL=anthropic/claude-3.5-sonnet
    

    export HERMES_API_KEY=sk-or-v1-your-key

    export HERMES_SESSION=default

    export HERMES_VERBOSE=true

    Add these to your .bashrc or .zshrc for persistence.

    Keyboard Shortcuts (Interactive Mode)

    | Shortcut | Action |

    |----------|--------|

    | Ctrl+C | Cancel current response |

    | Ctrl+D | Exit Hermes |

    | Ctrl+L | Clear screen |

    | Up/Down | Navigate message history |

    | Tab | Autocomplete commands |

    | Ctrl+R | Search message history |

    Debugging and Troubleshooting

    Verbose Mode

    Add -v to see detailed request/response logs:

    hermes -v "Hello"
    

    [DEBUG] Connecting to OpenRouter...
    

    [DEBUG] Model: anthropic/claude-3.5-sonnet

    [DEBUG] Sending 1 message (245 tokens)

    [DEBUG] Response received in 1.2s (312 tokens)

    Hello! How can I help you today?

    Connection Testing

    hermes --test-connection
    

    # βœ… Provider: OpenRouter

    # βœ… Model: anthropic/claude-3.5-sonnet

    # βœ… API Key: Valid

    # βœ… Latency: 142ms

    Common Issues

    "Model not found" error:
    # Check available models
    

    hermes config get provider

    hermes --list-models | grep claude

    Slow responses:
    # Switch to a faster model
    

    hermes config set default_model openai/gpt-4o-mini

    Context too long:
    # Start a fresh session
    

    hermes session new fresh-start

    Next Steps

    Now that you're comfortable with the CLI, explore:


    Last updated: April 15, 2026 Β· Hermes Agent v0.8