Overview
hermes send pipes text from any shell script to any messaging platform Hermes is already configured for. It reuses the gateway’s platform credentials (~/.hermes/.env plus ~/.hermes/config.yaml). No LLM, no agent loop, and no running gateway is required for bot-token platforms such as Telegram, Discord, Slack, or Signal.
hermes send [-t TARGET] [-f PATH] [-s LINE] [-l] [-q] [--json] [message]
Options
| Option | Description |
|---|---|
message |
Message text. If omitted, read from --file or stdin. |
-t TARGET, --to TARGET |
Delivery target. Format: platform, platform:chat_id, platform:chat_id:thread_id, or platform:#channel-name. |
-f PATH, --file PATH |
Read message body from PATH. Use - for stdin. |
-s LINE, --subject LINE |
Prepend a subject/header line before the message body. |
-l, --list |
List available targets. Optional filter: hermes send --list telegram. |
-q, --quiet |
Suppress stdout on success (exit code only). |
--json |
Emit raw JSON result instead of human-readable output. |
Examples
# Send a simple message
hermes send --to telegram "deploy finished"
# Pipe from another command
echo "RAM 92%" | hermes send --to telegram:-1001234567890
# Send a file as the message body
hermes send --to discord:#ops --file /tmp/report.md
# Prepend a subject line
hermes send --to slack:#eng --subject "[CI]" --file build.log
# Send a media attachment
hermes send --to telegram "MEDIA:/tmp/chart.png"
Common Scenarios
CI/CD notification
hermes send --to telegram "Build passed on $(date)"
Cron job alert
echo "Nightly backup completed" | hermes send --to discord:#ops
Listing targets
hermes send --list
hermes send --list telegram
Exit codes
0— delivery succeeded1— delivery or backend error2— usage error
Tips
- Use
MEDIA:/path/to/filein the message text to attach an image or document. - Recipient format varies by platform; use
--listto see available targets. - Use
--quietin scripts to avoid polluting stdout. - Use
--jsonwhen chaininghermes sendwith other automation tools.