Return of honkbot, in Rust. Hopefully it won't die all the time.
README.md

Honkbot (Rust) #

A single Bluesky bot that listens to the full firehose via Jetstream and replies to animal commands with random Flickr images.

Rewrite of bskybots/honkbot in Rust for reliability and performance.

Commands #

Command Animal Reply Text
/honk Goose HONK
/awoo Wolf AWOO
/baaa Goat BAAA
/bork Dog/Puppy BORK
/hiss Snake HISS
/hoot Owl HOOT
/meehh Sheep MEEHH
/meow Cat MEOW
/mumble Marmot MUMBLE
/oink Pig OINK
/ribbit Frog RIBBIT
/squee Capybara SQUEE
/yowl Bobcat YOWL

Setup #

  1. Copy .env.example to .env and fill in your credentials:

    • BSKY_HANDLE — your bot's Bluesky handle
    • BSKY_PASSWORD — an app password for the bot account
    • FLICKR_KEY — a Flickr API key (get one here)
  2. Seed fallback images (used when Flickr is down or rate-limited):

    ./seed_fallback_images.sh
    

    This downloads ~12 images per category into fallback_images/. You can also manually add your own .jpg/.png/.webp files.

  3. Build and run:

    cargo build --release
    ./target/release/honkbot
    

Features #

  • Single binary handles all 13 animal commands
  • Jetstream WebSocket for efficient firehose consumption (only receives app.bsky.feed.post events)
  • Automatic reconnection with cursor tracking on disconnect
  • Bounded concurrency (10 concurrent reply tasks) to avoid flooding APIs
  • Session refresh with automatic retry on auth failures
  • Flickr fallback images — if Flickr is down or rate-limited, picks a random image from fallback_images/<command>/
  • Image resizing for images over 1MB (Bluesky blob limit)
  • Structured logging via tracing (set RUST_LOG=debug for verbose output)

Architecture #

Jetstream (WSS) → match post text against triggers → spawn bounded task:
  1. Search Flickr for random animal image
  2. Download & resize if needed
  3. Upload blob to Bluesky
  4. Create reply post with image