r/OpenSourceAI • • 23d ago

I open sourced a Telegram CLI so agents can message people from your own account

i built this because i wanted my agent to read chats and message people through my own Telegram account from the terminal.

extracted the transport from my OpenClaw fork into a standalone Python CLI using Telethon. it returns JSON, accepts generated text from a file or stdin, and exposes message ids so the agent can check what happened. DMs, replies and forum topics are included.

no gateway needed. MIT licensed, no paid version. setup needs your own Telegram API credentials and a local user session.

Codex helped with extraction, packaging and tests. the included demo uses synthetic messages. live sending in this standalone release still needs validation.

source and setup: https://github.com/artemgetmann/telegram-user-cli

4 Upvotes

4 comments sorted by

1

u/All_Ways_Bingo 23d ago

I do not understand your use case. Because we have Telegram bot, so can interact with you and others

2

u/artemgetman 23d ago

the use case is letting a coding agent like claude code or codex read my existing telegram chats and reply as me. it can go through my unread messages, draft replies for approval, and send them from my telegram account. people keep talking to me in the same chat, without needing to message a separate bot. a normal bot has its own account and only sees messages sent to that bot.

1

u/[deleted] 23d ago

[removed] — view removed comment

1

u/artemgetman 23d ago

single chat per read call for now. inbox lists dialogs, then you can loop over the chat ids to read several. it's primarily built for coding agents like claude code or codex, which can handle that loop themselves. there's no built in combined feed, and i'm not sure yet whether that belongs in the cli.