birdy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Birdy

Birdy

Workflow

工作流程

Use birdy to run
bird
commands through a rotating pool of X/Twitter sessions (auth cookies), reducing rate-limit risk.
使用birdy通过轮换的X/Twitter会话池(认证Cookie)运行
bird
命令,降低限流风险。

0. Preflight (CLI Required)

0. 前置检查(需要CLI)

If you need to run commands, ensure the
birdy
CLI is installed first:
bash
bash skills/birdy/scripts/ensure_birdy.sh
birdy version
如果需要运行命令,请先确保已安装
birdy
CLI:
bash
bash skills/birdy/scripts/ensure_birdy.sh
birdy version

1. Install

1. 安装

Prefer the installer (bundles bird as
birdy-bird
):
bash
curl -fsSL https://raw.githubusercontent.com/guzus/birdy/main/install.sh | bash
Notes:
  • The installer requires GitHub CLI
    gh
    .
  • Bundled
    birdy-bird
    requires Node
    >= 22
    .
Alternative installs:
bash
undefined
推荐使用安装程序(会将bird打包为
birdy-bird
):
bash
curl -fsSL https://raw.githubusercontent.com/guzus/birdy/main/install.sh | bash
注意事项:
  • 安装程序需要GitHub CLI
    gh
  • 打包的
    birdy-bird
    要求Node版本
    >= 22
替代安装方式:
bash
undefined

Installs birdy only (no bundled bird); you must provide bird yourself.

仅安装birdy(不包含打包的bird);你需要自行安装bird。

go install github.com/guzus/birdy@latest
undefined
go install github.com/guzus/birdy@latest
undefined

2. Add Accounts

2. 添加账户

birdy needs two cookies per account:
auth_token
and
ct0
.
Optional: extract tokens automatically from your local browser cookies:
bash
undefined
birdy每个账户需要两个Cookie:
auth_token
ct0
可选:从本地浏览器Cookie中自动提取令牌:
bash
undefined

Default tries Chrome, Safari, Firefox

默认尝试Chrome、Safari、Firefox

bash skills/birdy/scripts/extract_x_tokens.sh
bash skills/birdy/scripts/extract_x_tokens.sh

Force a specific browser backend

强制使用特定浏览器后端

bash skills/birdy/scripts/extract_x_tokens.sh --browsers chrome
bash skills/birdy/scripts/extract_x_tokens.sh --browsers chrome

Pick a Chrome profile interactively (arrow keys)

交互式选择Chrome配置文件(使用方向键)

bash skills/birdy/scripts/extract_x_tokens.sh --interactive

```bash
birdy account add personal
birdy account add work --auth-token "xxx" --ct0 "yyy"
birdy account list
Stored by default:
  • ~/.config/birdy/accounts.json
  • ~/.config/birdy/state.json
bash skills/birdy/scripts/extract_x_tokens.sh --interactive

```bash
birdy account add personal
birdy account add work --auth-token "xxx" --ct0 "yyy"
birdy account list
默认存储位置:
  • ~/.config/birdy/accounts.json
  • ~/.config/birdy/state.json

3. Run Bird Commands Through Birdy

3. 通过Birdy运行Bird命令

Any unknown command/flag is forwarded to bird using the selected account.
bash
undefined
任何未知的命令/标志都会通过选定的账户转发给bird。
bash
undefined

Auto-rotate accounts

自动轮换账户

birdy home birdy search "golang" birdy read 1234567890
birdy home birdy search "golang" birdy read 1234567890

Show which account was used

显示使用的账户

birdy -v home
birdy -v home

Force an account and skip rotation

强制使用指定账户并跳过轮换

birdy --account personal whoami
birdy --account personal whoami

Choose rotation strategy

选择轮换策略

birdy --strategy least-used home
undefined
birdy --strategy least-used home
undefined

4. Use In CI (Non-Interactive)

4. 在CI环境中使用(非交互式)

Provide accounts via
BIRDY_ACCOUNTS
JSON:
bash
export BIRDY_ACCOUNTS='[{"name":"bot1","auth_token":"xxx","ct0":"yyy"}]'
birdy -v home
通过
BIRDY_ACCOUNTS
JSON提供账户信息:
bash
export BIRDY_ACCOUNTS='[{"name":"bot1","auth_token":"xxx","ct0":"yyy"}]'
birdy -v home

5. Troubleshoot Bird Detection

5. 排查Bird检测问题

birdy locates the underlying bird command in this order:
  1. BIRDY_BIRD_PATH
    (explicit override)
  2. birdy-bird
    on
    PATH
    (installed by the birdy installer)
  3. Bundled package next to the
    birdy
    binary at
    bird/dist/cli.js
  4. bird
    on
    PATH
Fixes:
  • If
    birdy-bird
    is installed but fails: ensure
    node
    is available and
    node --version
    is
    >= 22
    .
  • If you installed via
    go install
    : install bird separately, or point
    BIRDY_BIRD_PATH
    to a working
    bird
    .
  • If running from a git clone: the repo vendors bird at
    third_party/@steipete/bird/dist/cli.js
    .
birdy按以下顺序定位底层的bird命令:
  1. BIRDY_BIRD_PATH
    (显式覆盖路径)
  2. PATH
    中的
    birdy-bird
    (由birdy安装程序安装)
  3. birdy
    二进制文件旁的捆绑包
    bird/dist/cli.js
  4. PATH
    中的
    bird
修复方案:
  • 如果已安装
    birdy-bird
    但运行失败:确保
    node
    可用且
    node --version
    版本
    >= 22
  • 如果通过
    go install
    安装:单独安装bird,或将
    BIRDY_BIRD_PATH
    指向可用的
    bird
  • 如果从Git克隆运行:仓库在
    third_party/@steipete/bird/dist/cli.js
    位置包含了bird的依赖包。

Security

安全注意事项

  • Treat
    auth_token
    and
    ct0
    as secrets.
  • Avoid pasting tokens into logs; prefer environment variables and secrets managers in CI.
  • auth_token
    ct0
    视为机密信息。
  • 避免将令牌粘贴到日志中;在CI环境中优先使用环境变量和密钥管理器。