Agent-Reach/docs/troubleshooting.md
Panniantong 62aacf38b5 feat: migrate Twitter backend from bird CLI to xreach CLI
bird CLI (@steipete/bird) is deprecated and no longer maintained.
xreach CLI (xreach-cli on npm) is our maintained fork with:
- Fixed SearchTimeline (POST + updated query ID)
- Built-in proxy rotation support
- Additional features (DMs, notifications, lists)

Changes across 11 files:
- channels/twitter.py: detect xreach instead of bird/birdx
- cli.py: install/doctor/uninstall all reference xreach-cli
- SKILL.md: updated command examples (bird read → xreach tweet)
- guides/setup-twitter.md: rewritten for xreach
- docs/troubleshooting.md: updated proxy guidance
- README.md + README_en.md: all references updated
- config.py: twitter_bird → twitter_xreach
- core.py, mcp_server.py: comment updates

npm package: https://www.npmjs.com/package/xreach-cli
Source: https://github.com/Panniantong/xfetch
2026-02-27 08:17:51 +01:00

1.2 KiB
Raw Blame History

常见问题排查

Twitter/X: xreach CLI "fetch failed"

症状: xreach search 或其他命令返回 "fetch failed"

原因: xreach CLI 使用 Node.js 的 undici 库发请求。如果你的网络环境需要代理才能访问 x.com需要明确传入代理参数。

解决方案:

方案 1使用 --proxy 参数

xreach search "test" --auth-token "$AUTH_TOKEN" --ct0 "$CT0" --proxy "http://user:pass@host:port"

方案 2使用全局代理工具

让代理工具接管所有网络流量,这样 xreach 的请求也会走代理:

# macOS — ClashX / Surge 开启"增强模式"
# Linux — proxychains 或 tun2socks
proxychains xreach search "test" -n 1

方案 3不用 xreach用 Exa 搜索替代

xreach 不可用时,可以直接用 Exa 搜索 Twitter 内容:

mcporter call 'exa.web_search_exa(query: "site:x.com 搜索词", numResults: 5)'

方案 4设置 HTTP_PROXY 环境变量

export HTTP_PROXY="http://127.0.0.1:7890"
export HTTPS_PROXY="http://127.0.0.1:7890"

xreach search "test"

⚠️ 注意Node.js 原生 fetch 不一定读取这些环境变量,推荐用方案 1 的 --proxy 参数。