hermes-agent/website/docs/guides
Teknium 29b1bd0e20
feat(cli): add hermes send to pipe script output to any messaging platform (#27188)
Introduces a thin CLI wrapper around the existing send_message_tool so
shell scripts, cron scripts, CI hooks, and monitoring daemons can reuse
the gateway's already-configured platform credentials without
reimplementing each platform's REST client.

  hermes send --to telegram "deploy finished"
  echo "RAM 92%" | hermes send --to telegram:-1001234567890
  hermes send --to discord:#ops --file report.md
  hermes send --to slack:#eng --subject "[CI]" --file build.log
  hermes send --list                  # all targets
  hermes send --list telegram         # filter by platform

Supports all platforms the send_message tool already does (Telegram,
Discord, Slack, Signal, SMS, WhatsApp, Matrix, Feishu, DingTalk, WeCom,
Weixin, Email, etc.), including threaded targets and #channel-name
resolution via the channel directory.

hermes_cli/send_cmd.py delegates to tools.send_message_tool.send_message_tool,
which means there is zero new platform-specific code. The subcommand just:

1. Bridges ~/.hermes/.env and top-level ~/.hermes/config.yaml scalars into
   os.environ (same bootstrap the gateway does at startup) — required so
   TELEGRAM_HOME_CHANNEL and friends are visible to load_gateway_config().
2. Resolves the message body from positional arg, --file, or piped stdin.
3. Calls the shared tool and translates its JSON result to exit codes:
   0 success, 1 delivery failure, 2 usage error.

No running gateway is required for bot-token platforms (Telegram, Discord,
Slack, Signal, SMS, WhatsApp) — the tool hits each platform's REST API
directly. Plugin platforms that rely on a live adapter connection still
need the gateway running; the error message is forwarded verbatim.

- New guide: website/docs/guides/pipe-script-output.md covering real-world
  patterns (memory watchdogs, CI hooks, cron pipes, long-running task
  completion pings) and the security/gateway notes.
- Cross-links added from automate-with-cron.md ("no LLM? use hermes send")
  and developer-guide/gateway-internals.md (delivery-path section).

tests/hermes_cli/test_send_cmd.py (20 tests, all green):

- Happy paths: positional message, stdin, --file, --file -, --subject,
  --json, --quiet.
- Error paths: missing --to, missing body, file not found, tool returns
  error payload (exit 1), tool skipped-send result (exit 0).
- --list: human output, --json output, platform filter, unknown platform.
- Env loader: bridges config.yaml scalars into env, does not override
  existing env vars, gracefully handles missing files.
- Registrar contract: register_send_subparser() returns a working parser.

Smoke-tested end-to-end against a live Telegram bot before commit.
2026-05-16 17:14:45 -07:00
..
_category_.json docs: add Guides & Tutorials section, restructure sidebar 2026-03-08 19:37:34 -07:00
automate-with-cron.md feat(cli): add hermes send to pipe script output to any messaging platform (#27188) 2026-05-16 17:14:45 -07:00
automation-templates.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
aws-bedrock.md docs(bedrock): fix IAM permissions, add quickstart entry, add fallback provider, fix deployment section 2026-05-05 13:41:14 -07:00
azure-foundry.md fix(providers): honor key_env/api_key_env on Azure Anthropic + accept alias in normalizer (#16935) 2026-04-28 02:12:08 -07:00
build-a-hermes-plugin.md feat(plugins): tool override flag for replacing built-in tools (closes #11049) (#26759) 2026-05-15 22:12:57 -07:00
cron-script-only.md fix(docs): correct broken internal links to webhooks and mlops skill pages 2026-05-12 15:03:33 -07:00
cron-troubleshooting.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
daily-briefing-bot.md docs(cron): clarify default model/provider setup for scheduled jobs 2026-04-23 02:04:45 -07:00
delegation-patterns.md docs(delegate_task): clarify that it is synchronous and not durable (#17022) 2026-04-28 06:45:15 -07:00
github-pr-review-agent.md fix(docs): unbreak docs-site-checks — ascii-guard diagram + MDX <1% (#12984) 2026-04-20 04:29:02 -07:00
google-gemini.md docs(gemini): add Google Gemini guide 2026-05-05 13:43:04 -07:00
local-llm-on-mac.md docs: document streaming timeout auto-detection for local LLMs (#6990) 2026-04-09 23:28:25 -07:00
local-ollama-setup.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
microsoft-graph-app-registration.md docs(msgraph): add Azure app registration walkthrough + env var reference 2026-05-08 09:27:26 -07:00
migrate-from-openclaw.md feat(claw-migrate): harden OpenClaw import with plan-first apply, redaction, and pre-migration backup (#16911) 2026-04-28 01:50:23 -07:00
minimax-oauth.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
oauth-over-ssh.md fix(auth): point SSH OAuth users at the tunnel they actually need (#26592) 2026-05-15 14:27:50 -07:00
operate-teams-meeting-pipeline.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
pipe-script-output.md feat(cli): add hermes send to pipe script output to any messaging platform (#27188) 2026-05-16 17:14:45 -07:00
python-library.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
team-telegram-assistant.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
tips.md feat(cli): recognise Shift+Enter as a newline key 2026-05-08 16:26:51 -07:00
use-mcp-with-hermes.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
use-soul-with-hermes.md docs: guides section overhaul — fix existing + add 3 new tutorials (#5735) 2026-04-06 22:02:47 -07:00
use-voice-mode-with-hermes.md feat(voice): add cli beep toggle 2026-04-21 00:29:29 -07:00
webhook-github-pr-review.md docs: add PR review guides, rework quickstart, slim down installation 2026-04-19 05:30:50 -07:00
work-with-skills.md docs(skills): document URL install across features, reference, guide, and hermes-agent skill (#16355) 2026-04-26 21:27:59 -07:00
xai-grok-oauth.md feat(x_search): gated X (Twitter) search tool with OAuth-or-API-key auth (#26763) 2026-05-16 00:58:27 -07:00