{"_id":"@dannote/bird-premium","name":"@dannote/bird-premium","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dannote/bird-premium","version":"1.0.0","description":"X/Twitter CLI using official paid API v2","type":"module","main":"dist/index.js","types":"dist/index.d.ts","bin":{"bird":"dist/cli-v2.js"},"scripts":{"build":"pnpm run build:dist && pnpm run build:binary","build:dist":"tsc && node scripts/copy-dist-assets.js","build:binary":"BIRD_VERSION=$(node -p \"require('./package.json').version\") BIRD_GIT_SHA=$(git rev-parse --short=8 HEAD 2>/dev/null || true) bun build --compile --minify --env=BIRD_* src/cli.ts --outfile bird","dev":"tsx src/index.ts","bird":"pnpm run build:dist && node dist/cli.js","test":"vitest run","test:watch":"vitest","test:live":"pnpm run build:dist && BIRD_LIVE=1 vitest run --no-file-parallelism tests/live/live.test.ts","test:live:all":"pnpm run build:dist && BIRD_LIVE=1 vitest run --no-file-parallelism tests/live/live-all.test.ts","lint":"pnpm run lint:biome && pnpm run lint:oxlint","lint:biome":"biome check .","lint:oxlint":"oxlint --type-aware --tsconfig tsconfig.oxlint.json --import-plugin --node-plugin --vitest-plugin --deny-warnings src tests scripts","lint:fix":"pnpm run lint:biome:fix && pnpm run lint:oxlint:fix","lint:biome:fix":"biome check --write .","lint:oxlint:fix":"oxlint --type-aware --tsconfig tsconfig.oxlint.json --import-plugin --node-plugin --vitest-plugin --deny-warnings --fix src tests scripts","format":"biome format --write .","binary":"pnpm run build:binary","graphql:update":"tsx scripts/update-query-ids.ts"},"dependencies":{"@steipete/sweet-cookie":"0.1.0","commander":"^14.0.2","crypto-js":"^4.2.0","json5":"^2.2.3","kleur":"^4.1.5","oauth-1.0a":"^2.2.6"},"pnpm":{"patchedDependencies":{"@steipete/sweet-cookie":"patches/@steipete__sweet-cookie.patch"}},"devDependencies":{"@biomejs/biome":"^2.3.10","@types/node":"^25.0.3","@vitest/coverage-v8":"4.0.16","oxlint":"^1.36.0","oxlint-tsgolint":"^0.10.0","tsx":"^4.21.0","typescript":"^5.9.3","vitest":"^4.0.16"},"engines":{"node":">=22"},"gitHead":"f87497e7a409d7553fc5b7a099bbc817dfc13ac5","_id":"@dannote/bird-premium@1.0.0","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-5KAg/+kdKR4jGwzhYL2l341MP+tMkkCcqXEWcFoeqlobDZfVv4iWn5jj1COj+IWD0UlItyKjb6ZtW5uDRZQIlg==","shasum":"2023dab72aea441355aa0c476a1522262ca39dfa","tarball":"https://registry.npmjs.org/@dannote/bird-premium/-/bird-premium-1.0.0.tgz","fileCount":222,"unpackedSize":839431,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD22x64eMHVa7RMHk55EGnD9DU3En7hiS1R4niDS4uU9wIgAvwmoMGP8Np0hvm1MKPmcv1a9Z73B7FOq7ZgE63ZBVY="}]},"_npmUser":{"name":"dannote","email":"dannotemail@gmail.com"},"directories":{},"maintainers":[{"name":"dannote","email":"dannotemail@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bird-premium_1.0.0_1769151729958_0.5633233418423456"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-23T07:02:09.871Z","1.0.0":"2026-01-23T07:02:10.235Z","modified":"2026-01-23T07:02:10.446Z"},"maintainers":[{"name":"dannote","email":"dannotemail@gmail.com"}],"description":"X/Twitter CLI using official paid API v2","readme":"# bird-premium 🐦💰\n\nX/Twitter CLI using the **official paid API v2**. A fork of [steipete/bird](https://github.com/steipete/bird) that uses the documented API instead of undocumented GraphQL endpoints.\n\n## Features\n\n- 🔍 **Search** recent tweets (last 7 days)\n- 📖 **Read** individual tweets by ID or URL\n- 👤 **User profiles** with follower/following counts\n- 📜 **User tweets** timeline\n- 📋 **List timeline** — get tweets from any public list\n- 👥 **Followers/Following** lists\n- 💬 **Mentions** (with OAuth 1.0a)\n- ❤️ **Likes** (with OAuth 1.0a)\n- 📄 **JSON output** for scripting\n\n## Install\n\n```bash\nnpm install -g @dannote/bird-premium\n# or\npnpm add -g @dannote/bird-premium\n# or\nbun add -g @dannote/bird-premium\n```\n\n## Authentication\n\n### Bearer Token (App-Only)\n\nFor read-only access to public data:\n\n```bash\nexport X_BEARER_TOKEN=\"your-bearer-token\"\n```\n\n### OAuth 1.0a (User Context)\n\nFor user-specific data (mentions, likes) and write operations:\n\n```bash\nexport X_API_KEY=\"your-api-key\"\nexport X_API_SECRET=\"your-api-secret\"\nexport X_ACCESS_TOKEN=\"your-access-token\"\nexport X_ACCESS_TOKEN_SECRET=\"your-access-token-secret\"\n```\n\nGet credentials from the [X Developer Portal](https://developer.x.com/).\n\n## Commands\n\n### Search\n\n```bash\nbird search \"Claude AI\" -n 10\nbird search \"from:elonmusk\" --json\n```\n\n### Read Tweet\n\n```bash\nbird read 1585841080431321088\nbird read https://x.com/elonmusk/status/1585841080431321088 --json\n```\n\n### User Profile\n\n```bash\nbird user elonmusk\nbird user @anthropic --json\n```\n\n### User Tweets\n\n```bash\nbird user-tweets elonmusk -n 20\nbird user-tweets @anthropic --no-retweets --json\n```\n\n### List Timeline\n\n```bash\nbird list-timeline 1894700501725229467 -n 50\nbird list-timeline https://x.com/i/lists/1894700501725229467 --json\n```\n\n### Followers / Following\n\n```bash\nbird followers elonmusk -n 100\nbird following @anthropic --json\n```\n\n### Mentions (OAuth 1.0a)\n\n```bash\nbird mentions -n 10\nbird mentions @username --json\n```\n\n### Likes (OAuth 1.0a)\n\n```bash\nbird likes -n 20\nbird likes @username --json\n```\n\n### Who Am I (OAuth 1.0a)\n\n```bash\nbird whoami\nbird whoami --json\n```\n\n### Check Credentials\n\n```bash\nbird check\n```\n\n## JSON Output\n\nAdd `--json` to any command:\n\n```bash\nbird user elonmusk --json\n```\n\n```json\n{\n  \"id\": \"44196397\",\n  \"username\": \"elonmusk\",\n  \"name\": \"Elon Musk\",\n  \"followersCount\": 232696510,\n  \"followingCount\": 1273,\n  \"tweetCount\": 94848,\n  \"verified\": true\n}\n```\n\n## Pagination\n\nUse `--cursor` for pagination:\n\n```bash\nbird search \"AI\" -n 10\n# Output includes: Next page: bird search \"AI\" --cursor b26v89c19zqg8o3...\n\nbird search \"AI\" -n 10 --cursor b26v89c19zqg8o3...\n```\n\n## Library Usage\n\n```typescript\nimport { XApiV2Client } from '@dannote/bird-premium';\n\nconst client = new XApiV2Client({ \n  bearerToken: process.env.X_BEARER_TOKEN!,\n  // Optional OAuth 1.0a for user context\n  apiKey: process.env.X_API_KEY,\n  apiSecret: process.env.X_API_SECRET,\n  accessToken: process.env.X_ACCESS_TOKEN,\n  accessTokenSecret: process.env.X_ACCESS_TOKEN_SECRET,\n});\n\n// Search tweets\nconst results = await client.searchRecentTweets('Claude AI', { maxResults: 10 });\n\n// Get list tweets\nconst listTweets = await client.getListTweets('1894700501725229467', { maxResults: 50 });\n\n// Get user\nconst user = await client.getUserByUsername('elonmusk');\n```\n\n## API Capabilities\n\n| Feature | Bearer Token | OAuth 1.0a |\n|---------|-------------|------------|\n| Search | ✅ | ✅ |\n| Read tweets | ✅ | ✅ |\n| User profiles | ✅ | ✅ |\n| User tweets | ✅ | ✅ |\n| List timeline | ✅ | ✅ |\n| Followers/Following | ✅ | ✅ |\n| Mentions | ❌ | ✅ |\n| Likes | ❌ | ✅ |\n| Who am I | ❌ | ✅ |\n| Tweet/Reply* | ❌ | ✅ |\n| Like/Retweet* | ❌ | ✅ |\n| Follow/Unfollow* | ❌ | ✅ |\n\n*Write operations require app permissions enabled in Developer Portal.\n\n## Why \"Premium\"?\n\nThis CLI uses the official X API v2 which requires a paid developer account. Unlike the original `bird` which uses undocumented internal GraphQL endpoints with cookie auth, this version:\n\n- ✅ Uses documented, stable API endpoints\n- ✅ Won't break when X rotates query IDs\n- ✅ Respects rate limits properly\n- ✅ Supports official OAuth authentication\n- 💰 Requires X API access ($100+/month for Basic tier)\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-22812813d934f19d1eeb5aa43e71ef12"}