Install
openclaw skills install telegram-readonlyRead the user's personal Telegram account in a controlled, read-only way via Telethon/MTProto. Use when you need to inspect Telegram chats, list dialogs, read recent messages from a specific chat, or search Telegram messages without relying on the Telegram Bot API. Do not use for sending, replying, editing, deleting, or any write action.
openclaw skills install telegram-readonlyUse the installed telegram-readonly CLI for Telegram reads from the user's personal account.
This skill exists because Telegram Bot API is the wrong tool for reading a real personal account. Use MTProto via Telethon instead.
Prefer an installed CLI over hardcoded script paths.
Preferred install:
pipx install git+https://github.com/ropl-btc/telegram-readonly-cli.git
Fallback inside a repo checkout:
pip install .
After install, use:
telegram-readonly
telegram-readonly help
export TELEGRAM_API_ID='12345678'
export TELEGRAM_API_HASH='your_api_hash'
telegram-readonly auth
dialogs --query does token-based matching across name, username, and title, so queries like petros skynet work even when the exact full string is not present as one substring.
telegram-readonly dialogs --limit 50
telegram-readonly messages --chat '@username' --limit 50 --reverse
telegram-readonly search 'invoice' --limit 50
Restrict search to one chat:
telegram-readonly search 'deadline' --chat '@username' --limit 50
Default behavior is opinionated: exclude muted and archived chats.
telegram-readonly unread-dialogs --limit 10
Include muted and/or archived when needed:
telegram-readonly unread-dialogs --limit 10 --include-muted --include-archived
telegram-readonly unread-dms --limit 10
references/setup-and-safety.md if setup, auth, or unread-state behavior matters.telegram-readonly CLI is installed.auth once to create the session.dialogs, messages, search, unread-dialogs, or unread-dms as needed.The wrapper returns JSON. Parse it instead of relying on fragile text scraping.
Dialog objects include:
is_useris_groupis_channelis_botarchivedmutedhttps://github.com/ropl-btc/telegram-readonly-cliscripts/telegram_readonly.pyreferences/setup-and-safety.md~/.config/telegram-readonly/config.jsonStop and ask before: