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
1.7 KiB
1.7 KiB
Twitter 高级功能配置指南(xreach CLI)
Twitter 基础阅读通过 Jina Reader 免费可用,无需配置。
高级功能需要 xreach CLI:
- 搜索推文(
xreach search) - 读取完整推文和对话链(
xreach tweet、xreach thread) - 用户时间线(
xreach tweets)
xreach 是免费开源工具(npm 包 xreach-cli),但需要你的 Twitter 账号 cookie。
快速配置
- 检查 xreach 是否安装:
which xreach && echo "installed" || echo "not installed"
- 安装 xreach:
npm install -g xreach-cli
- 测试是否配置好:
AUTH_TOKEN="xxx" CT0="yyy" xreach search "test" -n 1
获取 Cookie(Cookie-Editor 方式,推荐)
- 安装 Cookie-Editor 浏览器扩展
- 登录 x.com
- 点击 Cookie-Editor 图标 → Export → 复制全部
- 运行配置命令:
agent-reach configure twitter-cookies "粘贴的 cookie JSON"
这会自动提取 auth_token 和 ct0,并写入环境变量。
手动设置 Cookie
如果你已经知道 auth_token 和 ct0:
-
安装 xreach(如果没装):
npm install -g xreach-cli -
设置环境变量:
export AUTH_TOKEN="你的auth_token"
export CT0="你的ct0"
- 测试:
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