Skip to content

feat(bluesky): add Bluesky adapter with 9 commands#215

Open
0xsline wants to merge 1 commit intojackwener:mainfrom
0xsline:feat/bluesky-adapter
Open

feat(bluesky): add Bluesky adapter with 9 commands#215
0xsline wants to merge 1 commit intojackwener:mainfrom
0xsline:feat/bluesky-adapter

Conversation

@0xsline
Copy link
Contributor

@0xsline 0xsline commented Mar 21, 2026

Summary

Add Bluesky adapter with 9 public API commands using the AT Protocol. All commands are completely public — no browser, no login, no API key needed.

New Commands

Command Description Example
profile User profile info opencli bluesky profile --handle bsky.app
user Recent posts opencli bluesky user --handle bsky.app --limit 10
trending Trending topics opencli bluesky trending --limit 10
search Search users opencli bluesky search --query "AI"
feeds Popular feed generators opencli bluesky feeds --limit 10
followers User's followers opencli bluesky followers --handle bsky.app
following User's following opencli bluesky following --handle bsky.app
thread Post thread + replies opencli bluesky thread --uri "at://..."
starter-packs User's starter packs opencli bluesky starter-packs --handle bsky.app

Technical Notes

  • Uses public.api.bsky.app public endpoint (AT Protocol / XRPC)
  • All commands are strategy: public, browser: false — pure fetch pipelines
  • Response time ~1.3-1.7s per command

Test plan

  • profile --handle bsky.app — 32.4M followers, 729 posts
  • user --handle bsky.app — posts with likes (932), reposts (111), replies (33)
  • trending — Robert Mueller, Iran Relations, Caturday, Liverpool
  • search --query AI — returns user handles and descriptions
  • feeds — Discover (38807 likes), Popular With Friends (40947)
  • followers --handle bsky.app — follower list
  • following --handle bsky.app — Punchbowl News, WNBA, Bluesky Safety
  • thread — 933 likes, 111 reposts, 33 replies
  • starter-packs --handle bsky.app — Illinois Primaries, Oscars, NBA Playoffs
  • All 258 existing unit tests pass (zero regression)

Bluesky (9 commands, public AT Protocol API, no auth needed):
- profile: user profile info (followers, following, posts)
- user: recent posts from a user with engagement stats
- trending: trending topics on Bluesky
- search: search users
- feeds: popular feed generators
- followers: list user's followers
- following: list accounts a user follows
- thread: post thread with replies
- starter-packs: user's starter packs

All commands use the public Bluesky API, no browser or login required.
Copy link
Contributor

@Astro-Han Astro-Han left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice coverage of the AT Protocol — 9 commands is solid. A few issues, some blocking:

thread.yaml — only shows root post, all replies are lost

getPostThread returns { thread: { post: {...}, replies: [...] } }. After select: thread, the pipeline wraps this single object as [obj] and maps item.post.author.handle — which only yields the root post. The replies array is never traversed, and the --limit parameter has no effect. This needs a pipeline redesign to flatten the reply tree.

thread.yaml — docs say "or bsky.app URL" but API requires AT URI

The uri parameter description says it accepts bsky.app URLs, but the API endpoint only accepts at:// URIs. Passing a web URL will fail. Either remove the claim or add URL-to-AT-URI conversion.

URL encoding missing

${{ args.query }} in search.yaml is interpolated directly into the query string — spaces in search terms will break the URL. Consider using params: (which auto-encodes via URLSearchParams) or the urlencode filter. Same applies to handle/uri in the other 7 files.

search.yamlfollowersCount may not exist

searchActors returns profileView objects, which per the AT Protocol lexicon don't include followersCount (only profileViewDetailed does). This column will likely be empty.

Documentation examples use --handle but args are positional

The YAML defines handle as positional: true, so opencli bluesky profile bsky.app is the correct usage. The --handle form in docs will cause a commander "unknown option" error.

Missing deliverables

No README, docs/adapters/index.md, config.mts sidebar, or E2E tests.

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.

2 participants