360 Secure SkillHub
360 安全技能中心

birdx

这是无需X/Twitter API密钥的CLI工具,通过直接API调用,读取Chrome磁盘Cookie(首次授权后无需浏览器)。核心功能包括读取带浏览量、收藏量等互动数据的单条推文,查询完整线程及回复,按关键词/作者搜索带指标的推文,获取用户粉丝或关注列表;支持JSON格式输出。适合无需浏览器、批量获取X平台数据的场景,输入为命令行参数,输出为结构化信息。

dophinl
dophinl
热度 26.89
最近更新 2026-05-18 12:33:05
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 数据处理 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add birdx
Metadata
name
birdx
description
X/Twitter CLI that reads Chrome cookies directly from disk — no browser session required after first auth. Supports reading tweets with viewCount/bookmarkCount, full thread replies, search with engagement metrics, and followers/following lists. Use when you need to fetch Twitter/X data, search tweets, read threads, or get user follower lists without a browser. No Twitter API key needed.

birdx

CLI for X/Twitter via direct API calls. Reads Chrome cookies from disk (no browser needed after birdx auth).

Install

bash <skill-dir>/scripts/install.sh

Or manually:

npm install --prefix ~/clawd ws jsdom x-client-transaction-id
ln -sf <skill-dir>/scripts/birdx.js /opt/homebrew/bin/birdx
birdx auth

Auth

birdx auth          # Read Chrome cookies from disk (no browser needed)
birdx auth --cdp    # Use openclaw browser CDP fallback

Cookie cache: ~/.config/bird/birdx-cookies.json (TTL ~5h, re-run auth to refresh)

Commands

# Read single tweet (includes viewCount, bookmarkCount)
birdx read <tweet-url|id>

# Read thread + all replies (--sort relevance puts author thread first)
birdx replies <tweet-url|id> --sort relevance
birdx replies <tweet-url|id> --sort latest --total 40

# Search tweets (full metrics: views, likes, bookmarks, reposts)
birdx search "query" --sort top --total 20
birdx search "from:elonmusk" --sort latest

# Followers / following
birdx followers @username --total 50
birdx following @username --total 20

# JSON output
birdx read <url> --json
birdx search "query" --json

Output Fields

  • viewCount — total impressions
  • likeCount, repostCount, replyCount, bookmarkCount
  • author.userName, author.fullName, author.isVerified

Environment

  • BIRDX_MODULES — override node_modules path (default: $HOME/clawd/node_modules)
  • Deps required: ws, jsdom, x-client-transaction-id
  • Node 20+ required (uses node:sqlite)

Notes

  • Query ID cache auto-refreshes from X on first use. If stale: check ~/.config/bird/query-ids-cache.json
  • birdx read may fail behind certain VPNs; birdx search is more reliable
  • Bookmark count is only available via birdx (not bird CLI)