···1-# bufo-bot
2-3-bluesky bot that listens to the jetstream firehose and quote-posts matching bufo images.
4-5-## how it works
6-7-1. connects to bluesky jetstream (firehose)
8-2. for each post, checks if text contains an exact phrase matching a bufo name
9-3. 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
33-zig 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)
43-fly secrets set BSKY_HANDLE=find-bufo.com BSKY_APP_PASSWORD=xxxx -a bufo-bot
44-45-# deploy
46-fly deploy
47-48-# enable posting
49-fly secrets set POSTING_ENABLED=true -a bufo-bot
50-51-# check logs
52-fly logs -a bufo-bot
53-```