Skip to content

feat: add list management commands#64

Open
bokan wants to merge 3 commits intosteipete:mainfrom
bokan:feat/list-management
Open

feat: add list management commands#64
bokan wants to merge 3 commits intosteipete:mainfrom
bokan:feat/list-management

Conversation

@bokan
Copy link

@bokan bokan commented Jan 24, 2026

Summary

Add list member management commands while preserving all existing functionality.

New Commands

bird list members <id>              # get members of a list
bird list members <id> --all        # all members (paginated)
bird list add <list> <user>         # add user to list
bird list remove <list> <user>      # remove user from list

Unchanged (backwards compatible)

bird lists                          # show owned lists
bird lists --member-of              # lists you're a member of
bird list-timeline <id>             # tweets from list

Features

  • Pagination support (--cursor, --all, --max-pages)
  • Works with list IDs or URLs
  • User lookup by handle or URL for add/remove
  • JSON output for all commands

Implementation

  • New GraphQL endpoints: ListMembers, ListAddMember, ListRemoveMember
  • ListMembersResult, ListMutationResult types
  • Uses parseUsersFromInstructions helper for robust user parsing
  • 404 retry pattern with query ID refresh

Test plan

  • Build passes
  • 434 tests pass (13 new tests added)
  • Manual testing of all commands
  • Original commands still work unchanged

bokan added 3 commits January 24, 2026 17:06
Refactor lists to subcommand pattern with full list management:

Commands:
- bird list              # show owned lists (default)
- bird list ls           # list owned lists
- bird list ls --member-of  # lists you're a member of
- bird list timeline <id>   # tweets from list
- bird list members <id>    # members of list (with --all/--cursor pagination)
- bird list add <list> <user>    # add user to list
- bird list remove <list> <user> # remove user from list

Implementation:
- Add ListMembers, ListAddMember, ListRemoveMember query IDs
- Add ListMembersResult, ListMutationResult types
- Implement getListMembers(), addListMember(), removeListMember()
- Use parseUsersFromInstructions helper for robust user parsing
- Full pagination support with --cursor/--all/--max-pages
- Count validation for all commands
- Add 'list' to KNOWN_COMMANDS for proper CLI arg parsing
- Add tests for getListMembers (success, pagination, errors, 404 retry)
- Add tests for addListMember/removeListMember (success, errors, 404 retry)
- Update test fixtures with new query ID stubs
Keep original commands unchanged:
- bird lists (unchanged)
- bird list-timeline (unchanged)

Add new commands as additions only:
- bird list members <id>
- bird list add <list> <user>
- bird list remove <list> <user>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant