- Replace xreach CLI with bird (@steipete/bird) as Twitter/X backend - bird uses AUTH_TOKEN/CT0 env vars (simpler than xreach's session.json) - Accept both 'bird' and 'birdx' binary names - Remove version detection logic (bird v0.8.0 is the baseline) - Write credentials.env to ~/.config/bird/ for easy sourcing - Keep xfetch session.json sync for backward compatibility - Update SKILL.md commands: bird search/read/user-tweets/thread - Update install/uninstall to use npm @steipete/bird - All 52 tests pass
1.6 KiB
1.6 KiB
Twitter 高级功能配置指南(bird CLI)
Twitter 基础阅读通过 Jina Reader 免费可用,无需配置。
高级功能需要 bird CLI(@steipete/bird):
- 搜索推文(
bird search) - 读取完整推文和对话链(
bird read、bird thread) - 用户时间线(
bird user-tweets)
bird 是免费开源工具(npm 包 @steipete/bird),但需要你的 Twitter 账号 cookie。
快速配置
- 检查 bird 是否安装:
which bird && echo "installed" || echo "not installed"
- 安装 bird:
npm install -g @steipete/bird
备选包:
npm install -g @connormartin/bird
- 测试是否配置好:
AUTH_TOKEN="xxx" CT0="yyy" bird 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:
-
安装 bird(如果没装):
npm install -g @steipete/bird -
设置环境变量:
export AUTH_TOKEN="你的auth_token"
export CT0="你的ct0"
- 测试:
bird search "test" -n 1
代理配置
bird CLI 支持通过环境变量设置代理:
export HTTP_PROXY="http://user:pass@host:port"
export HTTPS_PROXY="http://user:pass@host:port"
bird search "test" -n 1
也可以使用全局代理工具:
proxychains bird search "test" -n 1