rename: Agent Eyes → Agent Reach

全局重命名:
- 包名: agent_eyes → agent_reach
- CLI: agent-eyes → agent-reach
- 类名: AgentEyes → AgentReach
- 显示名: Agent Eyes → Agent Reach
- GitHub: Panniantong/agent-eyes → Panniantong/Agent-Reach

所有 36 个测试通过,CLI/doctor/read/search 全部正常。
This commit is contained in:
Panniantong
2026-02-24 10:25:46 +01:00
parent 4b0ae20fd7
commit 5c62a21f32
38 changed files with 251 additions and 251 deletions
+16 -16
View File
@@ -1,8 +1,8 @@
<p align="center"> <p align="center">
<img src="docs/assets/logo.png" alt="Agent Eyes" width="200"> <img src="docs/assets/logo.png" alt="Agent Reach" width="200">
</p> </p>
<h1 align="center">👁️ Agent Eyes</h1> <h1 align="center">👁️ Agent Reach</h1>
<p align="center"> <p align="center">
<strong>给你的 AI Agent 一键装上互联网能力</strong> <strong>给你的 AI Agent 一键装上互联网能力</strong>
@@ -11,7 +11,7 @@
<p align="center"> <p align="center">
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/Python-3.8+-green.svg?style=for-the-badge&logo=python&logoColor=white" alt="Python 3.8+"></a> <a href="https://www.python.org/"><img src="https://img.shields.io/badge/Python-3.8+-green.svg?style=for-the-badge&logo=python&logoColor=white" alt="Python 3.8+"></a>
<a href="https://github.com/Panniantong/agent-eyes/stargazers"><img src="https://img.shields.io/github/stars/Panniantong/agent-eyes?style=for-the-badge" alt="GitHub Stars"></a> <a href="https://github.com/Panniantong/agent-reach/stargazers"><img src="https://img.shields.io/github/stars/Panniantong/agent-reach?style=for-the-badge" alt="GitHub Stars"></a>
</p> </p>
<p align="center"> <p align="center">
@@ -20,7 +20,7 @@
--- ---
## 为什么需要 Agent Eyes? ## 为什么需要 Agent Reach?
AI Agent 已经能访问互联网——但只是"能上网"而已。 AI Agent 已经能访问互联网——但只是"能上网"而已。
@@ -35,10 +35,10 @@ AI Agent 已经能访问互联网——但只是"能上网"而已。
你要让 Agent 接入这些平台,就得一个一个去踩坑、装工具、调配置。 你要让 Agent 接入这些平台,就得一个一个去踩坑、装工具、调配置。
**Agent Eyes 把这件事变成一行命令:** **Agent Reach 把这件事变成一行命令:**
``` ```
帮我安装 Agent Eyes:https://raw.githubusercontent.com/Panniantong/agent-eyes/main/docs/install.md 帮我安装 Agent Reach:https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/install.md
``` ```
复制给你的 Agent,30 秒后它就能读推特、搜 Reddit、看 B站了。 复制给你的 Agent,30 秒后它就能读推特、搜 Reddit、看 B站了。
@@ -51,7 +51,7 @@ AI Agent 已经能访问互联网——但只是"能上网"而已。
| 🔒 **隐私安全** | Cookie 只存在你本地,不上传不外传。代码完全开源,随时可审查 | | 🔒 **隐私安全** | Cookie 只存在你本地,不上传不外传。代码完全开源,随时可审查 |
| 🔄 **持续更新** | 底层工具(yt-dlp、birdx、Jina Reader 等)定期追踪更新到最新版,你不用自己盯 | | 🔄 **持续更新** | 底层工具(yt-dlp、birdx、Jina Reader 等)定期追踪更新到最新版,你不用自己盯 |
| 🤖 **兼容所有 Agent** | Claude Code、OpenClaw、Cursor、Windsurf……任何能跑命令行的 Agent 都能用 | | 🤖 **兼容所有 Agent** | Claude Code、OpenClaw、Cursor、Windsurf……任何能跑命令行的 Agent 都能用 |
| 🩺 **自带诊断** | `agent-eyes doctor` 一条命令告诉你哪个通、哪个不通、怎么修 | | 🩺 **自带诊断** | `agent-reach doctor` 一条命令告诉你哪个通、哪个不通、怎么修 |
--- ---
@@ -78,7 +78,7 @@ AI Agent 已经能访问互联网——但只是"能上网"而已。
复制给你的 AI Agent(Claude Code、OpenClaw、Cursor 等): 复制给你的 AI Agent(Claude Code、OpenClaw、Cursor 等):
``` ```
帮我安装 Agent Eyes:https://raw.githubusercontent.com/Panniantong/agent-eyes/main/docs/install.md 帮我安装 Agent Reach:https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/install.md
``` ```
Agent 自动安装、检测环境、告诉你哪些功能已经可以用。 Agent 自动安装、检测环境、告诉你哪些功能已经可以用。
@@ -87,8 +87,8 @@ Agent 自动安装、检测环境、告诉你哪些功能已经可以用。
<summary>手动安装</summary> <summary>手动安装</summary>
```bash ```bash
pip install https://github.com/Panniantong/agent-eyes/archive/main.zip pip install https://github.com/Panniantong/agent-reach/archive/main.zip
agent-eyes install --env=auto agent-reach install --env=auto
``` ```
</details> </details>
@@ -132,9 +132,9 @@ Reddit 和 B站封服务器 IP。买个代理(推荐 [Webshare](https://websha
## 状态一目了然 ## 状态一目了然
``` ```
$ agent-eyes doctor $ agent-reach doctor
👁️ Agent Eyes 状态 👁️ Agent Reach 状态
======================================== ========================================
✅ 装好即用: ✅ 装好即用:
@@ -159,11 +159,11 @@ $ agent-eyes doctor
## 设计理念 ## 设计理念
**Agent Eyes 是一个 Agent 初始化脚手架,不是框架。** **Agent Reach 是一个 Agent 初始化脚手架,不是框架。**
你给一个新 Agent 装环境的时候,总要花时间去找工具、装依赖、调配置——Twitter 用什么读?Reddit 怎么绕封?YouTube 字幕怎么提取?每次都要重新踩一遍。 你给一个新 Agent 装环境的时候,总要花时间去找工具、装依赖、调配置——Twitter 用什么读?Reddit 怎么绕封?YouTube 字幕怎么提取?每次都要重新踩一遍。
Agent Eyes 做的事情很简单:**帮你把这些选型和配置的活儿做完了。** Agent Reach 做的事情很简单:**帮你把这些选型和配置的活儿做完了。**
| 场景 | 选型 | 为什么选它 | | 场景 | 选型 | 为什么选它 |
|------|------|-----------| |------|------|-----------|
@@ -179,7 +179,7 @@ Agent Eyes 做的事情很简单:**帮你把这些选型和配置的活儿做
<summary>项目结构</summary> <summary>项目结构</summary>
``` ```
agent_eyes/channels/ agent_reach/channels/
├── web.py → Jina Reader ├── web.py → Jina Reader
├── twitter.py → birdx ├── twitter.py → birdx
├── youtube.py → yt-dlp ├── youtube.py → yt-dlp
@@ -196,7 +196,7 @@ agent_eyes/channels/
## 贡献 ## 贡献
欢迎提 [Issue](https://github.com/Panniantong/agent-eyes/issues) 和 [PR](https://github.com/Panniantong/agent-eyes/pulls)。 欢迎提 [Issue](https://github.com/Panniantong/agent-reach/issues) 和 [PR](https://github.com/Panniantong/agent-reach/pulls)。
想加新平台?复制任意一个 channel 文件,改改就行——每个文件只有 ~50 行。 想加新平台?复制任意一个 channel 文件,改改就行——每个文件只有 ~50 行。
-9
View File
@@ -1,9 +0,0 @@
# -*- coding: utf-8 -*-
"""Agent Eyes — Give your AI Agent eyes to see the entire internet."""
__version__ = "1.0.0"
__author__ = "Neo Reid"
from agent_eyes.core import AgentEyes
__all__ = ["AgentEyes"]
-65
View File
@@ -1,65 +0,0 @@
---
name: agent-eyes
description: "Give your AI Agent eyes to see the entire internet. Search + read 10+ platforms with one install."
install: pip install git+https://github.com/Panniantong/agent-eyes.git
---
# Agent Eyes — 给 Agent 装上眼睛 👁️
安装后你就能搜索和阅读全网内容。
## 安装
```bash
pip install git+https://github.com/Panniantong/agent-eyes.git
```
## 装完直接能用的(零配置)
- `agent-eyes read <URL>` — 读取任意网页、GitHub、B站、YouTube、RSS
- `agent-eyes search-github "query"` — 搜索 GitHub 仓库
- `agent-eyes doctor` — 查看所有平台状态
## 解锁更多功能
运行 `agent-eyes setup` 进行交互式配置,或者读取以下指南:
| 功能 | 指南文件 |
|------|---------|
| 全网搜索 + Reddit搜索 + Twitter搜索 | `agent_eyes/guides/setup-exa.md` |
| Reddit 完整阅读 | `agent_eyes/guides/setup-reddit.md` |
| Twitter 高级(时间线/线程) | `agent_eyes/guides/setup-twitter.md` |
| 小红书 | `agent_eyes/guides/setup-xiaohongshu.md` |
| 微信公众号 | `agent_eyes/guides/setup-wechat.md` |
| 视频语音转文字 | `agent_eyes/guides/setup-groq.md` |
每个指南里有详细的步骤说明,你(Agent)可以照着做,只有需要人类操作的部分(登录、复制 key)才需要问用户。
## MCP Server
如果你的 Agent 平台支持 MCP:
```bash
pip install agent-eyes[mcp]
python -m agent_eyes.integrations.mcp_server
```
提供 8 个工具:read_url, read_batch, detect_platform, search, search_reddit, search_github, search_twitter, get_status
## Python API
```python
from agent_eyes import AgentEyes
import asyncio
eyes = AgentEyes()
# 读取
result = asyncio.run(eyes.read("https://github.com/openai/gpt-4"))
# 搜索
results = asyncio.run(eyes.search("AI agent framework"))
# 健康检查
print(eyes.doctor_report())
```
+9
View File
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
"""Agent Reach — Give your AI Agent eyes to see the entire internet."""
__version__ = "1.0.0"
__author__ = "Neo Reid"
from agent_reach.core import AgentReach
__all__ = ["AgentReach"]
@@ -2,7 +2,7 @@
""" """
Channel registry — routes URLs to the right channel. Channel registry — routes URLs to the right channel.
This is the core of Agent Eyes' pluggable architecture. This is the core of Agent Reach' pluggable architecture.
Add a new channel: just create a file and register it here. Add a new channel: just create a file and register it here.
Swap a backend: just change the implementation inside the channel file. Swap a backend: just change the implementation inside the channel file.
""" """
@@ -123,7 +123,7 @@ class Channel(ABC):
# Check required config # Check required config
for key in self.requires_config: for key in self.requires_config:
if config and not config.get(key): if config and not config.get(key):
return "off", f"需要配置 {key},运行 agent-eyes setup" return "off", f"需要配置 {key},运行 agent-reach setup"
return "ok", f"{'、'.join(self.backends) if self.backends else '内置'}" return "ok", f"{'、'.join(self.backends) if self.backends else '内置'}"
@@ -34,7 +34,7 @@ class BilibiliChannel(Channel):
] ]
is_server = any(indicators) is_server = any(indicators)
if is_server: if is_server:
return "warn", "服务器 IP 可能被封,配置代理即可解决:agent-eyes configure proxy URL" return "warn", "服务器 IP 可能被封,配置代理即可解决:agent-reach configure proxy URL"
return "ok", "本地直连可用" return "ok", "本地直连可用"
async def read(self, url: str, config=None) -> ReadResult: async def read(self, url: str, config=None) -> ReadResult:
@@ -52,7 +52,7 @@ class BilibiliChannel(Channel):
if not bv_id: if not bv_id:
# Fallback to Jina Reader # Fallback to Jina Reader
from agent_eyes.channels.web import WebChannel from agent_reach.channels.web import WebChannel
return await WebChannel().read(url, config) return await WebChannel().read(url, config)
# Get video info # Get video info
@@ -75,7 +75,7 @@ class BilibiliChannel(Channel):
title=f"Bilibili: {bv_id}", title=f"Bilibili: {bv_id}",
content=f"⚠️ Bilibili blocked this request ({msg}). " content=f"⚠️ Bilibili blocked this request ({msg}). "
f"This usually means the server IP is blocked. " f"This usually means the server IP is blocked. "
f"Try: agent-eyes configure proxy http://user:pass@ip:port", f"Try: agent-reach configure proxy http://user:pass@ip:port",
url=url, url=url,
platform="bilibili", platform="bilibili",
) )
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Exa semantic search — the search backbone for Agent Eyes. """Exa semantic search — the search backbone for Agent Reach.
Backend: Exa API (https://exa.ai) — free 1000 searches/month Backend: Exa API (https://exa.ai) — free 1000 searches/month
Swap to: Tavily, SerpAPI, or any search API Swap to: Tavily, SerpAPI, or any search API
@@ -37,7 +37,7 @@ class ExaSearchChannel(Channel):
raise ValueError( raise ValueError(
"Exa API key not configured.\n" "Exa API key not configured.\n"
"Get a free key at https://exa.ai (1000 searches/month free)\n" "Get a free key at https://exa.ai (1000 searches/month free)\n"
"Then run: agent-eyes setup" "Then run: agent-reach setup"
) )
async def search(self, query: str, config=None, **kwargs) -> List[SearchResult]: async def search(self, query: str, config=None, **kwargs) -> List[SearchResult]:
@@ -31,9 +31,9 @@ class RedditChannel(Channel):
elif proxy: elif proxy:
return "ok", "代理已配置,可读取帖子。配置 REDDIT_CLIENT_ID/SECRET 可解锁高级搜索和发帖" return "ok", "代理已配置,可读取帖子。配置 REDDIT_CLIENT_ID/SECRET 可解锁高级搜索和发帖"
elif has_bot: elif has_bot:
return "warn", "OAuth Bot 已配置,但服务器直连可能被封。配个代理更稳定:agent-eyes configure proxy URL" return "warn", "OAuth Bot 已配置,但服务器直连可能被封。配个代理更稳定:agent-reach configure proxy URL"
else: else:
return "off", "搜索用 Exa 免费可用。读帖子需配个代理:agent-eyes configure proxy URL" return "off", "搜索用 Exa 免费可用。读帖子需配个代理:agent-reach configure proxy URL"
async def read(self, url: str, config=None) -> ReadResult: async def read(self, url: str, config=None) -> ReadResult:
proxy = config.get("reddit_proxy") if config else None proxy = config.get("reddit_proxy") if config else None
@@ -63,10 +63,10 @@ class RedditChannel(Channel):
title="Reddit", title="Reddit",
content="⚠️ Reddit blocked this request (403 Forbidden). " content="⚠️ Reddit blocked this request (403 Forbidden). "
"Reddit blocks most server IPs.\n" "Reddit blocks most server IPs.\n"
"Fix: agent-eyes configure proxy http://user:pass@ip:port\n" "Fix: agent-reach configure proxy http://user:pass@ip:port\n"
"Cheap option: https://www.webshare.io ($1/month)\n\n" "Cheap option: https://www.webshare.io ($1/month)\n\n"
"Alternatively, search Reddit via Exa (free, no proxy needed): " "Alternatively, search Reddit via Exa (free, no proxy needed): "
"agent-eyes search-reddit \"your query\"", "agent-reach search-reddit \"your query\"",
url=url, url=url,
platform="reddit", platform="reddit",
) )
@@ -145,6 +145,6 @@ class TwitterChannel(Channel):
return results return results
async def _search_exa(self, query: str, limit: int, config=None) -> List[SearchResult]: async def _search_exa(self, query: str, limit: int, config=None) -> List[SearchResult]:
from agent_eyes.channels.exa_search import ExaSearchChannel from agent_reach.channels.exa_search import ExaSearchChannel
exa = ExaSearchChannel() exa = ExaSearchChannel()
return await exa.search(f"site:x.com {query}", config=config, limit=limit) return await exa.search(f"site:x.com {query}", config=config, limit=limit)
@@ -26,7 +26,7 @@ class XiaoHongShuChannel(Channel):
cookie = config.get("xhs_cookie") if config else None cookie = config.get("xhs_cookie") if config else None
if cookie: if cookie:
return "ok", "Cookie 已配置,完整可用" return "ok", "Cookie 已配置,完整可用"
return "off", "需要配置 Cookie 才能访问。导入浏览器 Cookie 即可:agent-eyes configure --from-browser chrome" return "off", "需要配置 Cookie 才能访问。导入浏览器 Cookie 即可:agent-reach configure --from-browser chrome"
async def read(self, url: str, config=None) -> ReadResult: async def read(self, url: str, config=None) -> ReadResult:
cookie = config.get("xhs_cookie") if config else None cookie = config.get("xhs_cookie") if config else None
@@ -35,7 +35,7 @@ class XiaoHongShuChannel(Channel):
return ReadResult( return ReadResult(
title="XiaoHongShu", title="XiaoHongShu",
content="⚠️ XiaoHongShu requires cookies to access.\n" content="⚠️ XiaoHongShu requires cookies to access.\n"
"Set up: agent-eyes configure xhs-cookie \"YOUR_COOKIE_STRING\"\n" "Set up: agent-reach configure xhs-cookie \"YOUR_COOKIE_STRING\"\n"
"How to get it: install Cookie-Editor extension → go to xiaohongshu.com → Export → Header String", "How to get it: install Cookie-Editor extension → go to xiaohongshu.com → Export → Header String",
url=url, url=url,
platform="xiaohongshu", platform="xiaohongshu",
@@ -44,7 +44,7 @@ class XiaoHongShuChannel(Channel):
# Extract note ID from URL # Extract note ID from URL
note_id = self._extract_note_id(url) note_id = self._extract_note_id(url)
if not note_id: if not note_id:
from agent_eyes.channels.web import WebChannel from agent_reach.channels.web import WebChannel
return await WebChannel().read(url, config) return await WebChannel().read(url, config)
headers = { headers = {
+39 -39
View File
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Agent Eyes CLI — command-line interface. Agent Reach CLI — command-line interface.
Usage: Usage:
agent-eyes read <url> agent-reach read <url>
agent-eyes search <query> agent-reach search <query>
agent-eyes search-reddit <query> [--sub <subreddit>] agent-reach search-reddit <query> [--sub <subreddit>]
agent-eyes search-github <query> [--lang <language>] agent-reach search-github <query> [--lang <language>]
agent-eyes search-twitter <query> agent-reach search-twitter <query>
agent-eyes setup agent-reach setup
agent-eyes doctor agent-reach doctor
agent-eyes version agent-reach version
""" """
import sys import sys
@@ -19,7 +19,7 @@ import argparse
import json import json
import os import os
from agent_eyes import __version__ from agent_reach import __version__
def _configure_logging(verbose: bool = False): def _configure_logging(verbose: bool = False):
@@ -32,7 +32,7 @@ def _configure_logging(verbose: bool = False):
def main(): def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog="agent-eyes", prog="agent-reach",
description="👁️ Give your AI Agent eyes to see the entire internet", description="👁️ Give your AI Agent eyes to see the entire internet",
) )
parser.add_argument("-v", "--verbose", action="store_true", help="Show debug logs") parser.add_argument("-v", "--verbose", action="store_true", help="Show debug logs")
@@ -106,7 +106,7 @@ def main():
sys.exit(0) sys.exit(0)
if args.command == "version": if args.command == "version":
print(f"Agent Eyes v{__version__}") print(f"Agent Reach v{__version__}")
sys.exit(0) sys.exit(0)
if args.command == "doctor": if args.command == "doctor":
@@ -129,12 +129,12 @@ def main():
def _cmd_install(args): def _cmd_install(args):
"""One-shot deterministic installer.""" """One-shot deterministic installer."""
import os import os
from agent_eyes.config import Config from agent_reach.config import Config
from agent_eyes.doctor import check_all, format_report from agent_reach.doctor import check_all, format_report
config = Config() config = Config()
print() print()
print("👁️ Agent Eyes Installer") print("👁️ Agent Reach Installer")
print("=" * 40) print("=" * 40)
# Auto-detect environment # Auto-detect environment
@@ -169,7 +169,7 @@ def _cmd_install(args):
print() print()
print("🍪 Trying to import cookies from browser...") print("🍪 Trying to import cookies from browser...")
try: try:
from agent_eyes.cookie_extract import configure_from_browser from agent_reach.cookie_extract import configure_from_browser
results = configure_from_browser("chrome", config) results = configure_from_browser("chrome", config)
found = False found = False
for platform, success, message in results: for platform, success, message in results:
@@ -193,7 +193,7 @@ def _cmd_install(args):
print() print()
print("💡 Tip: Reddit and Bilibili block server IPs.") print("💡 Tip: Reddit and Bilibili block server IPs.")
print(" Reddit search still works via Exa (free).") print(" Reddit search still works via Exa (free).")
print(" For full access: agent-eyes configure proxy http://user:pass@ip:port") print(" For full access: agent-reach configure proxy http://user:pass@ip:port")
print(" Cheap option: https://www.webshare.io ($1/month)") print(" Cheap option: https://www.webshare.io ($1/month)")
# Test channels # Test channels
@@ -207,7 +207,7 @@ def _cmd_install(args):
if not config.get("exa_api_key"): if not config.get("exa_api_key"):
print() print()
print("🔍 Recommended: unlock search with a free Exa API key") print("🔍 Recommended: unlock search with a free Exa API key")
print(" agent-eyes configure exa-key YOUR_KEY") print(" agent-reach configure exa-key YOUR_KEY")
print(" Get free key: https://exa.ai") print(" Get free key: https://exa.ai")
# Final status # Final status
@@ -260,13 +260,13 @@ def _detect_environment():
def _cmd_configure(args): def _cmd_configure(args):
"""Set a config value and test it, or auto-extract from browser.""" """Set a config value and test it, or auto-extract from browser."""
from agent_eyes.config import Config from agent_reach.config import Config
config = Config() config = Config()
# ── Auto-extract from browser ── # ── Auto-extract from browser ──
if args.from_browser: if args.from_browser:
from agent_eyes.cookie_extract import configure_from_browser from agent_reach.cookie_extract import configure_from_browser
browser = args.from_browser browser = args.from_browser
print(f"🔍 Extracting cookies from {browser}...") print(f"🔍 Extracting cookies from {browser}...")
@@ -284,15 +284,15 @@ def _cmd_configure(args):
print() print()
if found_any: if found_any:
print("✅ Cookies configured! Run `agent-eyes doctor` to see updated status.") print("✅ Cookies configured! Run `agent-reach doctor` to see updated status.")
else: else:
print(f"No cookies found. Make sure you're logged into the platforms in {browser}.") print(f"No cookies found. Make sure you're logged into the platforms in {browser}.")
return return
# ── Manual configure ── # ── Manual configure ──
if not args.key: if not args.key:
print("Usage: agent-eyes configure <key> <value>") print("Usage: agent-reach configure <key> <value>")
print(" or: agent-eyes configure --from-browser chrome") print(" or: agent-reach configure --from-browser chrome")
return return
value = " ".join(args.value) if args.value else "" value = " ".join(args.value) if args.value else ""
@@ -329,8 +329,8 @@ def _cmd_configure(args):
print("Testing search...", end=" ") print("Testing search...", end=" ")
try: try:
import asyncio import asyncio
from agent_eyes.core import AgentEyes from agent_reach.core import AgentReach
eyes = AgentEyes(config) eyes = AgentReach(config)
results = asyncio.run(eyes.search("test", num_results=1)) results = asyncio.run(eyes.search("test", num_results=1))
if results: if results:
print("✅ Search works!") print("✅ Search works!")
@@ -383,8 +383,8 @@ def _cmd_configure(args):
else: else:
print("❌ Could not find auth_token and ct0 in your input.") print("❌ Could not find auth_token and ct0 in your input.")
print(" Accepted formats:") print(" Accepted formats:")
print(" 1. agent-eyes configure twitter-cookies AUTH_TOKEN CT0") print(" 1. agent-reach configure twitter-cookies AUTH_TOKEN CT0")
print(' 2. agent-eyes configure twitter-cookies "auth_token=xxx; ct0=yyy; ..."') print(' 2. agent-reach configure twitter-cookies "auth_token=xxx; ct0=yyy; ..."')
elif args.key == "xhs-cookie": elif args.key == "xhs-cookie":
config.set("xhs_cookie", value) config.set("xhs_cookie", value)
@@ -423,19 +423,19 @@ def _cmd_configure(args):
def _cmd_doctor(): def _cmd_doctor():
from agent_eyes.config import Config from agent_reach.config import Config
from agent_eyes.doctor import check_all, format_report from agent_reach.doctor import check_all, format_report
config = Config() config = Config()
results = check_all(config) results = check_all(config)
print(format_report(results)) print(format_report(results))
def _cmd_setup(): def _cmd_setup():
from agent_eyes.config import Config from agent_reach.config import Config
config = Config() config = Config()
print() print()
print("👁️ Agent Eyes Setup") print("👁️ Agent Reach Setup")
print("=" * 40) print("=" * 40)
print() print()
@@ -461,7 +461,7 @@ def _cmd_setup():
config.set("exa_api_key", key) config.set("exa_api_key", key)
print(" ✅ 全网搜索 + Reddit搜索 + Twitter搜索 已开启!") print(" ✅ 全网搜索 + Reddit搜索 + Twitter搜索 已开启!")
else: else:
print(" ℹ️ 跳过。稍后可运行 agent-eyes setup 配置") print(" ℹ️ 跳过。稍后可运行 agent-reach setup 配置")
print() print()
# Step 2: GitHub token # Step 2: GitHub token
@@ -514,13 +514,13 @@ def _cmd_setup():
# Summary # Summary
print("=" * 40) print("=" * 40)
print(f"✅ 配置已保存到 {config.config_path}") print(f"✅ 配置已保存到 {config.config_path}")
print("运行 agent-eyes doctor 查看完整状态") print("运行 agent-reach doctor 查看完整状态")
print() print()
async def _cmd_read(args): async def _cmd_read(args):
from agent_eyes.core import AgentEyes from agent_reach.core import AgentReach
eyes = AgentEyes() eyes = AgentReach()
try: try:
result = await eyes.read(args.url) result = await eyes.read(args.url)
if args.as_json: if args.as_json:
@@ -537,8 +537,8 @@ async def _cmd_read(args):
async def _cmd_search(args): async def _cmd_search(args):
from agent_eyes.core import AgentEyes from agent_reach.core import AgentReach
eyes = AgentEyes() eyes = AgentReach()
query = " ".join(args.query).strip() query = " ".join(args.query).strip()
num = args.num num = args.num
@@ -563,12 +563,12 @@ async def _cmd_search(args):
if "401" in error_str or "Unauthorized" in error_str: if "401" in error_str or "Unauthorized" in error_str:
print("⚠️ Exa API key not configured or invalid.") print("⚠️ Exa API key not configured or invalid.")
print("Get a free key at https://exa.ai (1000 searches/month free)") print("Get a free key at https://exa.ai (1000 searches/month free)")
print("Then run: agent-eyes configure exa-key YOUR_KEY") print("Then run: agent-reach configure exa-key YOUR_KEY")
sys.exit(1) sys.exit(1)
elif "exa" in error_str.lower() or "api_key" in error_str.lower(): elif "exa" in error_str.lower() or "api_key" in error_str.lower():
print("⚠️ Exa API key not configured.") print("⚠️ Exa API key not configured.")
print("Get a free key at https://exa.ai") print("Get a free key at https://exa.ai")
print("Then run: agent-eyes configure exa-key YOUR_KEY") print("Then run: agent-reach configure exa-key YOUR_KEY")
sys.exit(1) sys.exit(1)
else: else:
print(f"❌ Error: {e}", file=sys.stderr) print(f"❌ Error: {e}", file=sys.stderr)
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Configuration management for Agent Eyes. """Configuration management for Agent Reach.
Stores settings in ~/.agent-eyes/config.yaml. Stores settings in ~/.agent-reach/config.yaml.
Auto-creates directory on first use. Auto-creates directory on first use.
""" """
@@ -13,9 +13,9 @@ import yaml
class Config: class Config:
"""Manages Agent Eyes configuration.""" """Manages Agent Reach configuration."""
CONFIG_DIR = Path.home() / ".agent-eyes" CONFIG_DIR = Path.home() / ".agent-reach"
CONFIG_FILE = CONFIG_DIR / "config.yaml" CONFIG_FILE = CONFIG_DIR / "config.yaml"
# Feature → required config keys # Feature → required config keys
@@ -5,7 +5,7 @@ Supports: Chrome, Firefox, Edge, Brave, Opera
Extracts: Twitter, XiaoHongShu, Bilibili cookies in one shot. Extracts: Twitter, XiaoHongShu, Bilibili cookies in one shot.
Usage: Usage:
agent-eyes configure --from-browser chrome agent-reach configure --from-browser chrome
""" """
import sys import sys
+8 -8
View File
@@ -1,14 +1,14 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
AgentEyes — the unified entry point. AgentReach — the unified entry point.
Pure glue: routes URLs to the right channel, routes searches to the right engine. Pure glue: routes URLs to the right channel, routes searches to the right engine.
Every channel is a thin wrapper around an external tool. Swap any backend anytime. Every channel is a thin wrapper around an external tool. Swap any backend anytime.
Usage: Usage:
from agent_eyes import AgentEyes from agent_reach import AgentReach
eyes = AgentEyes() eyes = AgentReach()
content = await eyes.read("https://github.com/openai/gpt-4") content = await eyes.read("https://github.com/openai/gpt-4")
results = await eyes.search("AI agent framework") results = await eyes.search("AI agent framework")
""" """
@@ -16,11 +16,11 @@ Usage:
import asyncio import asyncio
from typing import Any, Dict, List, Optional from typing import Any, Dict, List, Optional
from agent_eyes.config import Config from agent_reach.config import Config
from agent_eyes.channels import get_channel_for_url, get_channel, get_all_channels from agent_reach.channels import get_channel_for_url, get_channel, get_all_channels
class AgentEyes: class AgentReach:
"""Give your AI Agent eyes to see the entire internet.""" """Give your AI Agent eyes to see the entire internet."""
def __init__(self, config: Optional[Config] = None): def __init__(self, config: Optional[Config] = None):
@@ -87,12 +87,12 @@ class AgentEyes:
def doctor(self) -> Dict[str, dict]: def doctor(self) -> Dict[str, dict]:
"""Check all channel availability.""" """Check all channel availability."""
from agent_eyes.doctor import check_all from agent_reach.doctor import check_all
return check_all(self.config) return check_all(self.config)
def doctor_report(self) -> str: def doctor_report(self) -> str:
"""Get formatted health report.""" """Get formatted health report."""
from agent_eyes.doctor import check_all, format_report from agent_reach.doctor import check_all, format_report
return format_report(check_all(self.config)) return format_report(check_all(self.config))
# ── Sync wrappers ─────────────────────────────────── # ── Sync wrappers ───────────────────────────────────
@@ -5,8 +5,8 @@ Each channel knows how to check itself. Doctor just collects the results.
""" """
from typing import Dict from typing import Dict
from agent_eyes.config import Config from agent_reach.config import Config
from agent_eyes.channels import get_all_channels from agent_reach.channels import get_all_channels
def check_all(config: Config) -> Dict[str, dict]: def check_all(config: Config) -> Dict[str, dict]:
@@ -27,7 +27,7 @@ def check_all(config: Config) -> Dict[str, dict]:
def format_report(results: Dict[str, dict]) -> str: def format_report(results: Dict[str, dict]) -> str:
"""Format results as a readable text report.""" """Format results as a readable text report."""
lines = [] lines = []
lines.append("👁️ Agent Eyes 状态") lines.append("👁️ Agent Reach 状态")
lines.append("=" * 40) lines.append("=" * 40)
ok_count = sum(1 for r in results.values() if r["status"] == "ok") ok_count = sum(1 for r in results.values() if r["status"] == "ok")
@@ -72,6 +72,6 @@ def format_report(results: Dict[str, dict]) -> str:
lines.append("") lines.append("")
lines.append(f"状态:{ok_count}/{total} 个渠道可用") lines.append(f"状态:{ok_count}/{total} 个渠道可用")
if ok_count < total: if ok_count < total:
lines.append("运行 `agent-eyes setup` 解锁更多渠道") lines.append("运行 `agent-reach setup` 解锁更多渠道")
return "\n".join(lines) return "\n".join(lines)
@@ -10,17 +10,17 @@ Exa 是一个语义搜索引擎,免费提供 1000 次/月搜索。配置后解
1. 检查是否已配置: 1. 检查是否已配置:
```bash ```bash
agent-eyes doctor | grep "Web Search" agent-reach doctor | grep "Web Search"
``` ```
2. 如果用户提供了 key,写入配置: 2. 如果用户提供了 key,写入配置:
```bash ```bash
# 方法1: 通过 setup 命令 # 方法1: 通过 setup 命令
agent-eyes setup agent-reach setup
# 方法2: 直接写入配置文件 # 方法2: 直接写入配置文件
python3 -c " python3 -c "
from agent_eyes.config import Config from agent_reach.config import Config
c = Config() c = Config()
c.set('exa_api_key', '用户提供的KEY') c.set('exa_api_key', '用户提供的KEY')
print('✅ Exa API key saved') print('✅ Exa API key saved')
@@ -29,7 +29,7 @@ print('✅ Exa API key saved')
3. 测试是否有效: 3. 测试是否有效:
```bash ```bash
agent-eyes search "test query" -n 1 agent-reach search "test query" -n 1
``` ```
## 需要用户手动做的步骤 ## 需要用户手动做的步骤
@@ -7,12 +7,12 @@
1. 检查是否已配置: 1. 检查是否已配置:
```bash ```bash
agent-eyes doctor | grep -i "groq\|whisper" agent-reach doctor | grep -i "groq\|whisper"
``` ```
2. 如果用户提供了 key,写入配置: 2. 如果用户提供了 key,写入配置:
```python ```python
from agent_eyes.config import Config from agent_reach.config import Config
c = Config() c = Config()
c.set("groq_api_key", "用户提供的KEY") c.set("groq_api_key", "用户提供的KEY")
``` ```
@@ -9,7 +9,7 @@ Reddit 封锁了大量服务器 IP,直接访问会返回 403。需要 ISP 代
1. 检查当前状态: 1. 检查当前状态:
```bash ```bash
agent-eyes doctor | grep "Reddit" agent-reach doctor | grep "Reddit"
``` ```
2. 如果用户提供了代理,测试连通性: 2. 如果用户提供了代理,测试连通性:
@@ -23,7 +23,7 @@ curl -s --proxy "用户提供的代理" \
3. 写入配置: 3. 写入配置:
```python ```python
from agent_eyes.config import Config from agent_reach.config import Config
c = Config() c = Config()
c.set("reddit_proxy", "http://用户名:密码@IP:端口") c.set("reddit_proxy", "http://用户名:密码@IP:端口")
``` ```
@@ -18,7 +18,7 @@ playwright install chromium
3. 安装完成后测试: 3. 安装完成后测试:
```bash ```bash
agent-eyes read "https://mp.weixin.qq.com/s/一个测试链接" agent-reach read "https://mp.weixin.qq.com/s/一个测试链接"
``` ```
## 需要用户手动做的步骤 ## 需要用户手动做的步骤
@@ -19,7 +19,7 @@ playwright install chromium
3. 检查是否已有登录态: 3. 检查是否已有登录态:
```bash ```bash
# 检查 cookie 文件是否存在 # 检查 cookie 文件是否存在
ls ~/.agent-eyes/xhs_cookies.json 2>/dev/null ls ~/.agent-reach/xhs_cookies.json 2>/dev/null
``` ```
## 需要用户手动做的步骤 ## 需要用户手动做的步骤
@@ -37,6 +37,6 @@ ls ~/.agent-eyes/xhs_cookies.json 2>/dev/null
## Agent 收到确认后的操作 ## Agent 收到确认后的操作
1. 保存浏览器 cookie 到 `~/.agent-eyes/xhs_cookies.json` 1. 保存浏览器 cookie 到 `~/.agent-reach/xhs_cookies.json`
2. 测试:读取一条小红书笔记 2. 测试:读取一条小红书笔记
3. 反馈:"✅ 小红书已配置!现在我可以读取小红书笔记了。" 3. 反馈:"✅ 小红书已配置!现在我可以读取小红书笔记了。"
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Agent Eyes MCP Server — expose all capabilities as MCP tools. Agent Reach MCP Server — expose all capabilities as MCP tools.
Run: python -m agent_eyes.integrations.mcp_server Run: python -m agent_reach.integrations.mcp_server
8 tools for any MCP-compatible AI Agent. 8 tools for any MCP-compatible AI Agent.
""" """
@@ -11,8 +11,8 @@ import asyncio
import json import json
import sys import sys
from agent_eyes.config import Config from agent_reach.config import Config
from agent_eyes.core import AgentEyes from agent_reach.core import AgentReach
try: try:
from mcp.server import Server from mcp.server import Server
@@ -25,12 +25,12 @@ except ImportError:
def create_server(): def create_server():
if not HAS_MCP: if not HAS_MCP:
print("MCP not installed. Install: pip install agent-eyes[mcp]", file=sys.stderr) print("MCP not installed. Install: pip install agent-reach[mcp]", file=sys.stderr)
sys.exit(1) sys.exit(1)
server = Server("agent-eyes") server = Server("agent-reach")
config = Config() config = Config()
eyes = AgentEyes(config) eyes = AgentReach(config)
@server.list_tools() @server.list_tools()
async def list_tools(): async def list_tools():
@@ -57,7 +57,7 @@ def create_server():
description="Search Twitter/X posts.", description="Search Twitter/X posts.",
inputSchema={"type": "object", "properties": {"query": {"type": "string"}, "limit": {"type": "integer", "default": 10}}, "required": ["query"]}), inputSchema={"type": "object", "properties": {"query": {"type": "string"}, "limit": {"type": "integer", "default": 10}}, "required": ["query"]}),
Tool(name="get_status", Tool(name="get_status",
description="Get Agent Eyes status: which channels are active.", description="Get Agent Reach status: which channels are active.",
inputSchema={"type": "object", "properties": {}}), inputSchema={"type": "object", "properties": {}}),
] ]
+65
View File
@@ -0,0 +1,65 @@
---
name: agent-reach
description: "Give your AI Agent eyes to see the entire internet. Search + read 10+ platforms with one install."
install: pip install git+https://github.com/Panniantong/agent-reach.git
---
# Agent Reach — 给 Agent 装上眼睛 👁️
安装后你就能搜索和阅读全网内容。
## 安装
```bash
pip install git+https://github.com/Panniantong/agent-reach.git
```
## 装完直接能用的(零配置)
- `agent-reach read <URL>` — 读取任意网页、GitHub、B站、YouTube、RSS
- `agent-reach search-github "query"` — 搜索 GitHub 仓库
- `agent-reach doctor` — 查看所有平台状态
## 解锁更多功能
运行 `agent-reach setup` 进行交互式配置,或者读取以下指南:
| 功能 | 指南文件 |
|------|---------|
| 全网搜索 + Reddit搜索 + Twitter搜索 | `agent_reach/guides/setup-exa.md` |
| Reddit 完整阅读 | `agent_reach/guides/setup-reddit.md` |
| Twitter 高级(时间线/线程) | `agent_reach/guides/setup-twitter.md` |
| 小红书 | `agent_reach/guides/setup-xiaohongshu.md` |
| 微信公众号 | `agent_reach/guides/setup-wechat.md` |
| 视频语音转文字 | `agent_reach/guides/setup-groq.md` |
每个指南里有详细的步骤说明,你(Agent)可以照着做,只有需要人类操作的部分(登录、复制 key)才需要问用户。
## MCP Server
如果你的 Agent 平台支持 MCP:
```bash
pip install agent-reach[mcp]
python -m agent_reach.integrations.mcp_server
```
提供 8 个工具:read_url, read_batch, detect_platform, search, search_reddit, search_github, search_twitter, get_status
## Python API
```python
from agent_reach import AgentReach
import asyncio
eyes = AgentReach()
# 读取
result = asyncio.run(eyes.read("https://github.com/openai/gpt-4"))
# 搜索
results = asyncio.run(eyes.search("AI agent framework"))
# 健康检查
print(eyes.doctor_report())
```
+23 -23
View File
@@ -1,8 +1,8 @@
# 👁️ Agent Eyes # 👁️ Agent Reach
**Give your AI Agent eyes to see the entire internet.** **Give your AI Agent eyes to see the entire internet.**
Your AI Agent is smart but blind. It can't browse Reddit, search Twitter, or read Bilibili videos. Agent Eyes fixes this — once installed, your Agent can search and read content across 10+ platforms. Your AI Agent is smart but blind. It can't browse Reddit, search Twitter, or read Bilibili videos. Agent Reach fixes this — once installed, your Agent can search and read content across 10+ platforms.
> Install once. Superpowers unlocked. Most features work with zero config, zero cost. > Install once. Superpowers unlocked. Most features work with zero config, zero cost.
@@ -15,7 +15,7 @@ Your AI Agent is smart but blind. It can't browse Reddit, search Twitter, or rea
Copy this to your AI Agent (Claude Code, OpenClaw, Cursor, etc.): Copy this to your AI Agent (Claude Code, OpenClaw, Cursor, etc.):
``` ```
Install Agent Eyes: https://raw.githubusercontent.com/Panniantong/agent-eyes/main/docs/install.md Install Agent Reach: https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/install.md
``` ```
Your Agent handles everything. You answer 1-2 questions at most. Your Agent handles everything. You answer 1-2 questions at most.
@@ -24,9 +24,9 @@ Your Agent handles everything. You answer 1-2 questions at most.
<summary>Manual install</summary> <summary>Manual install</summary>
```bash ```bash
pip install https://github.com/Panniantong/agent-eyes/archive/main.zip pip install https://github.com/Panniantong/agent-reach/archive/main.zip
agent-eyes install --env=auto agent-reach install --env=auto
agent-eyes doctor agent-reach doctor
``` ```
</details> </details>
@@ -44,8 +44,8 @@ No configuration needed:
- 🐦 **Twitter** — read individual tweets - 🐦 **Twitter** — read individual tweets
```bash ```bash
agent-eyes read "https://github.com/openai/gpt-4" agent-reach read "https://github.com/openai/gpt-4"
agent-eyes search-github "LLM framework" agent-reach search-github "LLM framework"
``` ```
--- ---
@@ -55,10 +55,10 @@ agent-eyes search-github "LLM framework"
Sign up at [Exa](https://exa.ai) (free, 1000 searches/month). One key unlocks **web + Reddit + Twitter search**: Sign up at [Exa](https://exa.ai) (free, 1000 searches/month). One key unlocks **web + Reddit + Twitter search**:
```bash ```bash
agent-eyes configure exa-key YOUR_KEY agent-reach configure exa-key YOUR_KEY
agent-eyes search "best open source LLM 2025" agent-reach search "best open source LLM 2025"
agent-eyes search-reddit "self-hosted LLM" --sub LocalLLaMA agent-reach search-reddit "self-hosted LLM" --sub LocalLLaMA
agent-eyes search-twitter "AI agent" agent-reach search-twitter "AI agent"
``` ```
--- ---
@@ -69,11 +69,11 @@ agent-eyes search-twitter "AI agent"
```bash ```bash
# Local: auto-import all cookies # Local: auto-import all cookies
agent-eyes configure --from-browser chrome agent-reach configure --from-browser chrome
# Server: use Cookie-Editor extension, export Header String # Server: use Cookie-Editor extension, export Header String
agent-eyes configure twitter-cookies "cookie_string" agent-reach configure twitter-cookies "cookie_string"
agent-eyes configure xhs-cookie "cookie_string" agent-reach configure xhs-cookie "cookie_string"
``` ```
Unlocks: Twitter deep search, XiaoHongShu notes Unlocks: Twitter deep search, XiaoHongShu notes
@@ -83,7 +83,7 @@ Unlocks: Twitter deep search, XiaoHongShu notes
Reddit and Bilibili block server IPs. Local computers are fine. Reddit and Bilibili block server IPs. Local computers are fine.
```bash ```bash
agent-eyes configure proxy http://user:pass@ip:port agent-reach configure proxy http://user:pass@ip:port
``` ```
Recommend [Webshare](https://webshare.io). One proxy covers both Reddit and Bilibili. Recommend [Webshare](https://webshare.io). One proxy covers both Reddit and Bilibili.
@@ -95,24 +95,24 @@ Recommend [Webshare](https://webshare.io). One proxy covers both Reddit and Bili
**CLI** · **Python API** · **MCP Server** **CLI** · **Python API** · **MCP Server**
```bash ```bash
agent-eyes read "URL" agent-reach read "URL"
agent-eyes search "query" agent-reach search "query"
agent-eyes doctor agent-reach doctor
``` ```
```python ```python
from agent_eyes import AgentEyes from agent_reach import AgentReach
eyes = AgentEyes() eyes = AgentReach()
result = asyncio.run(eyes.read("https://example.com")) result = asyncio.run(eyes.read("https://example.com"))
``` ```
```json ```json
{"mcpServers": {"agent-eyes": {"command": "python", "args": ["-m", "agent_eyes.integrations.mcp_server"]}}} {"mcpServers": {"agent-reach": {"command": "python", "args": ["-m", "agent_reach.integrations.mcp_server"]}}}
``` ```
--- ---
## Why Agent Eyes? ## Why Agent Reach?
Not a framework. Not an SDK. Just glue — beautifully simple glue. Not a framework. Not an SDK. Just glue — beautifully simple glue.
+1 -1
View File
@@ -18,7 +18,7 @@ Here's how to export cookies from your local computer — **fastest method first
That's it! Your Agent will run: That's it! Your Agent will run:
```bash ```bash
agent-eyes configure twitter-cookies <your_pasted_string> agent-reach configure twitter-cookies <your_pasted_string>
``` ```
### Sites to export: ### Sites to export:
+17 -17
View File
@@ -1,11 +1,11 @@
# Agent Eyes — Installation Guide # Agent Reach — Installation Guide
## For Humans ## For Humans
Copy this to your AI Agent: Copy this to your AI Agent:
``` ```
帮我安装 Agent Eyes:https://raw.githubusercontent.com/Panniantong/agent-eyes/main/docs/install.md 帮我安装 Agent Reach:https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/install.md
``` ```
--- ---
@@ -15,8 +15,8 @@ Copy this to your AI Agent:
### Step 1: Install ### Step 1: Install
```bash ```bash
pip install https://github.com/Panniantong/agent-eyes/archive/main.zip || pip3 install https://github.com/Panniantong/agent-eyes/archive/main.zip pip install https://github.com/Panniantong/agent-reach/archive/main.zip || pip3 install https://github.com/Panniantong/agent-reach/archive/main.zip
agent-eyes install --env=auto agent-reach install --env=auto
``` ```
This single command does everything automatically: This single command does everything automatically:
@@ -37,7 +37,7 @@ Only ask the user for items the install output says are missing.
> "Want to unlock web search? Go to https://exa.ai → sign up (free) → send me the API key." > "Want to unlock web search? Go to https://exa.ai → sign up (free) → send me the API key."
```bash ```bash
agent-eyes configure exa-key THE_KEY agent-reach configure exa-key THE_KEY
``` ```
**If cookies were not auto-imported (server users):** **If cookies were not auto-imported (server users):**
@@ -45,21 +45,21 @@ agent-eyes configure exa-key THE_KEY
> Extension: https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm > Extension: https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm
```bash ```bash
agent-eyes configure twitter-cookies "PASTED_STRING" agent-reach configure twitter-cookies "PASTED_STRING"
agent-eyes configure xhs-cookie "PASTED_STRING" agent-reach configure xhs-cookie "PASTED_STRING"
``` ```
**If on server and wants Reddit/Bilibili full access:** **If on server and wants Reddit/Bilibili full access:**
> "Reddit and Bilibili block server IPs. Get a proxy at https://webshare.io ($1/month) and send me the address." > "Reddit and Bilibili block server IPs. Get a proxy at https://webshare.io ($1/month) and send me the address."
```bash ```bash
agent-eyes configure proxy http://user:pass@ip:port agent-reach configure proxy http://user:pass@ip:port
``` ```
### Step 3: Verify ### Step 3: Verify
```bash ```bash
agent-eyes doctor agent-reach doctor
``` ```
Report what's active. Users can configure more anytime by asking. Report what's active. Users can configure more anytime by asking.
@@ -70,11 +70,11 @@ Report what's active. Users can configure more anytime by asking.
| Command | What it does | | Command | What it does |
|---------|-------------| |---------|-------------|
| `agent-eyes install --env=auto` | Full auto-setup | | `agent-reach install --env=auto` | Full auto-setup |
| `agent-eyes doctor` | Show status | | `agent-reach doctor` | Show status |
| `agent-eyes configure exa-key KEY` | Unlock search | | `agent-reach configure exa-key KEY` | Unlock search |
| `agent-eyes configure twitter-cookies "..."` | Unlock Twitter | | `agent-reach configure twitter-cookies "..."` | Unlock Twitter |
| `agent-eyes configure xhs-cookie "..."` | Unlock XiaoHongShu | | `agent-reach configure xhs-cookie "..."` | Unlock XiaoHongShu |
| `agent-eyes configure proxy URL` | Unlock Reddit + Bilibili (server) | | `agent-reach configure proxy URL` | Unlock Reddit + Bilibili (server) |
| `agent-eyes read URL` | Read any URL | | `agent-reach read URL` | Read any URL |
| `agent-eyes search "query"` | Search the web | | `agent-reach search "query"` | Search the web |
+7 -7
View File
@@ -1,5 +1,5 @@
[project] [project]
name = "agent-eyes" name = "agent-reach"
version = "1.0.0" version = "1.0.0"
description = "Give your AI Agent eyes to see the entire internet. Search + Read 10+ platforms." description = "Give your AI Agent eyes to see the entire internet. Search + Read 10+ platforms."
readme = "README.md" readme = "README.md"
@@ -37,19 +37,19 @@ mcp = ["mcp[cli]>=1.0"]
all = ["playwright>=1.40", "mcp[cli]>=1.0", "browser-cookie3>=0.19"] all = ["playwright>=1.40", "mcp[cli]>=1.0", "browser-cookie3>=0.19"]
[project.scripts] [project.scripts]
agent-eyes = "agent_eyes.cli:main" agent-reach = "agent_reach.cli:main"
[project.urls] [project.urls]
Homepage = "https://github.com/Panniantong/agent-eyes" Homepage = "https://github.com/Panniantong/agent-reach"
Repository = "https://github.com/Panniantong/agent-eyes" Repository = "https://github.com/Panniantong/agent-reach"
Issues = "https://github.com/Panniantong/agent-eyes/issues" Issues = "https://github.com/Panniantong/agent-reach/issues"
[build-system] [build-system]
requires = ["hatchling"] requires = ["hatchling"]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
packages = ["agent_eyes"] packages = ["agent_reach"]
[tool.hatch.build.targets.wheel.force-include] [tool.hatch.build.targets.wheel.force-include]
"agent_eyes/guides" = "agent_eyes/guides" "agent_reach/guides" = "agent_reach/guides"
+5 -5
View File
@@ -4,8 +4,8 @@
import pytest import pytest
from unittest.mock import patch, MagicMock from unittest.mock import patch, MagicMock
from agent_eyes.channels import get_channel_for_url, get_channel, get_all_channels from agent_reach.channels import get_channel_for_url, get_channel, get_all_channels
from agent_eyes.channels.base import ReadResult, SearchResult from agent_reach.channels.base import ReadResult, SearchResult
class TestChannelRouting: class TestChannelRouting:
@@ -74,7 +74,7 @@ class TestSearchResult:
class TestGitHubChannel: class TestGitHubChannel:
@patch("agent_eyes.channels.github.requests.get") @patch("agent_reach.channels.github.requests.get")
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_search(self, mock_get): async def test_search(self, mock_get):
mock_resp = MagicMock() mock_resp = MagicMock()
@@ -93,10 +93,10 @@ class TestGitHubChannel:
class TestExaSearch: class TestExaSearch:
@patch("agent_eyes.channels.exa_search.requests.post") @patch("agent_reach.channels.exa_search.requests.post")
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_search(self, mock_post): async def test_search(self, mock_post):
from agent_eyes.config import Config from agent_reach.config import Config
config = Config(config_path="/tmp/test-exa-config.yaml") config = Config(config_path="/tmp/test-exa-config.yaml")
config.set("exa_api_key", "test-key") config.set("exa_api_key", "test-key")
+7 -7
View File
@@ -1,29 +1,29 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Tests for Agent Eyes CLI.""" """Tests for Agent Reach CLI."""
import pytest import pytest
from unittest.mock import patch from unittest.mock import patch
from agent_eyes.cli import main from agent_reach.cli import main
class TestCLI: class TestCLI:
def test_version(self, capsys): def test_version(self, capsys):
with pytest.raises(SystemExit) as exc_info: with pytest.raises(SystemExit) as exc_info:
with patch("sys.argv", ["agent-eyes", "version"]): with patch("sys.argv", ["agent-reach", "version"]):
main() main()
assert exc_info.value.code == 0 assert exc_info.value.code == 0
captured = capsys.readouterr() captured = capsys.readouterr()
assert "Agent Eyes v" in captured.out assert "Agent Reach v" in captured.out
def test_no_command_shows_help(self, capsys): def test_no_command_shows_help(self, capsys):
with pytest.raises(SystemExit) as exc_info: with pytest.raises(SystemExit) as exc_info:
with patch("sys.argv", ["agent-eyes"]): with patch("sys.argv", ["agent-reach"]):
main() main()
assert exc_info.value.code == 0 assert exc_info.value.code == 0
def test_doctor_runs(self, capsys): def test_doctor_runs(self, capsys):
with patch("sys.argv", ["agent-eyes", "doctor"]): with patch("sys.argv", ["agent-reach", "doctor"]):
main() main()
captured = capsys.readouterr() captured = capsys.readouterr()
assert "Agent Eyes" in captured.out assert "Agent Reach" in captured.out
assert "✅" in captured.out assert "✅" in captured.out
+2 -2
View File
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Tests for Agent Eyes config module.""" """Tests for Agent Reach config module."""
import os import os
import tempfile import tempfile
@@ -8,7 +8,7 @@ from pathlib import Path
import pytest import pytest
import yaml import yaml
from agent_eyes.config import Config from agent_reach.config import Config
@pytest.fixture @pytest.fixture
+6 -6
View File
@@ -1,18 +1,18 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Tests for AgentEyes core class.""" """Tests for AgentReach core class."""
import pytest import pytest
from agent_eyes.config import Config from agent_reach.config import Config
from agent_eyes.core import AgentEyes from agent_reach.core import AgentReach
@pytest.fixture @pytest.fixture
def eyes(tmp_path): def eyes(tmp_path):
config = Config(config_path=tmp_path / "config.yaml") config = Config(config_path=tmp_path / "config.yaml")
return AgentEyes(config=config) return AgentReach(config=config)
class TestAgentEyes: class TestAgentReach:
def test_init(self, eyes): def test_init(self, eyes):
assert eyes.config is not None assert eyes.config is not None
@@ -33,4 +33,4 @@ class TestAgentEyes:
def test_doctor_report(self, eyes): def test_doctor_report(self, eyes):
report = eyes.doctor_report() report = eyes.doctor_report()
assert isinstance(report, str) assert isinstance(report, str)
assert "Agent Eyes" in report assert "Agent Reach" in report
+3 -3
View File
@@ -2,8 +2,8 @@
"""Tests for doctor module.""" """Tests for doctor module."""
import pytest import pytest
from agent_eyes.config import Config from agent_reach.config import Config
from agent_eyes.doctor import check_all, format_report from agent_reach.doctor import check_all, format_report
@pytest.fixture @pytest.fixture
@@ -31,6 +31,6 @@ class TestDoctor:
def test_format_report(self, tmp_config): def test_format_report(self, tmp_config):
results = check_all(tmp_config) results = check_all(tmp_config)
report = format_report(results) report = format_report(results)
assert "Agent Eyes" in report assert "Agent Reach" in report
assert "✅" in report assert "✅" in report
assert "渠道可用" in report assert "渠道可用" in report