V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
jakevin
V2EX  ›  Telegram

做了一个 tg-cli:把 Telegram 变成可本地检索、可供 AI Agent 使用的数据层

  •  
  •   jakevin · 2 天前 · 193 次点击

    做了一个 tg-cli:把 Telegram 变成可本地检索、可供 AI Agent 使用的数据层

    最近我把一个自己一直想要的工具整理出来了,叫 tg-cli

    一个基于 Telethon 的 Telegram CLI 。
    用你自己的 Telegram 账号把消息同步到本地 SQLite ,然后在终端里搜索、筛选、导出,也可以直接给 AI Agent 调用。

    项目地址:https://github.com/jackwener/tg-cli


    我为什么会做这个

    我平时 Telegram 用得很多,订阅群、技术群、频道、私有讨论都在里面。

    但 Telegram 有几个很明显的问题:

    1. 消息很多,但检索体验一般
    2. 很难做本地归档和二次分析
    3. 想把消息交给 AI 做总结、过滤、提取,经常要手动复制粘贴
    4. 想在 terminal 里快速看“今天都发生了什么”,没有一个顺手的方式

    所以我想做一个工具,目标不是再造一个聊天客户端,而是把 Telegram 变成:

    • 一个 local-first 的消息归档层
    • 一个 CLI 可操作 的查询层
    • 一个 适合 AI Agent 调用 的 retrieval interface

    它现在能做什么

    1. 同步 Telegram 消息到本地 SQLite

    用自己的 Telegram 账号登录后,可以把消息同步到本地数据库。

    tg chats
    tg history <chat>
    tg sync <chat>
    tg sync-all
    目前尚无回复
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1119 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 23:03 · PVG 07:03 · LAX 16:03 · JFK 19:03
    ♥ Do have faith in what you're doing.