Full-featured Telegram client for the terminal, built with Python + Telethon + Textual.
pip install git+https://github.com/eveiljuice/tg-cli.gitcurl -fsSL https://raw.githubusercontent.com/eveiljuice/tg-cli/master/install.sh | bashpipx install git+https://github.com/eveiljuice/tg-cli.gitgit clone https://github.com/eveiljuice/tg-cli.git
cd tg-cli
pip install .Before using tg-cli, you need api_id and api_hash from Telegram:
- Go to my.telegram.org
- Log in with your phone number
- Click API development tools
- Fill in the form (app title:
tg-cli, platform: Desktop) - Click Create application
- Copy your
api_idandapi_hash
Set credentials via environment variables:
export API_ID=12345678
export API_HASH=abcdef1234567890Or create a .env file:
API_ID=12345678
API_HASH=abcdef1234567890
Or just run tg-cli — it will prompt on first launch and save to ~/.tg-cli/config.toml.
tg-cli| Key | Action |
|---|---|
Tab |
Switch between panels |
Enter |
Select chat / Send message |
Ctrl+S |
Search chats |
Ctrl+Q |
Quit |
PgUp/PgDn |
Scroll messages |
- Python 3.11+
MIT