Skip to content

feat(twitter): migrate from xreach to bird CLI#193

Merged
Panniantong merged 1 commit intomainfrom
feat/twitter-bird-migration
Mar 23, 2026
Merged

feat(twitter): migrate from xreach to bird CLI#193
Panniantong merged 1 commit intomainfrom
feat/twitter-bird-migration

Conversation

@Panniantong
Copy link
Owner

改动

把 Twitter/X 渠道后端从 xreach CLI 迁移到 bird CLI (@steipete/bird)。

为什么迁移: xreach 对长推文(note_tweet)和 X Article 支持不稳定,bird v0.8.0 原生支持这些场景。

具体改动

  • agent_reach/channels/twitter.py — 核心改动:xreach → bird,去掉版本检测逻辑,接受 bird/birdx 两种二进制名
  • agent_reach/cli.py — 安装/卸载/检测/cookie配置 全部切到 bird
  • agent_reach/cookie_extract.py — 新增 ~/.config/bird/credentials.env 写入(AUTH_TOKEN/CT0),保留 xfetch session.json 向后兼容
  • agent_reach/skill/SKILL.md — 命令示例更新:bird search/read/user-tweets/thread
  • tests/test_twitter_channel.py — 5 个新测试覆盖:auth ok / auth missing / not found / birdx binary / generic failure
  • 文档:README、install.md、troubleshooting.md、setup-twitter.md 全部同步

验证

  • ✅ 52 个测试全通过
  • ✅ 实机验证 bird search 正常返回结果

bird 认证方式

  • 环境变量 AUTH_TOKEN + CT0(最简单)
  • agent-reach configure twitter-cookies 自动配置
  • npm 包:@steipete/bird

- 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
@Panniantong Panniantong merged commit 90bb4e0 into main Mar 23, 2026
8 checks passed
@Panniantong Panniantong deleted the feat/twitter-bird-migration branch March 23, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant