Something went wrong. Try again.
Monitors Bluesky accounts for new mentions and LLM-classified relevant posts - sending notifications to a Discord webhook
Something went wrong. Try again.
Files
- TypeScript 96%
- Dockerfile 3%
- 1%
README.md
bluesky-discord-webhooks #
Monitors Bluesky accounts for new mentions and LLM-classified relevant posts - sending notifications to a Discord webhook.
Running #
You'll need Node 26 or above, and pnpm 12. You'll also need to configure it, which you can see how to do below.
pnpm install
pnpm dev # or pnpm start
Configuration #
Primarily the config.json is used, but you can also configure a few items as environment variables.
config.json #
{
"$schema": "https://tangled.org/did:plc:mhygy6e33lsgkel2yoem32uz/raw/main/config.schema.json",
"ai": {
"endpoint": "https://your-ai-api.example.com/v1/chat/completions",
"apiKey": "your-api-key",
"model": "qwen-3.6-35b-a3b",
},
"webhook": "https://discord.com/api/webhooks/...",
"mention": ["your-account.bsky.social"],
"watch": [
{
"account": "bob.bsky.social",
"prompt": "posts about web development",
},
],
}
.env #
| Variable | Description | Default |
|---|---|---|
AI_ENDPOINT |
AI chat completions URL | (required if not in config.json) |
AI_API_KEY |
API Key | (required if not in config.json) |
AI_MODEL |
AI model name | (required if not in config.json) |
WEBHOOK_URL |
Discord webhook URL | (required if not in config.json) |
ai: Configuration for the LLM used to classify posts. All three fields (endpoint,apiKey,model) are required.webhook: Discord webhook URL for sending notifications.mention: Bluesky accounts whose mentions you want to be notified about. Checked via Spacedust in real time.watch: Accounts whose posts will be analysed by the LLM against your custom prompt, via real-time Jetstream stream.
Run pnpm generate:schema to regenerate config.schema.json from the Valibot schema.
How it works #
The app runs two concurrent listeners:
- Mention listener - Connects to Spacedust by Microcosm which emits links seen in the atproto firehose event stream, and because posts contain a link to the accounts they mention we can ask Spacedust to tell us anytime it sees one.
- Jetstream listener - Connects to Bluesky Jetstream, a real-time event stream from the AT Protocol. It listens for posts from accounts in your
watchlist, sends them to the configured LLM for relevance classification, and notifies if the model deems them relevant.
All notifications are delivered as colour-coded embeds to a single Discord webhook URL.