anotifier / telegram

Telegram alerts for Claude Code & friends.

Telegram is already on your phone and desktop. anotifier has a @BotFather bot message you directly the moment Claude Code, Codex, Cursor, or Gemini CLI finishes or stops for input.

$ npx anotifier@latest setup
[ SET UP TELEGRAM ]

Wired up in a minute.

There's no server to run — anotifier just POSTs to Telegram's sendMessage endpoint, and your bot delivers the alert straight to your chat.

@BotFatherMessage @BotFather in Telegram to create a bot and grab its token, then send your bot a message so it's allowed to reply to you.
chat idFind your numeric chat id and note it — the bot DMs you directly at that id.
configAdd the block below to ~/.anotifier/config.json with format telegram, your bot token in the URL, and your chatId.
testRun anotifier test webhook to send yourself a sample message.
[ CONFIG ]

One block in your config.

anotifier reads a single JSON file at ~/.anotifier/config.json. Drop this in and every supported agent uses it.

{
  "webhook": {
    "enabled": true,
    "url": "https://api.telegram.org/bot<token>/sendMessage",
    "format": "telegram",
    "chatId": "123456789"
  }
}

Need auth? Add "authorization": "Bearer <token>" to the webhook block and anotifier sends it as the Authorization header.

[ SAFE BY DEFAULT ]

Your webhook is a secret, and stays one.

[+] Secrets stay secret Webhook URLs and bot tokens are never logged in full — only the URL's origin is recorded on failure.
[+] Never in the way Delivery errors go to ~/.anotifier/errors.log and never interrupt or slow the agent.
[+] Per-event off switch Silence a single event with events.task_complete.webhookEnabled: false.
[+] Rich Claude Code content Webhooks can carry what Claude actually said; other agents get generic text.
[ FAQ ]

Telegram questions, answered.

How do I set up Telegram alerts for Claude Code?

Create a bot with @BotFather to get a token, find your chat id, then add both to ~/.anotifier/config.json with format: "telegram". anotifier messages you whenever an agent finishes or needs input.

Do I need to host a Telegram bot server?

No. There's nothing to run — anotifier simply POSTs to Telegram's sendMessage URL, and the bot delivers the message to your chat. No polling, no webhook receiver.

Is my bot token safe?

Your bot token lives inside the request URL, which anotifier treats as a secret — it's never logged in full, only the origin is recorded on failure, and errors land in ~/.anotifier/errors.log.

Which agents can send to Telegram?

Every supported agent shares the same config — Claude Code, Codex CLI, Cursor, Gemini CLI, and VS Code agents all message the same Telegram chat.

[ WORKS WITH EVERY AGENT ]

One config, every agent.

anotifier routes the same Telegram notification from every agent it supports:

[ ALSO SEND TO ]

Prefer a different destination?

anotifier can post the same alerts to slack, discord, or phone push.

Every config key for this channel is in the docs.

Full feature tour, demo video, and install options on the anotifier home page.