Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elizabethsiegle/offby1-bluesky-bot
Automate posts to BlueSky with Cloudflare Workers, Cron Triggers, and the Blue Sky API
https://github.com/elizabethsiegle/offby1-bluesky-bot
bluesky cloudflare cloudflare-workers cron-triggers
Last synced: about 2 months ago
JSON representation
Automate posts to BlueSky with Cloudflare Workers, Cron Triggers, and the Blue Sky API
- Host: GitHub
- URL: https://github.com/elizabethsiegle/offby1-bluesky-bot
- Owner: elizabethsiegle
- Created: 2024-11-14T00:27:24.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-14T23:28:13.000Z (about 2 months ago)
- Last Synced: 2024-11-14T23:30:56.987Z (about 2 months ago)
- Topics: bluesky, cloudflare, cloudflare-workers, cron-triggers
- Language: TypeScript
- Homepage:
- Size: 118 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automate Posts to BlueSky with BlueSky API, Cloudflare Workers, Cron Triggers
This is a [Cloudflare Workers](https://workers.cloudflare.com/) application that makes use of [Cron Triggers](https://developers.cloudflare.com/workers/configuration/cron-triggers/) to automate posting once a day to [Blue Sky](https://bsky.app/).Check it out on [Blue Sky here](https://bsky.app/profile/offby1bot.bsky.social)!
## Setup
Copy [.dev.vars.example](./.dev.vars.example) to `.dev.vars` and add your `BLUESKY_USERNAME` and `BLUESKY_PASSWORD`.```bash
npm install
npx wrangler login # if it's your first time here
```In [wrangler.toml](./wrangler.toml), you can set the time to post in the `crons` array beneath the `triggers` configuration. Reminder--cron tabs are written in UTC. I used the [Cloudflare Workers AI LLM Playground](https://playground.ai.cloudflare.com/) to generate my cron tabs using this system message from my wonderful teammate [Craig Dennis](https://twitter.com/craigsdennis):
```
You help write cron tabs.The user will give you a description of time they are looking for and your job is to generate a cron tab string.
The user will specify timezones, you know the server runs in UTC.
Return the cron tab and the explanation.
```## Develop locally
```bash
npm run dev
```## Deploy
```bash
npm run deploy
```