telegram-owl logo

telegram-owl Alexander Tebiev

Use this command to install telegram-owl:
winget install --id=beeyev.telegram-owl -e

CLI utility to send messages and media files to Telegram chats and channels β€” directly from your terminal

Telegram Owl is a lightweight command-line interface (CLI) utility designed to send messages and media files directly to Telegram chats and channels from your terminal.

Key Features:

  • Send text messages with optional markdown or HTML formatting.
  • Attach multiple files and automatically detect their type, or force them as documents.
  • Enable silent notifications to avoid disturbing recipients.
  • Protect messages by disabling forwarding and saving capabilities.
  • Post to forum thread topics in supergroups for organized discussions.

Audience & Benefit:
Ideal for DevOps engineers, developers, and anyone needing to automate Telegram notifications from scripts, cron jobs, CI/CD pipelines, or monitoring tools. It offers a seamless way to send deployment alerts, logs, reports, or media without leaving your terminal.

Telegram Owl is fast, cross-platform (Windows, Mac, Linux), and written in Go for efficiency. It can be installed via winget, making it easy to integrate into your workflow.

README

Telegram Owl πŸ¦‰

> πŸ“£ Use it to send deployment notifications, alerts, logs, reports, or media β€” from scripts, cron jobs, CI/CD pipelines, monitoring tools, or any shell environment.

Whether you're a DevOps engineer automating infrastructure, a developer managing CI/CD pipelines, or just want to notify your Telegram group from a terminal script β€” Telegram Owl gives you a simple and script-friendly way to do it.


✨ Features

  • πŸ“¨ Send text messages
  • πŸ“Ž Attach multiple files
  • πŸ”• Silent messages (no notification sound)
  • πŸ›‘οΈ Protect messages (disable forwarding/saving)
  • πŸ“Έ Automatic media type detection (or force as document)
  • 🧡 Send to forum thread topics
  • πŸ“€ Read input from stdin
  • πŸ“Œ Set environment variables for easy usage
  • 🐧 Cross-platform support (Windows, Mac, Linux)
  • πŸš€ Fast and lightweight (written in Go)

πŸ“¦ Installation

macOS and Linux

Install with Homebrew

brew tap beeyev/pkg https://github.com/beeyev/pkg
brew install telegram-owl

Windows

Install with Scoop

scoop bucket add beeyev https://github.com/beeyev/pkg
scoop install telegram-owl

Install with winget

winget install telegram-owl

Binary Releases

For Windows, Mac OS(10.12+) or Linux, you can download a binary release here.

πŸš€ Usage

To start using Telegram Owl, you need to obtain a Telegram bot token and chat ID. You can learn how to get it here.

telegram-owl \
  --token  \
  --chat  \
  [--message "your message"] \
  [--attach file1,file2,...] \
  [options]

πŸ” Required Flags

FlagDescriptionEnvironment Variable
--token, -tTelegram bot tokenTELEGRAM_OWL_TOKEN
--chat, -cChat ID or @usernameTELEGRAM_OWL_CHAT

βš™οΈ Common Flags

FlagDescription
--message, -mText message to send
--format, -fMessage format options, possible values: markdown, html
--stdinRead message content from stdin
--attach, -aAttach files (comma-separated or multiple flags)
--as-document, -dForce all files to be sent as documents
--silent, -sSend silently (no notification sound)
--spoilerHide media with spoiler animation
--protectPrevent forwarding and saving of content
--no-link-previewDisable automatic link previews in messages
--threadThread ID for forum supergroup topics

πŸ“Œ Examples

βœ… Send a Simple Message

telegram-owl -t $BOT_TOKEN -c @mychannel -m "Server status: OK βœ…"

πŸ“ Send a Message with Markdown formatting

telegram-owl -t $BOT_TOKEN -c 123456 --format=markdown -m "*Bold text* via Markdown"

πŸ“ Send a Message with HTML formatting

telegram-owl -t $BOT_TOKEN -c 123456 --format=html -m '<b>Bold text</b> via HTML and <a href="http://www.example.com/">inline URL</a>'

> Message formatting is supported for both markdown and html formats. But it does not work when text and files are sent together.

πŸ“Ž Send Files with a Message

telegram-owl -t $BOT_TOKEN -c 123456 \
  -m "Daily report attached" \
  -a report.pdf,screenshot.png

πŸ”• Send a Protected, Silent Message

telegram-owl -t $BOT_TOKEN -c 123456 \
  -m "Confidential: Project roadmap" \
  --silent --protect

πŸ“€ Pipe Message from File or Command

cat message.txt | telegram-owl -t $BOT_TOKEN -c @devs --stdin

🧡 Post in a Forum Thread

telegram-owl -t $BOT_TOKEN -c @forumgroup --thread 67890 -m "New bug report 🐞"

βš™οΈ Configuration

Set environment variables to simplify usage:

export TELEGRAM_OWL_TOKEN="123:abc"
export TELEGRAM_OWL_CHAT="112451"
export TELEGRAM_OWL_THREAD="67890"

πŸ“ Attachment Limits

Limit TypeValue
Max attachments10 files
Max photo size10 MB
Max file size50 MB
Max total size per send50 MB total

🐞 Found a Bug or Want a Feature?

Feel free to open an issue on GitHub.

Β© License

The MIT License (MIT). Please see License File for more information.


If you like this project, please consider giving me a ⭐

Versions
1.3.3
1.3.1
Website
License