Skip to main content

Single-shot CLI for sending text plus an optional image or video to Telegram.

Project description

tg-send

Python CLI for sending text plus an optional image or video to Telegram.

There is no bot polling loop, no MCP bridge, and no long-running server, just simple one-way messages.

Install

pip install tg-send

Or with pipx for an isolated install:

pipx install tg-send

Environment

Variable Required Description
TG_BOT_TOKEN yes Telegram bot token from @BotFather
TG_CHAT_ID yes Target chat ID or @channelusername

For a 1:1 bot chat, TG_CHAT_ID is your Telegram user id. For groups and channels, use the actual chat id instead.

Usage

tg-send --text "build finished"
tg-send --file ./render.png
tg-send --text "latest render" --file ./render.png

Behavior

  • At least one of --text or --file is required.
  • If --file is present, the tool auto-detects image vs video from the file extension.
  • Supported image extensions: .jpg, .jpeg, .png, .webp
  • Supported video extensions: .mp4, .mov, .m4v, .webm, .mkv, .avi
  • If --text is longer than Telegram's media caption limit, the file is sent first and the text is sent as follow-up messages.
  • The project has no runtime dependencies outside the Python standard library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tg_push-2.0.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tg_push-2.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file tg_push-2.0.0.tar.gz.

File metadata

  • Download URL: tg_push-2.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tg_push-2.0.0.tar.gz
Algorithm Hash digest
SHA256 71e66372478e3bd7b2ffe1b0575f92795c80ef9471de530783038d03cbda5560
MD5 b983e2e3e07997a7ae3c28f3d3495633
BLAKE2b-256 2d841a977ac49c678d8ffd41081d41cd74b74fb6ccee8a86f4e35f1090995d2f

See more details on using hashes here.

File details

Details for the file tg_push-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: tg_push-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tg_push-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a676458037e2a9cc3103905a95c4b5994e5780c9586eedfff463db1fd74d171
MD5 1a446990b24f2303cb113bd84999e35c
BLAKE2b-256 9a23d13a6f92b56b156a50e570b47358e7c6fb5e8e7fc3a481b13070d8855bcc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page