mibyan send is a small, scriptable CLI that pushes a message to any
messaging platform Mibyan is already configured for. Think of it as a
cross-platform curl for notifications — you don’t need a running
gateway, you don’t need an LLM, and you don’t need to re-paste bot tokens
into each of your scripts.
Use it for:
- System monitoring (memory, disk, GPU temp, long-running job finished)
- CI/CD notifications (deploy done, test failure)
- Cron scripts that need to ping you with results
- Quick one-shot messages from a terminal
- Piping any tool’s output anywhere (
make | mibyan send --to slack:#builds)
mibyan gateway already uses, so there’s no second configuration surface to
maintain.
Quick Start
Argument Reference
Target Formats
Any platform Mibyan ships adapters for works as a target:
telegram, discord, slack, signal, sms, whatsapp, matrix,
mattermost, feishu, dingtalk, wecom, weixin, email, and
others.
Exit Codes
Exit codes follow the standard Unix convention so your scripts can
branch on them the same way they would on
curl or grep.
Message Body Resolution
mibyan send resolves the message body in this order:
- Positional argument —
mibyan send --to telegram "hi" --file PATH—mibyan send --to telegram --file msg.txt- Piped stdin —
echo hi | mibyan send --to telegram
Real-World Examples
Monitoring: Memory / Disk Alerts
Replace ad-hoccurl https://api.telegram.org/... calls in your watchdogs
with a single portable line:
mibyan send reuses your Mibyan config, the same script works on
any host where Mibyan is installed — no need to export bot tokens into
each machine’s environment manually.
CI / CD: Build and Test Results
Cron: Daily Report
Long-Running Tasks: Ping When Done
Scripting with --json and --quiet
Does mibyan send Need the Gateway Running?
Usually no. For any bot-token platform — Telegram, Discord, Slack,
Signal, SMS, WhatsApp Cloud API, and most others — mibyan send calls
the platform’s REST endpoint directly using credentials from
~/.mibyan/.env and ~/.mibyan/config.yaml (or the equivalent files under
your resolved Mibyan home — %LOCALAPPDATA%\mibyan on Windows, or the profile
directory when mibyan_HOME / -p is set). It’s a standalone subprocess
that exits as soon as the message is delivered.
If a platform reports not configured, the error lists the exact files it
read and what each one held, e.g.
Looked in: C:\Users\me\AppData\Local\mibyan\.env (no DISCORD_BOT_TOKEN), C:\Users\me\AppData\Local\mibyan\config.yaml (no platforms.discord block), environment (DISCORD_BOT_TOKEN unset), external secret sources (none configured).
When a gateway started from the same home has that platform connected, the
token only exists in the gateway’s process environment — add it to that home’s
.env so mibyan send can use it. When your shell is scoped to a profile home
(mibyan_HOME=<root>/profiles/<name>) but the connected gateway runs from the
default root, the error says so — the gateway never read the profile’s .env,
and mibyan send --list points at the root’s channel_directory.json.
A live gateway is only required for plugin platforms that rely on a
persistent adapter connection (for example, a custom plugin that keeps
a long-lived WebSocket open). In that case you’ll get a clear error
pointing at the gateway; start it with mibyan gateway start and retry.
Listing and Discovering Targets
Before sending to a specific channel, you can inspect what’s available:~/.mibyan/channel_directory.json, which the
gateway refreshes every few minutes while it’s running. If you see
“no channels discovered yet”, start the gateway once (mibyan gateway start) so it can populate the cache.
Human-friendly names (discord:#ops, slack:#engineering) are resolved
against this cache at send time, so you don’t need to memorize numeric
IDs.
Comparison with Other Approaches
mibyan send is intentionally the simplest possible surface. If you need
an agent to decide what to say, schedule a cron job — the agent’s final
response is auto-delivered to the configured deliver: target (the agent
no longer fires messages itself). If you need a scheduled run with LLM-generated content,
use cronjob(action='create', prompt=...) with deliver='telegram:...'.
If you just need to pipe a raw string, reach for mibyan send.
Related
- Automate Anything with Cron — scheduled jobs whose output auto-delivers to any platform.
- Gateway Internals —
the delivery router that
mibyan sendshares with cron delivery. - Messaging Platform Setup — one-time configuration for each platform.

