feat: add bookmark and bookmark-to-folder CLI commands#62
feat: add bookmark and bookmark-to-folder CLI commands#62iammarcin wants to merge 2 commits intosteipete:mainfrom
Conversation
The engagement mixin already exposes client.bookmark() but there was no CLI command to use it. This adds: - `bird bookmark <tweet-id-or-url>` - bookmark a tweet - `bird bookmark-to-folder <tweet-id-or-url> --folder-id <id>` - bookmark to folder Also adds bookmarkTweetToFolder to query IDs and constants. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34f1bd95cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "FavoriteTweet": "lI07N6Otwv1PhnEgXILM7A", | ||
| "CreateBookmark": "aoDbu3RHznuiSkQ9aNM67Q", | ||
| "DeleteBookmark": "Wlmlj2-xzyS1GN3a6cj-mQ", | ||
| "bookmarkTweetToFolder": "4KHZvvNbHNf07bsgnL9gWA", |
There was a problem hiding this comment.
Add new operation to query-id refresh list
The new bookmarkTweetToFolder entry in query-ids.json will be dropped the next time scripts/update-query-ids.ts runs, because its TARGET_OPERATIONS list does not include this operation. That means the refresh process will never update this query ID and the CLI will eventually fail once the ID rotates (even if other IDs are kept current). Consider adding bookmarkTweetToFolder to TARGET_OPERATIONS so the refresh script preserves and updates it.
Useful? React with 👍 / 👎.
Ensures the query ID is preserved during refresh cycles. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Good catch! Added |
Problem
The engagement mixin already exposes
client.bookmark()but there's no CLI command to use it. Users can unbookmark tweets (bird unbookmark) but cannot add bookmarks via CLI.Solution
Adds two new commands:
bird bookmark <tweet-id-or-url>- bookmark a tweetbird bookmark-to-folder <tweet-id-or-url> --folder-id <id>- bookmark to a specific folderAlso adds
bookmarkTweetToFolderto query IDs and constants to support the folder functionality.Changes
src/commands/bookmark.ts- new command mirroring unbookmarksrc/commands/bookmark-to-folder.ts- new command with--folder-idoptionsrc/lib/twitter-client-engagement.ts- addedbookmarkToFolder()methodsrc/lib/twitter-client-constants.ts- addedbookmarkTweetToFolderquery IDsrc/lib/query-ids.json- addedbookmarkTweetToFolderquery IDsrc/cli/program.ts- registered new commandsTesting
Tested end-to-end on a production integration. Both commands work correctly with cookie-based auth.
Vibe coded with Claude Opus 4.5.