Skip to content

erayerdin/tgcli

Repository files navigation

tgcli

Latest Stable Release Latest Release Github Release Download Count License Docs Status

tgcli is a terminal app to send messages with bots on Telegram.

Master Development Format Coverage
Linux Linux Build Status on Master Linux Test Status on Master Linux Build Status on Development Linux Test Status on Development Format Status Coverage Report
MacOS MacOS Build Status on Master MacOS Test Status on Master MacOS Build Status on Development MacOS Test Status on Development
Windows Windows Build Status on Master Windows Test Status on Master Windows Build Status on Development Windows Test Status on Development

The details of the build status can be seen here. The details of the coverage report can be seen here.

Installing

The project is in active development and is in alpha phase. Before installing tgcli, please consider these:

  • There might be breaking changes on commands and behavior.
  • There might be unexpected and unwanted behavior.

Snap Store

The project is available on Snap Store. However, please consider that the project is alpha phase, installing it is a bit different:

sudo snap install tgcli --edge --devmode

--edge flag is used due to it is still in alpha phase and --devmode is used because tgcli requires networking in the confined environment.

Also, consider that the apps with on the edge channel on Snap Store is not updated automatically. So, if you want to get a new release, you need to uninstall first then reinstall it again.

sudo snap remove tgcli
sudo snap install tgcli --edge --devmode

Install with Guix

tgcli is available in official channel of Guix.

guix install tgcli

Rationale

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 with Rust.

Example

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 argument. If you set TELEGRAM_BOT_TOKEN environment variable, you do not need to set --token argument. Just set it before using tgcli:

export TELEGRAM_BOT_TOKEN="BotToken"

You can get more information by doing:

tgcli bot send --help

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

Documentation

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