The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Telegram Search
导出并模糊搜索 Telegram 聊天记录 | Export and fuzzy search your Telegram chat history
Install
brew install groupultra/telegram-search/tg-searchInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →[立即体验] [English] [日本語]
[!TIP] 是否曾因 Telegram 无法搜索中文聊天记录而困扰?
或者想查找一条重要消息,却被海量消息淹没,难以定位?
有了 Telegram Search,您可以便捷地备份并检索自己的 Telegram 消息。无论任何语言,强大的本地分词能力都能准确命中。
支持向量搜索,实现句子智能模糊匹配,查找信息更快速精准。
更多 AI 驱动场景,支持未读消息智能摘要、AI 助手对话等丰富功能体验。
💖 赞助者
✅ 功能亮点
📦 导出与备份
- 支持多种数据库导出聊天记录:兼容 PGlite 与 PostgreSQL
- 媒体资源可自动备份至 MinIO 对象存储,无需手动干预
- 消息导出时自动完成向量嵌入与分词处理,助力后续精准检索
- 实时同步,自动拉取并更新最新对话内容
🔍 聊天记录搜索
- 自动智能分词,支持多语言精准检索
- 融合模糊匹配与向量语义搜索,查找效率更高
- 图片语义搜索:支持图片 embedding,以文搜图
- 搜索结果无限滚动,浏览体验更流畅
- RAG 智能问答:直接与 AI 聊天,基于历史上下文获得实时解答
🤖 Telegram Bot
- 通过 Bot 搜索和导出消息
- 消息 deep link 跳转,一键定位原始对话
🚀 高级功能
- 未读消息智能摘要:一键汇总全部未读消息,自动生成精炼摘要,重点内容一目了然
- 日期范围筛选,快速缩小搜索范围
- 右键菜单跳转 Telegram 原消息,支持移动端
🛣️ 路线展望
🧠 AI 能力增强
- 自动生成会话总结
- “超级大脑”:基于历史消息,自动构建人物与事件的知识图谱
🔗 媒体与链接拓展
- 智能整理"已保存消息"收藏夹,提升内容管理效率
- 链接与图片深度索引:网页摘要、图片 OCR 文字识别及智能描述,助力搜索与归档
🌐 多平台融合
- 跨平台扩展:支持 Discord 及其他主流社交/通讯平台,实现统一检索与备份
🎉 立即使用
我们提供了一个在线体验版,无需自行部署,即可体验 Telegram Search 的全部功能。
访问以下网址开始使用:https://search.lingogram.app
[!WARNING] 本项目未发行任何虚拟货币,请警惕相关诈骗风险。
本软件仅供您导出和检索个人聊天记录使用,切勿将其用于任何违法用途。
🚀 快速开始
Agent / CLI 模式
仓库现在提供本地优先的 TypeScript CLI。用户只需为命名 profile 完成本地登录,Agent 即可自行组合命令决定是否拉取、拉取哪些会话,以及何时显式同步。
通过 Homebrew 安装(macOS / Linux)
Homebrew 会安装 CLI 及其 Node.js 运行时依赖,无需手动安装 Node.js 或构建仓库。此安装方式提供本地 CLI 和 daemon;网页界面的部署方式见下方 Docker 说明。
brew tap groupultra/telegram-search https://github.com/groupultra/telegram-search
brew install groupultra/telegram-search/tg-search
tg-search profile configure --apiId YOUR_API_ID --apiHash YOUR_API_HASH
tg-search auth login
brew services start groupultra/telegram-search/tg-search
tg-search daemon status
API ID 和 API Hash 可在 my.telegram.org 获取。以上命令使用 default profile,先完成登录再启动服务。请以当前用户运行 brew services,不要使用 sudo。服务在后台保持 Telegram 连接,并在用户登录系统后启动;登录 Telegram 后会持续保存新消息及其编辑、删除更新。批量历史同步仍需显式运行 sync --takeout。
brew services stop groupultra/telegram-search/tg-search
brew upgrade groupultra/telegram-search/tg-search
brew services restart groupultra/telegram-search/tg-search
升级保留 profile 数据。日志位于 default profile 目录中的 daemon.stdout.log 和 daemon.stderr.log,由 daemon 轮转。其他命名 profile 可通过 tg-search --profile NAME daemon run 启动,详细路径和命令见 CLI 文档。
从源码构建
pnpm run build:packages
pnpm -F @tg-search/cli build
pnpm cli --profile work profile configure --apiId 123456 --apiHash abcdef
pnpm cli --profile work auth login
pnpm cli --profile work chats list --json
pnpm cli --profile work sync --takeout --chat 123456 --from 2026-01-01 --to 2026-12-31 --json
pnpm cli --profile work export --from 2026-01-01 --to 2026-12-31 --output ./telegram-2026 --json
chats list 和 messages list 只做有界的远端读取,不持久化消息。批量同步必须先征得用户同意,并由 Agent 在 sync 命令中显式加入 --takeout;未授权、用户拒绝或 Takeout 初始化失败都会停止,不会退回普通 GetHistory。文本同步只申请所选会话类别,不申请联系人或文件导出权限。同步结果写入 profile 独立的 PGlite。CLI 默认输出便于阅读的文本;Agent 调用显式加入 --json,让 stdout 只包含稳定的 JSON envelope。Telegram 日志、提示与进度写入 stderr。导出包含按月 JSONL 和校验清单,不包含媒体二进制、登录 session、向量或密钥,也不会替用户执行 AI 总结。
完整命令与隐私边界见 packages/cli/README.md。
使用 Docker Compose
- 新建一个空目录,用于存放 Telegram Search 的配置和数据:
mkdir telegram-search
cd telegram-search
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.