tgcli is a client tool for Telegram.

telegram, messaging, communication, terminal, tool, cli, python, telegram-bot
pip install tgcli==0.4.0rc4



PyPI - Version PyPI - Downloads Last Month PyPI - Python Versions PyPI - License Docs Status Code Style

tgcli is a Python cli app for Telegram.

Build Coverage
Master Master Build Master Coverage
Development Development Build Development Coverage


pip (No auto-update)

Install via pip:

pip install tgcli

tgcli (Auto-update, Arch-based)

Also available as a package in AUR.

# assuming you use yay
yay -S tgcli


A similar project, built on Python, was created by @vysheng, but it has not been updated since 2016 and considered abandoned. This tool is not a fork of the mentioned project, it is built from ground up.


For now, the use case is pretty simple. To send a message:

tgcli bot --token "BotToken" send --receiver "UserID" message "Your message"

You don't need to expose your token as flag. If you set TELEGRAM_BOT_TOKEN environment variable, you do not need to set --token flag. Just set it before using tgcli:

export TELEGRAM_BOT_TOKEN="BotToken"

You can get more information by doing:

tgcli bot send --help

Also, this repository uses notification from a private bot, you can see the example Travis configuration here. Private TELEGRAM_BOT_TOKEN and TELEGRAM_RECEIVER environment variables were set.

This application serves a really small purpose for now. It might face breaking changes in the future.


Documentation has an intensive amount of information about how to use tgcli. Refer to the documentation.