Agent-Reach/agent_reach/guides/setup-twitter.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.7 KiB
Raw Blame History

Twitter 高级功能配置指南xreach CLI

Twitter 基础阅读通过 Jina Reader 免费可用,无需配置。

高级功能需要 xreach CLI

  • 搜索推文(xreach search
  • 读取完整推文和对话链(xreach tweetxreach thread
  • 用户时间线(xreach tweets

xreach 是免费开源工具npm 包 xreach-cli但需要你的 Twitter 账号 cookie。

快速配置

  1. 检查 xreach 是否安装:
which xreach && echo "installed" || echo "not installed"
  1. 安装 xreach
npm install -g xreach-cli
  1. 测试是否配置好:
AUTH_TOKEN="xxx" CT0="yyy" xreach search "test" -n 1
  1. 安装 Cookie-Editor 浏览器扩展
  2. 登录 x.com
  3. 点击 Cookie-Editor 图标 → Export → 复制全部
  4. 运行配置命令:
agent-reach configure twitter-cookies "粘贴的 cookie JSON"

这会自动提取 auth_tokenct0,并写入环境变量。

如果你已经知道 auth_tokenct0

  1. 安装 xreach如果没装npm install -g xreach-cli

  2. 设置环境变量:

export AUTH_TOKEN="你的auth_token"
export CT0="你的ct0"
  1. 测试:
xreach search "test" --auth-token "$AUTH_TOKEN" --ct0 "$CT0" -n 1

代理配置

xreach CLI 内置代理支持,通过 --proxy 参数传入:

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

也支持代理轮换文件:

xreach search "test" --auth-token "$AUTH_TOKEN" --ct0 "$CT0" --proxy-file proxies.txt