← 返回
沟通协作 Key

Telegram Readonly

Read 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, rea...
通过 Telethon/MTProto 以受控只读方式访问用户 Telegram 账户,用于查看聊天内容、获取对话列表等操作。
ropl-btc
沟通协作 clawhub v0.1.2 1 版本 99816.2 Key: 需要
★ 0
Stars
📥 543
下载
💾 7
安装
1
版本
#latest

概述

Telegram Readonly

Use 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.

Quick rules

  • Use this skill only for reads.
  • Do not improvise write actions.
  • Do not add send/edit/delete logic to the wrapper unless the user explicitly asks.
  • Treat the Telethon session like a high-privilege secret.
  • Assume unread preservation is best-effort until tested on a real chat.

Installation preference

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

Commands

Show built-in help

telegram-readonly help

Authenticate once

export TELEGRAM_API_ID='12345678'
export TELEGRAM_API_HASH='your_api_hash'
telegram-readonly auth

List chats

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

Read recent messages

telegram-readonly messages --chat '@username' --limit 50 --reverse

Search messages

telegram-readonly search 'invoice' --limit 50

Restrict search to one chat:

telegram-readonly search 'deadline' --chat '@username' --limit 50

List recent unread chats

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

List recent unread DMs only

telegram-readonly unread-dms --limit 10

Workflow

  1. Read references/setup-and-safety.md if setup, auth, or unread-state behavior matters.
  2. Ensure the telegram-readonly CLI is installed.
  3. Ensure Telegram API credentials exist.
  4. Run auth once to create the session.
  5. Use dialogs, messages, search, unread-dialogs, or unread-dms as needed.
  6. Keep usage narrow and intentional.

Expected outputs

The wrapper returns JSON. Parse it instead of relying on fragile text scraping.

Dialog objects include:

  • is_user
  • is_group
  • is_channel
  • is_bot
  • archived
  • muted
  • unread counters

Files

  • Package repo: https://github.com/ropl-btc/telegram-readonly-cli
  • Compatibility wrapper: scripts/telegram_readonly.py
  • Setup notes: references/setup-and-safety.md
  • Config storage: ~/.config/telegram-readonly/config.json

When to stop and ask

Stop and ask before:

  • adding write capabilities
  • enabling any background watcher/daemon
  • broad exporting of large chat histories
  • changing how secrets/session storage works

版本历史

共 1 个版本

  • v0.1.2 当前
    2026-03-20 02:30 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,411
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,678
developer-tools

twitterapi-io-cli

ropl-btc
使用 twitterapi.io 获取并分页 Twitter/X 数据。适用于需要获取单条推文、用户资料、用户的最新推文、回复等场景。
★ 0 📥 469