DEV Community

Beeyev
Beeyev

Posted on

πŸ“¦ telegram-owl β€” Telegram CLI for Scripts, Alerts, and CI/CD

Send Telegram messages from bash, PowerShell, CI/CD pipelines, cron jobs β€” quickly and effortlessly.


What is telegram-owl?

telegram-owl is a cross-platform CLI tool written in Go that allows you to send messages, files, and media to Telegram chats, groups, or channels directly from the terminal.

It's perfect for:

βœ… DevOps notifications

βœ… CI/CD pipeline messages

βœ… Monitoring and alerting (cron, systemd, Prometheus)

βœ… Just sending a log or file to Telegram from a script


Quick Example

telegram-owl \
  --token=123:abc \
  --chat=@mychannel \
  --message="βœ… Deployment completed successfully!"
Enter fullscreen mode Exit fullscreen mode

Send a message from stdin:

echo "πŸ”₯ Server is down!" | telegram-owl --stdin --token=... --chat=...
Enter fullscreen mode Exit fullscreen mode

Attach files:

telegram-owl --attach=log.txt --attach=report.pdf --token=... --chat=...
Enter fullscreen mode Exit fullscreen mode

Key Features

  • Supports Markdown / HTML formatting (--format)
  • File and media attachments (--attach)
  • Thread/topic support for supergroups (--thread)
  • Silent messages (--silent)
  • Protected content (--protect)
  • Spoiler effect for media (--spoiler)
  • Accepts messages from stdin
  • Cross-platform: Linux, Windows, macOS

Installation

πŸ›  Supported install methods:

download from GitHub Releases:
https://github.com/beeyev/telegram-owl/releases


Getting Started

πŸ”‘ Get a bot token via @BotFather

πŸ” Get the Chat ID using /getUpdates or by copying a message link from Telegram

Full guide here:

πŸ“– https://github.com/beeyev/telegram-owl/blob/master/docs/HowToTelegramBot.md


Usage Examples

Send a formatted Markdown message:

telegram-owl --message="*Bold* _Italic_" --format=markdown ...
Enter fullscreen mode Exit fullscreen mode

Where is it useful?

  • Deployment scripts
  • Jenkins, GitHub Actions, GitLab CI
  • Monitoring tools (Prometheus Alertmanager, systemd)
  • Cron jobs
  • Backups, automation, and server notifications

πŸ“¬ Final Thoughts

telegram-owl is a simple way to integrate Telegram into your notification system. No dependencies, cross-platform, and fast.

View the project on GitHub β†’

Top comments (0)