Telegram 会话审查
- 作者仓库星标 0
- 作者仓库 telegram-personal
telegram-personal
Read-only access to a personal Telegram account via Telethon (MTProto API).
Setup
One-time: bash scripts/setup.sh (installs Telethon, runs interactive auth).
Requires api_id + api_hash from https://my.telegram.org → API Development.
Credentials stored at ~/.config/telegram-personal/credentials.json (mode 600).
Session file at ~/.config/telegram-personal/session.session.
CLI: scripts/tg.py
# List all conversations
tg dialogs [--limit N]
# Read messages from a chat (username, phone, or numeric ID)
tg read <chat> [--limit 20]
# Search across all chats (or one specific chat)
tg search "query" [--chat <name>] [--limit 20]
# Show unread DMs/groups with previews
tg unread [--limit 30]
# Download media from a message
tg download <chat> <msg_id> [-o dir]
# Export chat to markdown
tg export <chat> [--since 7d] [--limit 500] [-o file.md]
# Get info about a chat or yourself
tg info [chat]
Chat identifiers
Any of: @username, +phone, numeric ID (from tg dialogs), or chat title.
Safety
- Read-only — no send/delete commands
- Session file = full account access. Never expose it
- Telethon auto-handles FloodWait (sleeps on rate limits)
- Global search iterates dialogs (slower); prefer
--chatwhen possible
Integration with OpenClaw
From a skill or heartbeat, call via exec:
cd /path/to/telegram-personal && uv run tg search "keyword" --limit 10
cd /path/to/telegram-personal && uv run tg unread- 流狐分类
- 工程开发
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @000alen · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 One-time: bash scripts/setup.sh (installs Telethon, runs interactive auth). Requires apiid + apihash from https://my.telegram.org → API Development. Credentials stored at ~/.config/telegram-personal/credentials.json (mode 600).
CLI: scripts/tg.py
Any of: @username, +phone, numeric ID (from tg dialogs), or chat title.
Read-only — no send/delete commands Session file = full account access. Never expose it Telethon auto-handles FloodWait (sleeps on rate limits)
From a skill or heartbeat, call via exec:
# telegram-personal
Read-only access to a personal Telegram account via Telethon (MTProto API).
## Setup
One-time: `bash scripts/setup.sh` (installs Telethon, runs interactive auth).
Requires `api_id` + `api_hash` from https://my.telegram.org → API Development.
Credentials stored at `~/.config/telegram-personal/credentials.json` (mode 600).
Session file at `~/.config/telegram-personal/session.session`.
## CLI: `scripts/tg.py`
```bash
# List all conversations
tg dialogs [--limit N]
# Read messages from a chat (username, phone, or numeric ID)
tg read <chat> [--limit 20]
# Search across all chats (or one specific chat)
tg search "query" [--chat <name>] [--limit 20]
# Show unread DMs/groups with previews
tg unread [--limit 30]
# Download media from a message
tg download <chat> <msg_id> [-o dir]
# Export chat to markdown
tg export <chat> [--since 7d] [--limit 500] [-o file.md]
# Get info about a chat or yourself
tg info [chat]
```
## Chat identifiers
Any of: `@username`, `+phone`, numeric ID (from `tg dialogs`), or chat title.
## Safety
- **Read-only** — no send/delete commands
- Session file = full account access. Never expose it
- Telethon auto-handles FloodWait (sleeps on rate limits)
- Global search iterates dialogs (slower); prefer `--chat` when possible
## Integration with OpenClaw
From a skill or heartbeat, call via exec:
```bash
cd /path/to/telegram-personal && uv run tg search "keyword" --limit 10
cd /path/to/telegram-personal && uv run tg unread
``` 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Setup → CLI: scripts/tg.py → Chat identifiers → Safety → Integration with OpenClaw
要点 -> Read-only · Read-only access to a personal Telegram account via Telethon (MTProto API). · One-time: bash scripts/setup.sh (installs Telethon, runs interactive auth). · Requires apiid + apihash from https://my.telegram.org → API Development. · Credentials stored at ~/.config/telegram-personal/credentials.json (mode 600). · Any of: @username, +phone, numeric ID (from tg dialogs), or chat title. · - Read-only — no send/delete commands - Session file = full account access.
文件/命令 -> bash scripts/setup.sh · apiid · apihash · ~/.config/telegram-personal/credentials.json · ~/.config/telegram-personal/session.session · scripts/tg.py · @username · +phone
内容 SHA-256 -> e16912ca4b1e
原文结构
适用与边界
原文中的明确线索
bash scripts/setup.sh、apiid、apihash、~/.config/telegram-personal/credentials.json、~/.config/telegram-personal/session.session、scripts/tg.py、@username、+phone