Skip to content

Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.

fix: Windows 控制台 emoji 编码崩溃

Panniantong0f4a59fdfcae
diff --git a/agent_reach/cli.py b/agent_reach/cli.py
index 55988154..d94d411b 100644
--- a/agent_reach/cli.py
+++ b/agent_reach/cli.py
@@ -19,6 +19,14 @@ import argparse
import json
import os
+# Fix Windows console encoding — emoji/CJK characters crash on cp936/cp1252
+if sys.platform == 'win32':
+ import io
+ if hasattr(sys.stdout, 'buffer'):
+ sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
+ if hasattr(sys.stderr, 'buffer'):
+ sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')
+
from agent_reach import __version__
diff --git a/config/mcporter.json b/config/mcporter.json
new file mode 100644
index 00000000..82a7b98b
--- /dev/null
+++ b/config/mcporter.json
@@ -0,0 +1,11 @@
+{
+ "mcpServers": {
+ "exa": {
+ "baseUrl": "https://mcp.exa.ai/mcp"
+ },
+ "xiaohongshu": {
+ "baseUrl": "http://localhost:18060/mcp"
+ }
+ },
+ "imports": []
+}