Send and receive Telegram messages from a terminal or SSH session on a headless Linux server.
Automate Telegram messaging from a server script using the command-line interface without a graphical app.
Use Telegram secret chats with end-to-end encryption from a Linux server environment.
Must compile from source with readline and OpenSSL, no binary releases provided. Project has not had active development in several years.
This project is a command-line client for Telegram, the messaging app. Instead of opening a phone app or a browser window, you run a program in your terminal and interact with your Telegram account by typing commands. It uses the readline interface, which means it supports tab completion (to fill in contact names) and command history (to scroll back through previous commands). The client lets you send and receive messages, forward messages, create and manage group chats, send photos and videos, search through message history, and use Telegram's secret chat feature (which provides end-to-end encryption with a visual key comparison for verification). It connects to Telegram's servers using the MTProto protocol, which is Telegram's own encrypted transport layer. To get it running, you clone the repository and compile it from source. The build process uses a standard configure-and-make approach and requires a few system libraries: readline for the terminal interface, OpenSSL for encryption, and optionally libconfig, Lua, Python, and libjansson for additional features. Installation instructions are provided for Ubuntu, Debian, Fedora, Arch Linux, Gentoo, FreeBSD, OpenBSD, openSUSE, and macOS via Homebrew or MacPorts. Once running, you pass a public server key file and then type commands at the prompt. Commands follow a consistent pattern: the command name, then the target peer (a contact or chat), then any additional arguments. For example, sending a message is msg ContactName Hello there. File transfers, group management, and secret chats all follow the same structure. This client predates Telegram's official desktop and terminal clients and appears to be an early independent implementation. The repository has not had active development in several years. The code is written in C and released under the GPLv2 license.
← vysheng on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.