teli

Telegram bot toolkit — named connections, personal accounts, CLI & Python API

Install

# Base install
pip install teli-lib

# With personal account support (Telethon)
pip install "teli-lib[user]"

Bot setup

Use a bot token from @BotFather.

1

Register the bot

teli add mybot --token 123456:ABC...
2

Discover your chat_id

teli listen mybot
# Send /start to the bot in Telegram → your chat_id appears here
3

Send a message via the bot

teli send mybot 987654321 "Hello from teli!"

Personal account setup

Send messages from your own Telegram account — no bot involved. Requires API credentials from my.telegram.org.

1

Register your account

teli user add me --api-id 12345678 --api-hash abc123...
2

Authenticate (once)

teli user connect
# Telegram sends a code to your phone — enter it here
3

Send your first message

teli user send Luganense "Hola!"
teli user send @username "Hola!"
teli user send 987654321 "Hola!"
Recipient formats: display name, @username, or numeric chat_id — all work.

Check everything

teli status

Bot connections:
  mybot                  token=123456:ABC...  chats=all

User accounts:
  me                     api_id=12345678 (default)

Claude Code skill

Install a skill so Claude knows how to use teli without you having to explain it every time:

teli install-skill
# Installed to ~/.claude/skills/teli/SKILL.md
# Restart Claude Code — then invoke with /teli
The skill auto-describes all commands, recipient formats, and when to use user accounts vs bot connections. Re-run after pip install --upgrade teli-lib to keep it current.

All commands at a glance

teli status                                    Show all connections + accounts
teli add <name> --token TOKEN                  Register a bot
teli list                                      List bot connections
teli remove <name>                             Remove a bot
teli send <name> <chat_id> <message>          Send via bot
teli listen <name> [--webhook URL]             Long-poll incoming messages
teli whoami <name>                             Get bot identity

teli user add <name> --api-id ID --api-hash H  Register personal account
teli user accounts                             List personal accounts
teli user connect [name]                       Authenticate (once)
teli user send <recipient> <message>           Send from your account
teli user listen --bot <bot_username>          Listen for bot messages

teli install-skill                             Install Claude Code skill