电报个人
- 作者仓库星标 0
- 作者仓库 telegram-personal
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @000alen · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# 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
```
章节与文件索引
按说明文件中的顺序排列。
设置
聊天标识符
安全
与 OpenClaw 集成
文件/命令 -> bash scripts/setup.sh · api_id · api_hash · ~/.config/telegram-personal/credentials.json · ~/.config/telegram-personal/session.session · scripts/tg.py · @username · +phone
内容校验值 -> e16912ca4b1e
当前原文的自动摘译,尚未人工审校。
设置
一次性:
bash scripts/setup.sh(安装 Telethon,运行交互式身份验证)。需要 https://my.telegram.org → API 开发中的api_id+api_hash。凭证存储在~/.config/telegram-personal/credentials.json(模式 600)。会话文件位于~/.config/telegram-personal/session.session。聊天标识符
任意:
@username、+phone、数字 ID(来自tg dialogs)或聊天标题。安全
只读 — 无发送/删除命令 会话文件 = 完全帐户访问权限。永远不要公开它 Telethon 自动处理 FloodWait(在速率限制下休眠) 全局搜索迭代对话框(较慢);如果可能的话更喜欢
--chat与 OpenClaw 集成
从技能或心跳中,通过 exec 调用: