bsky
A Bluesky (AT Protocol) client library for Node — post, thread, reply, quote, engage, read, and search
Features
- Full posting — posts with rich-text facets (links, hashtags, mentions), replies, quotes, image embeds, and self-threads.
- Engagement — like, repost, follow, and all their reversals.
- Reading — home timeline, author feeds, notifications, profiles, and full threads.
- Search — posts and actors.
- Surface-agnostic — plain async functions over the raw AT Protocol XRPC API; no SDK, zero runtime dependencies.
- ESM + types — fully typed, tree-shakeable.
Install
npm install @kud/bskyUsage
Authentication uses your Bluesky App Password (Settings → App Passwords) via two environment variables — BLUESKY_HANDLE and BLUESKY_APP_PASSWORD:
import { createPost, getTimeline, searchPosts } from "@kud/bsky"
await createPost("hello from @kud/bsky 🦋")
const feed = await getTimeline(20)
const hits = await searchPosts("at protocol")Replies, quotes, and threads:
await createPost("nice thread!", {
replyTo: "https://bsky.app/profile/…/post/…",
})
await createThread(["1/", "2/", "3/"])Powers
This core backs @kud/bsky-cli (a terminal client) and @kud/mcp-bsky (an MCP server) — the CLI and MCP are thin surfaces over this one library.
Development
git clone https://github.com/kud/bsky.git
cd bsky
npm install
npm run dev