Files
hermes-agent/docs/slash-commands.md
teknium1 d400fb8b23 feat: add /update slash command for gateway platforms
Adds a /update command to Telegram, Discord, and other gateway platforms
that runs `hermes update` to pull the latest code, update dependencies,
sync skills, and restart the gateway.

Implementation:
- Spawns `hermes update` in a separate systemd scope (systemd-run --user
  --scope) so the process survives the gateway restart that hermes update
  triggers at the end. Falls back to nohup if systemd-run is unavailable.
- Writes a marker file (.update_pending.json) with the originating
  platform and chat_id before spawning the update.
- On gateway startup, _send_update_notification() checks for the marker,
  reads the captured update output, sends the results back to the user,
  and cleans up.

Also:
- Registers /update as a Discord slash command
- Updates README.md, docs/messaging.md, docs/slash-commands.md
- Adds 18 tests covering handler, notification, and edge cases
2026-03-05 01:20:58 -08:00

90 lines
2.2 KiB
Markdown

# Slash Commands Reference
Quick reference for all CLI slash commands in Hermes Agent.
## Navigation & Control
| Command | Description |
|---------|-------------|
| `/help` | Show available commands |
| `/quit` | Exit the CLI (aliases: `/exit`, `/q`) |
| `/clear` | Clear screen and reset conversation |
| `/new` | Start a new conversation |
| `/reset` | Reset conversation (keep screen) |
## Tools & Configuration
| Command | Description |
|---------|-------------|
| `/tools` | List all available tools |
| `/toolsets` | List available toolsets |
| `/model` | Show or change the current model |
| `/model <name>` | Switch to a different model |
| `/config` | Show current configuration |
| `/prompt` | View/set custom system prompt |
| `/personality` | Set a predefined personality |
## Conversation
| Command | Description |
|---------|-------------|
| `/history` | Show conversation history |
| `/retry` | Retry the last message |
| `/undo` | Remove the last user/assistant exchange |
| `/save` | Save the current conversation |
## Advanced
| Command | Description |
|---------|-------------|
| `/cron` | Manage scheduled tasks |
| `/skills` | Search, install, or manage skills |
| `/platforms` | Show gateway/messaging platform status |
## Gateway Only
These commands are available in messaging platforms (Telegram, Discord, etc.) but not the interactive CLI:
| Command | Description |
|---------|-------------|
| `/stop` | Stop the running agent |
| `/sethome` | Set this chat as the home channel |
| `/compress` | Manually compress conversation context |
| `/usage` | Show token usage for the current session |
| `/reload-mcp` | Reload MCP servers from config |
| `/update` | Update Hermes Agent to the latest version |
| `/status` | Show session info |
## Examples
### Changing Models
```
/model anthropic/claude-sonnet-4
```
### Setting a Custom Prompt
```
/prompt You are a helpful coding assistant specializing in Python.
```
### Managing Toolsets
Run with specific toolsets:
```bash
python cli.py --toolsets web,terminal
```
Then check enabled toolsets:
```
/toolsets
```
## Tips
- Commands are case-insensitive (`/HELP` = `/help`)
- Use Tab for autocomplete
- Most commands work mid-conversation
- `/clear` is useful for starting fresh without restarting