Commit Graph
12 Commits
Author SHA1 Message Date
aavetisandClaude Sonnet 4.5 57d1498f1d feat: add news command to fetch AI-curated headlines
Add comprehensive news/trending feature that fetches AI-generated news
headlines from Twitter's "For You" page. This feature specifically
targets the AI-curated news items that Twitter displays under "Today's
News" section, not generic trending hashtags.

- Uses Twitter's ExplorePage GraphQL API endpoint to access the Explore
  page timeline data where AI headlines are located
- AI headlines are identified by the explicit `is_ai_trend: true` flag
  in the API response
- Fallback heuristic detection for full-sentence headlines (5+ words)
  with "News" or time indicators in social context
- Headlines are found in "stories-*" modules within the initialTimeline
  structure under a "Today's News" header
- Follows the existing mixin pattern (withNews) for composability
- Supports both AI-only filtering and mixed trending/AI results

- `bird news` - Fetch news and trending topics (mixed results)
- `bird news --ai-only` - Fetch ONLY AI-curated headlines
- `bird news -n <count>` - Limit number of results
- `bird news --json` - Output as JSON
- `bird news --json-full` - Include raw API response
- `bird news --with-tweets` - Enrich with related tweets
- `bird trending` - Alias for news command
- AI headlines are clearly marked with "AI · " category prefix
- Automatic deduplication of duplicate headlines
- Rich formatting with category, time, post count, and URLs

- src/commands/news.ts - CLI command implementation
- src/lib/twitter-client-news.ts - Core news fetching functionality
- tests/commands.news.test.ts - Command validation tests (7 tests)
- tests/twitter-client-coverage.news.test.ts - API coverage tests (7 tests)

- README.md - Added documentation for news command
- src/cli/program.ts - Registered news command
- src/lib/index.ts - Exported news-related types
- src/lib/twitter-client.ts - Integrated withNews mixin
- src/lib/query-ids.json - Added ExplorePage query ID
- src/lib/twitter-client-constants.ts - Added ExplorePage constant
- src/lib/twitter-client-features.ts - Added buildExploreFeatures()
- scripts/update-query-ids.ts - Added ExplorePage to update script

- All 268 existing tests continue to pass
- Added 14 new tests covering command validation and API functionality
- Tested with real Twitter data confirming AI headline detection
- All TypeScript compilation and linting checks pass

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
2026-01-12 05:32:06 +00:00
Mariano Belinky 04a0c98362 feat: add unbookmark command to remove bookmarks 2026-01-05 02:10:10 +00:00
Harper ReedandClaude Opus 4.5 7818440d65 feat(lists): add support for Twitter Lists
Add commands to fetch owned lists, list memberships, and list timelines:
- `bird lists` shows lists you own
- `bird lists --member-of` shows lists you're a member of
- `bird list-timeline <id-or-url>` fetches tweets from a list

Includes full --json and --json-full support for list timeline output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-03 16:55:29 +01:00
Peter Steinberger 42e5124174 fix: seed bookmark query ids 2026-01-01 11:52:51 +01:00
Peter Steinberger 578e38d427 build: refresh query ids 2026-01-01 11:31:55 +01:00
Peter Steinberger 9dccb6a3b9 chore: merge origin/main 2026-01-01 11:31:29 +01:00
Peter Steinberger e5599c7731 build: update query id updater for likes 2026-01-01 09:55:01 +01:00
thelockmeister 34f45fece7 feat: add following and followers commands
Add two new commands to list users:
- `bird following` - list users that you (or another user) follow
- `bird followers` - list users that follow you (or another user)

Both commands support:
- `--user <userId>` to query another user's following/followers
- `-n <count>` to limit results
- `--json` for structured output

Uses Twitter's GraphQL Following/Followers endpoints with proper
feature flags and query ID rotation support.
2026-01-01 09:06:17 +13:00
Peter Steinberger 80a57c825f fix(graphql): keep query ids fresh 2025-12-26 13:10:43 +01:00
Peter Steinberger fdf099ff70 fix(twitter): refresh TweetDetail query ids 2025-12-20 11:56:30 +01:00
Peter Steinberger bc7139dff9 feat(twitter): improve graphql search and threads 2025-12-20 11:29:02 +01:00
Peter Steinberger 0f6cc5c663 Add engine switch and Sweetistics endpoints for tweet reading 2025-12-02 14:53:35 +00:00