AT Protocol Event Stream Client
npm install atproto-firehoseA library for subscribing to AT Protocol Event Streams (aka Firehose) and a
CLI for streaming Bluesky Social events.
Note: This package is intended to be used with Node.js. Currently, it does not work in the
browser.
```
npm install atproto-firehose
or
``
yarn add atproto-firehose
or
``
pnpm add atproto-firehose
`typescript
import {
ComAtprotoSyncSubscribeRepos,
SubscribeReposMessage,
subscribeRepos,
} from 'atproto-firehose'
const client = subscribeRepos(wss://bsky.social, { decodeRepoOps: true })`
client.on('message', (m: SubscribeReposMessage) => {
if (ComAtprotoSyncSubscribeRepos.isCommit(m)) {
m.ops.forEach((op) => {
console.log(op.payload)
})
}
})
This project also provides a CLI tool for streaming from Bluesky Social's firehose.
``
npx atproto-firehose bsky.social
List posts:
``
npx atproto-firehose bsky.social -p app.bsky.feed.post
List likes:
``
npx atproto-firehose bsky.social -p app.bsky.feed.like
List follows:
``
npx atproto-firehose bsky.social -p app.bsky.graph.follow
List profile changes:
```
npx atproto-firehose bsky.social -p app.bsky.actor.profile
MIT