diff --git a/README.md b/README.md index f0d68a9..193ccdc 100644 --- a/README.md +++ b/README.md @@ -1,85 +1,34 @@ # 👁️ Agent Eyes -**让你的 AI Agent 看见整个互联网。** +**一行命令,让你的 AI Agent 看见整个互联网。** -Agent Eyes 是一个开源的粘合剂项目。它把互联网上最强的几个开源工具整合到一起,让你的 Agent 一次安装就获得所有能力。 +你的 AI Agent 很聪明,但几乎是个瞎子。Reddit 封 IP、Twitter API 要 $100/月、B站屏蔽服务器、小红书需要登录——每个平台都有自己的坑,你要一个一个去踩。 -> 我们不重复造轮子。我们找到每个领域最好的轮子,然后把它们装到你的 Agent 上。 +Agent Eyes 把互联网上最好的开源工具粘在一起,一次安装全部搞定: + +| 工具 | 它解决了什么 | Stars | +|------|------------|:-----:| +| [Jina Reader](https://github.com/jina-ai/reader) | 任意网页 → 干净 Markdown,处理 JS 渲染,去掉广告 | ⭐ 9.8K | +| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | **1800+ 个视频网站**的字幕提取(YouTube、B站、TikTok…) | ⭐ 148K | +| [Exa](https://exa.ai) | AI 语义搜索引擎,一个 Key 搜全网 + Reddit + Twitter | — | +| [birdx](https://github.com/runesleo/birdx) | 不花 $100/月,用 Cookie 就能搜 Twitter 时间线和线程 | — | +| [feedparser](https://github.com/kurtmckee/feedparser) | 万能 RSS/Atom 解析 | ⭐ 2.3K | + +> 不造轮子,只做胶水。统一安装、统一配置、统一接口。 [English](docs/README_en.md) --- -## 我们整合了什么 - -每个平台背后都是一个久经考验的开源项目。Agent Eyes 只是把它们粘在一起,让你一行命令就能全部用上。 - -### 🌐 Jina Reader — 把任意网页变成干净文本 - -[Jina Reader](https://github.com/jina-ai/reader)(⭐ 9.8K)能把任意 URL 转成 LLM 友好的 Markdown。不是简单的爬虫——它能处理 JavaScript 渲染的页面、去掉广告和导航栏、只留下正文内容。Agent Eyes 用它来读取所有网页。 - -```bash -agent-eyes read "https://任意网页" -``` - -### 📺 yt-dlp — 从 1800+ 个视频网站提取字幕 - -[yt-dlp](https://github.com/yt-dlp/yt-dlp)(⭐ 148K)是互联网上最强的视频下载工具,支持 **1800+ 个视频网站**——不只是 YouTube,还有 B站、Twitch、TikTok 等等。Agent Eyes 用它来提取视频字幕,让 Agent 能"看"视频内容。 - -```bash -agent-eyes read "https://www.youtube.com/watch?v=xxx" -agent-eyes read "https://www.bilibili.com/video/BVxxx" -``` - -### 🔍 Exa — AI 原生的语义搜索引擎 - -[Exa](https://exa.ai) 不是传统的关键词搜索——它用神经网络理解你搜索的**语义**,找到真正相关的内容。一个免费 Key(1000 次/月),同时解锁全网搜索、Reddit 搜索和 Twitter 搜索。 - -```bash -agent-eyes search "2025年最适合个人开发者的 AI 工具" -agent-eyes search-reddit "best self-hosted LLM" --sub LocalLLaMA -agent-eyes search-twitter "AI agent 实战" -``` - -### 🐦 birdx — 无需 API,用 Cookie 玩转 Twitter - -[birdx](https://github.com/runesleo/birdx) 让你不需要 Twitter API Key(那个贵得离谱),只要浏览器 Cookie 就能搜索时间线、读完整线程、浏览任何用户的推文。 - -```bash -agent-eyes read "https://x.com/elonmusk/status/xxx" # 读推文 -agent-eyes search-twitter "Claude Code tips" # 搜推特 -``` - -### 📡 feedparser — 万能 RSS 阅读器 - -[feedparser](https://github.com/kurtmckee/feedparser)(⭐ 2.3K)是 Python 世界的 RSS/Atom 解析标准,能处理几乎任何格式的订阅源。 - -```bash -agent-eyes read "https://hnrss.org/frontpage" # Hacker News -agent-eyes read "https://rsshub.app/github/trending/daily" # GitHub Trending -``` - -### 📺 Bilibili API — B站视频信息 + 字幕 - -直接调用 B站公开 API,提取视频标题、描述、字幕。本地电脑直接可用,服务器需要代理。 - -### 📕 小红书 — Cookie 一配就能读 - -配好 Cookie 后可以读取小红书笔记的完整内容和评论。 - ---- - ## 30 秒上手 -把这句话复制给你的 AI Agent: +复制给你的 AI Agent(Claude Code、OpenClaw、Cursor 等): ``` 帮我安装 Agent Eyes:https://raw.githubusercontent.com/Panniantong/agent-eyes/main/docs/install.md ``` -> 💡 打开你的 Agent 对话框(Claude Code 终端、OpenClaw 聊天、Cursor Chat),直接粘贴就行。 - -Agent 会自动装好,告诉你哪些功能已经可以用。 +Agent 自动安装、检测环境、告诉你哪些功能已经可以用。
手动安装 @@ -87,137 +36,142 @@ Agent 会自动装好,告诉你哪些功能已经可以用。 ```bash pip install https://github.com/Panniantong/agent-eyes/archive/main.zip agent-eyes install --env=auto -agent-eyes doctor ```
--- -## 解锁更多 +## 装好就能用 -### 🔍 搜索(免费,30 秒) +不需要任何配置,装完直接用: -注册 [Exa](https://exa.ai) 拿一个免费 Key: +```bash +agent-eyes read "https://任意网页" # Jina Reader 驱动 +agent-eyes read "https://github.com/openai/gpt-4" # GitHub 仓库/Issue/PR +agent-eyes read "https://www.youtube.com/watch?v=xxx" # yt-dlp 驱动 +agent-eyes read "https://www.bilibili.com/video/BVxxx" # B站字幕 +agent-eyes read "https://x.com/elonmusk/status/xxx" # 推文 +agent-eyes read "https://hnrss.org/frontpage" # RSS 订阅 +agent-eyes search-github "LLM 框架" # GitHub 搜索 +``` + +--- + +## 按需解锁 + +不用的不用配。每一步都可以跳过。 + +### 🔍 搜索 — 免费,30 秒 + +一个 [Exa](https://exa.ai) Key(免费 1000 次/月),同时解锁三个搜索: ```bash agent-eyes configure exa-key 你的KEY + +agent-eyes search "2025 最好的开源 AI 工具" +agent-eyes search-reddit "best LLM" --sub LocalLLaMA +agent-eyes search-twitter "Claude Code" ``` -### 🍪 Cookie 解锁(免费,2 分钟) +### 🍪 Cookie — 免费,2 分钟 -本地电脑一键导入所有平台 cookies: +解锁 Twitter 高级搜索 + 小红书。本地电脑一键导入: ```bash agent-eyes configure --from-browser chrome ``` -服务器用户?装个 [Cookie-Editor](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) 扩展,点 Export → Header String,粘贴给 Agent。 +> 服务器用户?装个 [Cookie-Editor](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) 扩展,Export → Header String,粘贴给 Agent。 -### 🌐 代理($1/月,仅服务器) +### 🌐 代理 — $1/月,仅服务器需要 -Reddit 和 B站封服务器 IP。推荐 [Webshare](https://webshare.io),一个代理管两个平台: +Reddit 和 B站封服务器 IP。一个代理解决两个: ```bash agent-eyes configure proxy http://用户名:密码@IP:端口 ``` -> 不买也行——Reddit 搜索通过 Exa 免费可用。 +> Reddit 搜索通过 Exa 免费可用,不买代理也能搜,只是读不了完整帖子。 +> 推荐 [Webshare](https://webshare.io),$1/月。 --- -## 三种接入方式 +## 状态一目了然 -**命令行** · **Python API** · **MCP Server** +``` +$ agent-eyes doctor -```bash -agent-eyes read "URL" # 阅读 -agent-eyes search "关键词" # 搜索 -agent-eyes doctor # 状态检查 +👁️ Agent Eyes Status +✅ Web [Jina Reader] ✅ GitHub [API] ✅ RSS [feedparser] +✅ YouTube [yt-dlp] ✅ Bilibili [API] ✅ Twitter [birdx] +⬜ Search [need Exa key] ⬜ XiaoHongShu [cookies] ⬜ Reddit [proxy] + +6/9 active ``` +--- + +## 接入方式 + +### CLI +```bash +agent-eyes read "URL" +agent-eyes search "关键词" +agent-eyes doctor +``` + +### Python ```python from agent_eyes import AgentEyes +import asyncio eyes = AgentEyes() -result = asyncio.run(eyes.read("https://example.com")) +asyncio.run(eyes.read("https://example.com")) +asyncio.run(eyes.search("AI agent")) ``` +### MCP Server(Claude Code / Cursor) +
-MCP Server 配置 - -```bash -pip install agent-eyes[mcp] -``` +配置 ```json -{ - "mcpServers": { - "agent-eyes": { - "command": "python", - "args": ["-m", "agent_eyes.integrations.mcp_server"] - } - } -} +{"mcpServers": {"agent-eyes": {"command": "python", "args": ["-m", "agent_eyes.integrations.mcp_server"]}}} ```
--- -## 配置速查 +## 速查 | 命令 | 作用 | |------|------| | `agent-eyes doctor` | 查看状态 | | `agent-eyes configure --from-browser chrome` | 一键导入 cookies | | `agent-eyes configure exa-key KEY` | 解锁搜索 | -| `agent-eyes configure twitter-cookies "..."` | 解锁 Twitter 高级 | +| `agent-eyes configure twitter-cookies "..."` | 解锁 Twitter | | `agent-eyes configure xhs-cookie "..."` | 解锁小红书 | -| `agent-eyes configure proxy URL` | 解锁 Reddit + B站(服务器)| +| `agent-eyes configure proxy URL` | 解锁 Reddit + B站 | --- -## 设计理念 +## 设计 -Agent Eyes 不造轮子,只做胶水: - -- 每个频道 ~50 行代码,就是对底层工具的薄封装 -- 换后端?改一个文件就行 -- 99% 功能免费,剩下 1% 也就 $1/月 -- 支持 CLI、MCP Server、Python API 三种接入 +胶水,不是框架。每个频道 ~50 行代码,换后端改一个文件。
架构 ``` -┌──────────────────────────────────────────┐ -│ Agent Eyes(胶水层) │ -│ │ -│ web.py → Jina Reader (⭐ 9.8K) │ -│ youtube.py → yt-dlp (⭐ 148K) │ -│ twitter.py → birdx │ -│ exa.py → Exa Search │ -│ github.py → GitHub API │ -│ bilibili.py → Bilibili API │ -│ reddit.py → Reddit JSON API │ -│ rss.py → feedparser (⭐ 2.3K) │ -│ xhs.py → XHS Web API │ -│ │ -│ CLI · MCP Server · Python API │ -└──────────────────────────────────────────┘ +web.py → Jina Reader github.py → GitHub API +youtube.py → yt-dlp bilibili.py → Bilibili API +twitter.py → birdx reddit.py → Reddit JSON +exa.py → Exa Search rss.py → feedparser +xhs.py → XHS Web API ```
---- - ## 致谢 -感谢这些项目,Agent Eyes 站在它们的肩膀上: +[Jina Reader](https://github.com/jina-ai/reader) · [yt-dlp](https://github.com/yt-dlp/yt-dlp) · [birdx](https://github.com/runesleo/birdx) · [Exa](https://exa.ai) · [feedparser](https://github.com/kurtmckee/feedparser) -- [Jina Reader](https://github.com/jina-ai/reader) — 网页转 Markdown -- [yt-dlp](https://github.com/yt-dlp/yt-dlp) — 1800+ 视频网站字幕提取 -- [birdx](https://github.com/runesleo/birdx) — 无 API Key 的 Twitter 访问 -- [Exa](https://exa.ai) — 语义搜索引擎 -- [feedparser](https://github.com/kurtmckee/feedparser) — RSS/Atom 解析 - -## License - -MIT +MIT License