Commit Graph
306 Commits
Author SHA1 Message Date
Peter Steinberger 436d4dfb89 refactor: centralize paged tweet printing 2026-01-12 02:09:47 +00:00
Peter Steinberger 5c0d5d1068 refactor: dedupe REST user parsing 2026-01-12 02:09:42 +00:00
Peter Steinberger 0536006012 refactor: extract user lookup mixin 2026-01-12 02:09:37 +00:00
Peter Steinberger 2f0d239b62 Merge pull request #43 from steipete/test/user-tweets-more
test: expand user-tweets coverage
2026-01-12 01:48:44 +00:00
Peter Steinberger 11cc9fbd27 test: expand user-tweets coverage 2026-01-12 01:45:41 +00:00
Peter Steinberger 64b0460c4d Merge pull request #34 from crcatala/feat/user-tweets-command
feat: add user-tweets command to fetch tweets from a user's profile
2026-01-12 01:42:24 +00:00
Peter Steinberger 21701bad5a fix: repair pnpm patchedDependencies 2026-01-12 01:41:10 +00:00
Peter Steinberger 7b5f4b3f2d docs: document user-tweets 2026-01-12 01:35:04 +00:00
Peter Steinberger 4eac0927c1 fix: paginate user-tweets by --count 2026-01-12 01:35:00 +00:00
cc-vpsandChristian Catalan df98e827f6 feat: add user-tweets command to fetch tweets from a user's profile
Adds new CLI command to fetch tweets from any user's profile timeline.

Usage:
  bird user-tweets @username [-n count] [--pages N] [--json]

Features:
- GraphQL UserByScreenName for username → userId resolution
- Cursor-based pagination with configurable delay (rate-limit safe)
- Hard cap of 10 pages to prevent abuse
- Input validation via normalizeHandle()

Includes 17 unit tests and live smoke test.

Co-authored-by: Christian Catalan <[email protected]>
2026-01-12 01:28:04 +00:00
Peter Steinberger 46255e8a38 test: add followers cursor coverage 2026-01-12 00:57:24 +00:00
Peter Steinberger c115232135 Merge pull request #33 from VACInc/feat/following-pagination
feat(following): add pagination support for following list
2026-01-12 00:47:07 +00:00
Peter Steinberger dec78547fe test: split following/likes tests (#33) (thanks @VACInc) 2026-01-12 00:46:32 +00:00
Peter Steinberger baede65f77 fix: following pagination returns cursor and errors (#33) (thanks @VACInc) 2026-01-12 00:41:34 +00:00
Peter Steinberger 138b643d8a test: add print output coverage (#32) (thanks @odysseus0) 2026-01-11 23:38:44 +00:00
Peter Steinberger 5fc6f53871 Merge pull request #32 from odysseus0/feat/text-output
feat: improve text output with article preview, quote tweets, and media
2026-01-11 23:35:48 +00:00
Peter Steinberger ba22d86f70 docs: changelog for text output (#32) (thanks @odysseus0) 2026-01-11 23:35:35 +00:00
Peter Steinberger 15aa24d2b1 fix: honor output flags in text rendering 2026-01-11 23:35:03 +00:00
George ZhangandClaude Opus 4.5 a48aa6db88 fix: remove duplicate title field in GraphqlTweetResult article type
The article type had title defined twice (at lines 83 and 135), causing
TypeScript compilation to fail with TS2300: Duplicate identifier 'title'.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 23:35:03 +00:00
George ZhangandClaude Opus 4.5 d40c048333 fix: improve article detection and quote tweet display
- Use startsWith check instead of fragile length heuristic for
  detecting full article body vs preview mode
- Add media display for quote tweets (🖼️/🎬/🔄 indicators)
- Add preview_text to GraphqlTweetResult type definition to avoid
  type assertions

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 23:35:03 +00:00
George Zhang 0475a2e1b6 test: add tests for article metadata extraction
- extractArticleMetadata: 6 tests for title/preview extraction
- mapTweetResult: 3 tests for article field inclusion
2026-01-11 23:35:03 +00:00
George Zhang cf78fce646 feat: improve text output with article preview, quote tweets, and media
Enhance the text output format to show more useful information:

- Article tweets: Show 📰 indicator with title + preview text in feeds,
  full body when reading single tweets
- Quote tweets: Display quoted content with ┌─ QT @user formatting
- Media: Show 🖼️/🎬/🔄 indicators with URLs for photos/videos/GIFs

Also refactors single tweet read to use shared printTweets function
for consistent formatting.
2026-01-11 23:35:03 +00:00
Peter Steinberger de49a66601 docs: add home live test steps 2026-01-11 11:39:35 +00:00
Peter Steinberger b29b446d18 Merge pull request #31 from odysseus0/feat/home-timeline
feat: add home timeline command
2026-01-11 11:37:57 +00:00
Peter Steinberger 94773c66dc fix: harden home timeline pagination (#31) (thanks @odysseus0) 2026-01-11 11:36:59 +00:00
George ZhangandClaude Opus 4.5 92742cac38 refactor: rename --latest to --following for clarity
Matches Twitter's UI terminology ("For You" vs "Following" tabs),
making the flag immediately understandable to users.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 11:35:57 +00:00
George ZhangandClaude Opus 4.5 5bb9e48252 refactor: move home query ID methods to mixin as private
Follow the pattern from twitter-client-timelines.ts where query ID
methods are private to the mixin that uses them, rather than protected
in the base class.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 11:35:57 +00:00
George Zhang 73b8cff1b2 test: add home timeline API tests
- getHomeTimeline: success, error, API error handling
- getHomeLatestTimeline: success, error handling
- pagination: deduplication across pages

Uses realistic fixture structure based on actual API responses.
2026-01-11 11:35:57 +00:00
George Zhang ba7b00eb29 feat: add home timeline command
Add `bird home` command to fetch the authenticated user's home timeline.

- Supports "For You" feed (default) and "Following" feed (--latest)
- Uses HomeTimeline and HomeLatestTimeline GraphQL operations
- Includes count option (-n), JSON output, and pagination

Usage:
  bird home           # Get "For You" feed
  bird home --latest  # Get "Following" (chronological) feed
  bird home -n 50     # Fetch 50 tweets
2026-01-11 11:35:57 +00:00
Peter Steinberger 05e54350c7 Merge pull request #30 from zheli/feature/list-timeline-pagination
Add pagination support for list timeline
2026-01-11 11:28:01 +00:00
Peter Steinberger 6cf177f92f fix: list timeline pagination (#30) (thanks @zheli) 2026-01-11 11:27:46 +00:00
Zhe LiandClaude Sonnet 4.5 ebcd1618f9 feat: make --max-pages imply --all for list-timeline
- Remove requirement for --max-pages to be used with --all
- Update help text to clarify --max-pages implies --all
- Add list-timeline documentation to README with examples

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

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
2026-01-11 11:17:27 +00:00
Zhe Li 8fc208ca31 Apply suggestions from code review 2026-01-11 11:17:27 +00:00
Zhe LiandClaude Sonnet 4.5 803bd25b0c feat: add pagination support to list-timeline command
Adds --all, --max-pages, and --cursor options to list-timeline command, enabling users to fetch all tweets from a list through automatic pagination. Follows the same pattern as bookmarks pagination for consistency.

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

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
2026-01-11 11:17:27 +00:00
Peter Steinberger bda980fa4d Merge pull request #29 from mafulafunk/feature/clickable-terminal-urls
feat: add clickable hyperlinks for URLs in terminal output
2026-01-11 11:11:54 +00:00
Peter Steinberger 0a4699711f fix: sanitize hyperlink OSC output (#29) (thanks @mafulafunk) 2026-01-11 11:11:21 +00:00
Martin FunkandClaude Opus 4.5 837b09fcad feat: add clickable hyperlinks for URLs in terminal output
Use OSC 8 escape sequences to make tweet and list URLs clickable
in supported terminals (iTerm2, Ghostty, Kitty, WezTerm, VS Code, etc.).

- Add hyperlink() helper function in output.ts
- Apply hyperlinks in printTweets() for tweet URLs
- Apply hyperlinks in printLists() for list URLs
- Add hyperlinks flag to OutputConfig (auto-disabled for non-TTY)
- Automatically falls back to plain text in --plain mode or when piped

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 11:10:34 +00:00
Peter Steinberger bbc90dbe08 docs: add manual live follow test 2026-01-11 11:09:48 +00:00
Peter Steinberger e39b430beb test: add users command pagination cases 2026-01-11 11:09:44 +00:00
Peter Steinberger f4e7b9c51c Merge pull request #28 from malpern/feat/following-followers-pagination
feat: add cursor-based pagination for following/followers commands
2026-01-11 11:02:40 +00:00
Peter Steinberger 092be1a782 fix: harden follow pagination output (#28) (thanks @malpern) 2026-01-11 11:02:09 +00:00
Micah AlpernandClaude Opus 4.5 39a477265c feat: add cursor-based pagination for following/followers commands
Add pagination support to `bird following` and `bird followers` commands,
similar to existing pagination in search/bookmarks/likes.

Changes:
- Add `cursor` parameter to `getFollowing()` and `getFollowers()` client methods
- Return `nextCursor` in `FollowingResult` for pagination continuation
- Add `--cursor <cursor>` CLI option for manual pagination
- Add `--all` CLI flag to automatically fetch all pages
- Add `--max-pages <number>` option to limit pages when using --all
- Add input validation for --max-pages (requires --all or --cursor)
- Add deduplication using Set to prevent duplicate users
- Add 1-second delay between pages to avoid overwhelming the API
- Update `-n/--count` description to clarify it's per-page
- Add unit tests for cursor parameter and nextCursor response

Usage examples:
  # Fetch first page (default 20 users)
  bird following

  # Fetch with specific page size
  bird following -n 50

  # Use cursor for next page
  bird following --cursor "CURSOR_FROM_PREVIOUS"

  # Fetch ALL following users automatically (with rate limiting)
  bird following --all --json

  # Limit to first 5 pages
  bird following --all --max-pages 5

  # Same options work for followers
  bird followers --all

Note: REST API fallback does not support cursor pagination.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-11 10:59:35 +00:00
Peter Steinberger ad125348d6 test: expand lists feature coverage 2026-01-11 10:58:47 +00:00
Peter Steinberger e782b08a5e Merge pull request #27 from zheli/fix/lists-api-features
Add required lists GraphQL feature flags
2026-01-11 10:43:56 +00:00
Peter Steinberger ad1d5f24cd fix: add lists feature flags (#27) (thanks @zheli) 2026-01-11 10:43:33 +00:00
Zhe Li 892fe25970 Update src/lib/twitter-client-features.ts 2026-01-11 10:42:17 +00:00
Zhe Li d1de42e91b fix: add required lists API features 2026-01-11 10:42:17 +00:00
Zhe LiandClaude Sonnet 4.5 ec09010122 fix: add required API features to buildListsFeatures
X/Twitter now requires vibe_api_enabled, responsive_web_text_conversations_enabled, tweetypie_unmention_optimization_enabled, and interactive_text_enabled to be explicitly set in lists API requests.

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

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
2026-01-11 10:42:17 +00:00
Peter Steinberger 3c2107d5d1 Merge pull request #12 from titouv/paginate-fix
Paginate for bookmarks and likes
2026-01-11 10:32:51 +00:00
Peter Steinberger 2e03bd8c07 fix: paginate likes + avoid duplicate loops (#12) (thanks @titouv) 2026-01-11 10:31:47 +00:00