bird
Original:🇺🇸 English
Translated
X/Twitter CLI tool for reading tweets, threads, replies, searching, managing bookmarks, and fetching news/trending topics. Use when the user needs to read tweets, search X/Twitter content, get user timelines, fetch bookmarks, or retrieve trending news from the command line. Supports cookie-based authentication from Safari or Chrome.
9installs
Sourceliewcf/agent-skills
Added on
NPX Install
npx skill4agent add liewcf/agent-skills birdTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Bird - X/Twitter CLI
Guide for using the CLI tool to interact with X/Twitter content.
birdQuick Start
Install bird globally:
bash
npm install -g @steipete/bird
# or
pnpm add -g @steipete/bird
# or
bun add -g @steipete/bird
# one-shot (no install)
bunx @steipete/bird whoami
# or
brew install steipete/tap/birdVerify authentication:
bash
bird whoami # Show logged-in account
bird check # Check available credentialsCommon Tasks
Read Tweets and Threads
bash
# Read a single tweet
bird read <tweet-url-or-id>
bird <tweet-url-or-id> # shorthand
# Read a thread (tweet + replies)
bird thread <tweet-url-or-id>
# Get replies only
bird replies <tweet-url-or-id>
# Output as JSON for processing
bird read <id> --json
bird thread <id> --json --max-pages 3Search Tweets
bash
# Basic search
bird search "query" -n 10
# Search from a specific user
bird search "from:username" -n 20
# Get all results (paginated)
bird search "query" --all --json
# Search with date filters
bird search "query since:2024-01-01" -n 50Get User Content
bash
# User's tweets
bird user-tweets @username -n 20
bird user-tweets @username -n 50 --json
# User mentions
bird mentions --user @username -n 10Manage Bookmarks
bash
# List bookmarks
bird bookmarks -n 20
bird bookmarks --all --json
# From a specific folder
bird bookmarks --folder-id <id> -n 10
# Remove a bookmark
bird unbookmark <tweet-id-or-url>Get News and Trending
bash
# AI-curated news
bird news --ai-only -n 10
# Sports/Entertainment news
bird news --sports -n 15
bird news --entertainment -n 10
# Include related tweets
bird news --with-tweets --tweets-per-item 3 -n 10
# Trending topics
bird trending -n 10Post Tweets (use with caution)
bash
# Send a tweet
bird tweet "hello world"
# Reply to a tweet
bird reply <tweet-id-or-url> "my reply"Process JSON Output
Use to extract specific fields from JSON output:
jqbash
# Get tweet text only
bird read <id> --json | jq -r '.text'
# Get user info
bird user-tweets @user -n 5 --json | jq '.[] | {name: .user.name, handle: .user.screen_name}'
# Extract media URLs
bird read <id> --json | jq -r '.media[]?.url'
# Save to file
bird user-tweets @user --all --json > tweets.jsonAuthentication
Bird uses cookie-based authentication (no API keys required).
Use / to pass cookies directly, or for browser cookies.
--auth-token--ct0--cookie-sourceBrowser cookie sources:
- Safari, Chrome, or Firefox (macOS)
- Chromium variants (Arc/Brave/etc): use
--chrome-profile-dir - Choose the cookie order with , and specific Firefox profile with
--cookie-source--firefox-profile - is repeatable:
--cookie-sourcesafari|chrome|firefox|all|none
Config File
Global:
Project:
~/.config/bird/config.json5Project:
./.birdrc.json5Example:
json5
{
cookieSource: ["chrome"],
chromeProfileDir: "/path/to/Arc/Profile",
chromeProfile: "Default",
firefoxProfile: "default-release",
cookieTimeoutMs: 10000,
timeoutMs: 20000,
quoteDepth: 1
}Environment variables:
BIRD_TIMEOUT_MSBIRD_COOKIE_TIMEOUT_MSBIRD_QUOTE_DEPTHBIRD_QUERY_IDS_CACHE
Important Notes
- Uses undocumented X/Twitter GraphQL API - may break without notice
- Recommendation: Use for reading only. Tweeting may trigger blocks.
- Rate limits apply - use to add delays between requests
--delay <ms> - Pagination (when supported): ,
search,bookmarks,likes, andfollowingrequirefollowersor--allwith--cursor;--max-pagestreatslist-timelineas--max-pages--all
Troubleshooting
Query IDs stale (404 errors):
bash
bird query-ids --freshQuery IDs cache:
- Default:
~/.config/bird/query-ids-cache.json - Override:
BIRD_QUERY_IDS_CACHE=/path/to/file.json
Cookie extraction fails:
- Confirm you're logged into X/Twitter in the browser
- Try a different order
--cookie-source - For Arc/Brave, pass
--chrome-profile-dir
Auth fails with flags/env:
- Ensure and
--auth-tokenare from the same session--ct0 - Try browser cookies instead of flags for a quick sanity check
Reference
See references/commands.md for complete command documentation.