A fast command-line interface for X/Twitter using cookie authentication and the GraphQL API.
bird is a CLI tool for tweeting, replying, reading threads, searching, and managing your Twitter/X account — powered by X's internal GraphQL endpoints and your existing browser session.
- Auth: Uses browser cookies (Safari/Chrome/Firefox)
- API: X/Twitter GraphQL API (query IDs auto-refresh)
- Output: Human-readable by default,
--jsonor--plainfor scripts
# npm
npm install -g @steipete/bird
# pnpm
pnpm add -g @steipete/bird
# bun
bun add -g @steipete/birdbrew install steipete/tap/bird# Run without installing
bunx @steipete/bird whoamiRequirements: Node.js ≥ 20
Bird uses your existing X.com browser session via cookies.
# Uses Safari (default on macOS)
bird whoami
# Explicit Chrome profile
bird --chrome-profile default whoami
# Firefox
bird --firefox-profile default-release whoami
# Custom profile directory
bird --chrome-profile-dir /path/to/profile whoamiBird reads cookies from your browser. Make sure you're logged into x.com in one of:
- Safari (default on macOS)
- Chrome/Chromium
- Firefox
# Cookie timeout (ms)
export BIRD_COOKIE_TIMEOUT_MS=300000
# Timeout for requests (ms)
export BIRD_TIMEOUT_MS=30000
# Default quote depth
export BIRD_QUOTE_DEPTH=1
# Disable colors
export NO_COLOR=1# Post a tweet
bird tweet "Hello from bird CLI!"
# With media
bird tweet "Check this out" --media /path/to/image.jpg
# Quote tweet
bird tweet "My thoughts" --quote https://x.com/user/status/1234567890# Reply to a tweet
bird reply https://x.com/user/status/1234567890 "Great point!"
# Deep reply chain
bird reply 1234567890 "Adding to the conversation"# Read a tweet by ID or URL
bird read 1234567890
# JSON output for scripts
bird read 1234567890 --json
# Full thread
bird thread 1234567890# Search tweets
bird search "AI tools"
# With count
bird search "AI tools" -n 20
# Since date (YYYY-MM-DD)
bird search "AI tools since:2026-01-01"
# JSON output
bird search "AI tools" --json# Your mentions
bird mentions
# JSON output
bird mentions --json
# Limit results
bird mentions -n 50# Get bookmarks
bird bookmarks
# Remove bookmark
bird unbookmark https://x.com/user/status/1234567890# Home timeline ("For You" feed)
bird home
# JSON output
bird home --json# Tweets from a user
bird user-tweets username
# JSON output
bird user-tweets username --json# Your Twitter lists
bird lists
# List timeline
bird list-timeline https://x.com/i/lists/1234567890# AI-curated news and trending topics
bird news
bird trending# Users you follow
bird following
# Your followers
bird followers
# User's followers
bird followers username
# JSON output
bird following --json# Your liked tweets
bird likes# Check current account
bird whoami- Project:
.birdrc.json5(local to project) - User:
~/.config/bird/config.json5(global)
{
// Chrome profile name (for cookie extraction)
chromeProfile: "Default",
// Chrome profile directory (alternative to name)
chromeProfileDir: "/path/to/profile",
// Firefox profile name
firefoxProfile: "default-release",
// Cookie extraction timeout (ms)
cookieTimeoutMs: 300000,
// Request timeout (ms)
timeoutMs: 30000,
// Max quoted tweet depth (0 = disabled)
quoteDepth: 1,
}# Set Chrome profile for bird
export BIRD_CHROME_DIR="$HOME/.gemini/antigravity-browser-profile/Default"
# Run research with X search
python3 scripts/last30days.py "AI tools" --sources=x
# Both Reddit + X
python3 scripts/last30days.py "AI tools"Bird works seamlessly with OpenClaw skills for agent workflows:
# Bird is auto-detected by research skills
export BIRD_CHROME_DIR="$HOME/.gemini/antigravity-browser-profile/Default"# Get structured data
tweets=$(bird search "AI tools" --json | jq '.[] | {id, text, author}')
echo "$tweets"#!/bin/bash
# Search and process tweets
BIRD_DIR="$HOME/.gemini/antigravity-browser-profile/Default"
bird search "$1" -n 10 --json --chrome-profile-dir "$BIRD_DIR" | \
jq -r '.[] | "\(.author.username): \(.text[:100])"' | \
while read line; do
echo "• $line"
done❌ auth_token: not found
❌ ct0: not found
Fix: Log into x.com in your browser and refresh the page.
⚠️ Failed to read Safari cookies: EPERM
Fix: Use Chrome or Firefox profile instead:
bird --chrome-profile default whoamiBird respects X's rate limits. If you hit limits:
- Wait before making more requests
- Use
--plainfor reduced output - Add delays between requests
If you see GraphQL query errors, run:
bird query-ids --refreshThis refreshes cached query IDs.
If bird doesn't work for your use case:
| Tool | Auth | Notes |
|---|---|---|
| twarc | Twitter API | Academic/research |
| t | Twitter API | Ruby-based |
| twitter-cli | Twitter API | Node.js |
| Nitter | None | Web front-end |
MIT License - See LICENSE
@steipete - Created and maintained by Peter Steinberger
Note: This is a documentation backup repo. The original source is at @steipete/bird on npm.