Get a message on your phone when a herdr agent needs you or finishes, in the app you already use: Telegram, Discord, Slack, ntfy, Bark, or any webhook. With Telegram, reply to the message to answer the agent.
It works with both herdr runtimes:
- the herdr app (herdr-core,
hc) - the herdr TUI (
herdrserver)
⚠️ api / 1 · claude-code needs permission
Fix the flaky login test — Run rm -rf build?
┌──────────────────────────────┐
│ Allow this command? │
│ 1. Yes 2. No │
└──────────────────────────────┘
Reply to answer · /keys esc · /read
The herdr mobile app shows a banner only while it is open, because iOS closes SSH in the background. herdr-push runs next to your agents and pushes through a service your phone already listens to.
Homebrew (macOS, Linux):
brew install --cask yatping/tap/herdr-pushDownload a binary for macOS, Linux or Windows from Releases, unpack it, and put herdr-push on your PATH.
Go 1.26 or newer:
go install github.com/yatping/herdr-push@latestherdr-push is one binary with no runtime dependencies.
go install puts it in $(go env GOPATH)/bin (usually ~/go/bin). If your shell says command not found, add that folder to your PATH, or link it next to hc:
ln -s ~/go/bin/herdr-push ~/.local/bin/herdr-pushherdr-push init # writes ~/.config/herdr-push/config.toml
$EDITOR ~/.config/herdr-push/config.toml # uncomment a service
herdr-push test # sends a test message to every service
herdr-push # follows herdr and notifiesBy default herdr-push follows every herdr it finds running (source = "auto"). Set source = "core" or source = "tui" to pick one.
| Event | When |
|---|---|
blocked |
an agent starts waiting for you: a permission, a question, a login |
done |
an agent finishes a turn. herdr reports a turn finished in the pane you are looking at as idle instead of done, so working → idle counts too |
error |
an agent reports an error |
Only changes notify. Starting herdr-push does not replay what is already on screen, and the same event for the same agent is quiet for cooldown seconds (default 10). A finished turn notifies only when the agent worked on it for at least min_working seconds (default 30, waiting for you included), so quick answers you watched come in stay quiet; blocked always notifies. Set min_working = 0 to hear about every turn. Each notification includes the last screen_lines lines of the agent's screen (default 8), so you can see what it asks. Set screen_lines = 0 for services you share with others, because the screen can show code or secrets.
Several services can be on at once, and each can take its own events (on = ["blocked"]). Secrets can come from the environment: token = "${TELEGRAM_BOT_TOKEN}".
- Message @BotFather, send
/newbot, and copy the token. - Send your new bot any message, then open
https://api.telegram.org/bot<token>/getUpdatesand copymessage.chat.id.
[[notify]]
type = "telegram"
token = "${TELEGRAM_BOT_TOKEN}"
chat_id = "123456789"
reply = true # optional, see belowGo to channel settings → Integrations → Webhooks → New Webhook, then copy the URL.
[[notify]]
type = "discord"
url = "${DISCORD_WEBHOOK_URL}"Create an app with an incoming webhook for a channel.
[[notify]]
type = "slack"
url = "${SLACK_WEBHOOK_URL}"Install the ntfy app and subscribe to a topic. On the public server anyone who knows the topic name can read it, so pick a long random one, or use your own server.
[[notify]]
type = "ntfy"
topic = "herdr-7f3c9a1e5b2d"
# server = "https://ntfy.example.com"
# token = "${NTFY_TOKEN}"blocked and error are sent with high priority.
Install Bark and copy your device key.
[[notify]]
type = "bark"
device_key = "${BARK_DEVICE_KEY}"
# server = "https://api.day.app"blocked and error are sent as time-sensitive.
herdr-push POSTs the event as JSON: event, headline, detail, source, address, app, title, where, kind, msg, screen and time. With secret set, the body is signed with HMAC-SHA256 in X-Herdr-Push-Signature: sha256=<hex>.
[[notify]]
type = "webhook"
url = "https://example.com/herdr"
secret = "${WEBHOOK_SECRET}"
headers = { Authorization = "Bearer ${HOOK_TOKEN}" }With reply = true on the Telegram service, a blocked notification comes with buttons: one per numbered choice on the agent's screen (1 · Yes, 2 · No, …), plus Esc and Read. A tap presses that key in the agent, the way you would at the keyboard, and the buttons go away. A choice only works while the agent still waits: tapped later, it does nothing, so it can't land in whatever the agent shows by then.
You can also reply to any notification to type into that agent and press Enter: 1, y, or a sentence.
In a reply:
/keys esc,/keys down enteror/keys ctrl+cpress keys/readshows the agent's screen now
Anywhere, /agents lists agents and their state.
Replies are a remote keyboard for your machine, so herdr-push limits them:
- They are off unless you set
reply = true. - Only messages from the configured
chat_idare read. Everything else is dropped unread. - A reply reaches only the agent its notification was about. A plain message reaches no agent.
- Messages sent while herdr-push was not running are skipped, so an old answer can't reach an agent that has moved on.
Anyone who can post in that chat can type into your agents. Use a private chat with your bot, not a group.
The link between a notification and its agent is kept in memory for the last 1,000 notifications. After a restart, reply to a newer notification.
macOS (launchd). Save this as ~/Library/LaunchAgents/dev.herdr-push.plist, then run launchctl load ~/Library/LaunchAgents/dev.herdr-push.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
<key>Label</key><string>dev.herdr-push</string>
<key>ProgramArguments</key><array><string>/opt/homebrew/bin/herdr-push</string></array>
<key>EnvironmentVariables</key><dict>
<key>PATH</key><string>/Users/YOU/.local/bin:/usr/bin:/bin</string>
</dict>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
<key>StandardErrorPath</key><string>/tmp/herdr-push.log</string>
</dict></plist>Use the path command -v herdr-push prints. PATH must include the folder where hc lives (the herdr app installer puts it in ~/.local/bin).
Linux (systemd user unit). Save this as ~/.config/systemd/user/herdr-push.service, then run systemctl --user enable --now herdr-push:
[Unit]
Description=herdr-push
[Service]
ExecStart=/home/linuxbrew/.linuxbrew/bin/herdr-push
Environment=PATH=%h/.local/bin:/usr/bin:/bin
Restart=always
[Install]
WantedBy=default.target- herdr app: herdr-push follows
hc events --json, which gives a snapshot and then one line per change. Agents report their state through OSC 7501. Replies go throughhc send(with--forcewhen the agent is blocked, so the text answers its dialog) andhc keys. - herdr TUI: herdr-push talks to the server socket (
~/.config/herdr/herdr.sock,HERDR_SESSIONorHERDR_SOCKET_PATH).- It subscribes to
pane.createdandpane.closed, pluspane.agent_status_changedfor every pane. A status subscription names one pane, so it subscribes again when panes come and go, and reconciles withsession.snapshot. - Replies use
pane.send_inputandpane.send_keys.
- It subscribes to
Remote machines that herdr-core manages show up like local ones, with addresses such as vps/t7.
This is early. The herdr app path is tested end to end against herdr-core 0.1.22: an agent that blocks, gets an answer through a reply, and finishes. The TUI path is tested against a fake server that follows the published herdr socket API (protocol 22). Reports from TUI users are very welcome.
Not supported yet:
- the TUI on native Windows (named pipe)
- replies from Discord and Slack, which need a bot connection instead of a webhook
- Ovis and herdr-mobile-relay: full phone and web clients with push.
- herdr-webhook-notify: webhook notifications as a herdr TUI plugin.
- herdr-telegram-agents: drive agents from Telegram topics, for the TUI.
Apache-2.0