semantic bufo search find-bufo.com
bufo
at main 53 lines 1.5 kB view raw view rendered
1# bufo-bot 2 3bluesky bot that listens to the jetstream firehose and quote-posts matching bufo images. 4 5## how it works 6 71. connects to bluesky jetstream (firehose) 82. for each post, checks if text contains an exact phrase matching a bufo name 93. if matched, quote-posts with the corresponding bufo image 10 11## matching logic 12 13- extracts phrase from bufo filename (e.g., `bufo-let-them-eat-cake` -> `let them eat cake`) 14- requires exact consecutive word match in post text 15- configurable minimum phrase length (default: 4 words) 16 17## configuration 18 19| env var | default | description | 20|---------|---------|-------------| 21| `BSKY_HANDLE` | required | bluesky handle (e.g., `find-bufo.com`) | 22| `BSKY_APP_PASSWORD` | required | app password from bsky settings | 23| `MIN_PHRASE_WORDS` | `4` | minimum words in phrase to match | 24| `POSTING_ENABLED` | `false` | must be `true` to actually post | 25| `COOLDOWN_MINUTES` | `120` | don't repost same bufo within this time | 26| `EXCLUDE_PATTERNS` | `...` | exclude bufos matching these patterns | 27| `JETSTREAM_ENDPOINT` | `jetstream2.us-east.bsky.network` | jetstream server | 28 29## local dev 30 31```bash 32# build 33zig build 34 35# run locally (dry run by default) 36./zig-out/bin/bufo-bot 37``` 38 39## deploy 40 41```bash 42# set secrets (once) 43fly secrets set BSKY_HANDLE=find-bufo.com BSKY_APP_PASSWORD=xxxx -a bufo-bot 44 45# deploy 46fly deploy 47 48# enable posting 49fly secrets set POSTING_ENABLED=true -a bufo-bot 50 51# check logs 52fly logs -a bufo-bot 53```