Skip to main content

A minimal Telegram bot CLI for sending and reading messages

Project description

flaregram

A minimal command-line tool for interacting with Telegram via a bot token. List chats that have messaged your bot, read recent messages, and send new ones — all from your terminal.

Every command prints friendly, human-readable output by default and supports --format json for scripting.

Installation

# from PyPI
pip install flaregram

# or with uv
uv tool install flaregram

# straight from source
uv tool install git+https://github.com/MatthewScholefield/flaregram

Authentication

Grab a token from @BotFather and either pass it on every command with -t/--token, or export it once:

export TELEGRAM_BOT_TOKEN=123456:ABC-DEF

Commands

flaregram me

Verify the token and show the bot's identity.

flaregram me

flaregram chats

List chats that have recently messaged the bot (the easiest way to discover chat ids). Send a message to your bot first, then run:

flaregram chats
flaregram chats --format json

flaregram send

Send a text message to a chat.

flaregram send 555 "Hello there!"
flaregram send @channelusername "Announcement" --parse-mode HTML
flaregram send 555 "replying!" --reply-to 42 --silent

flaregram updates

Show recent messages the bot has received, optionally filtered to one chat.

flaregram updates
flaregram updates --chat-id 555 --limit 50
flaregram updates -c 555 -f json

flaregram chat

Show information about a specific chat.

flaregram chat 555
flaregram chat @channelusername

Global options

Option Description
-t, --token Bot token (or set $TELEGRAM_BOT_TOKEN)
-f, --format Output format: human (default) or json

Development

Built with uv and the uv_build backend.

uv sync          # install dev dependencies
uv run pytest    # run the test suite
uv build         # build sdist + wheel

License

MIT

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

flaregram-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

flaregram-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file flaregram-0.1.0.tar.gz.

File metadata

  • Download URL: flaregram-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for flaregram-0.1.0.tar.gz
Algorithm Hash digest
SHA256 62295b0e6669a9f998aa8fcb570095302df1fd3c8bc7e5ddc59702602ef2379c
MD5 9613d4fd2794bc21f676467273fa6b35
BLAKE2b-256 08149d35b03567f992069a10e96cfc75dea92bf815f659fbd146f05840d47fc9

See more details on using hashes here.

File details

Details for the file flaregram-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flaregram-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for flaregram-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42bd41f5a5b15b4bb6f22a2e53da211cf942530b83ae9a32bbcd2edb28bf5528
MD5 e7f723002af26590ae3220591fbd7a9a
BLAKE2b-256 269897ed74790b184d550fba254ac111b2f9b5b8ba5c1e0e43f3f0e8b5549b84

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