Agent-Reach/agent_reach/guides/setup-twitter.md
Panniantong 7ae0cd8c0a feat(twitter): migrate from xreach to bird CLI
- 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
2026-03-23 08:51:22 +01:00

1.6 KiB
Raw Blame History

Twitter 高级功能配置指南bird CLI

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

高级功能需要 bird CLI@steipete/bird

  • 搜索推文(bird search
  • 读取完整推文和对话链(bird readbird thread
  • 用户时间线(bird user-tweets

bird 是免费开源工具npm 包 @steipete/bird但需要你的 Twitter 账号 cookie。

快速配置

  1. 检查 bird 是否安装:
which bird && echo "installed" || echo "not installed"
  1. 安装 bird
npm install -g @steipete/bird

备选包:npm install -g @connormartin/bird

  1. 测试是否配置好:
AUTH_TOKEN="xxx" CT0="yyy" bird 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. 安装 bird如果没装npm install -g @steipete/bird

  2. 设置环境变量:

export AUTH_TOKEN="你的auth_token"
export CT0="你的ct0"
  1. 测试:
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