ewan's projects — docs
← all docs

bluesky-markov

April 11, 2026 1 min read
blueskybotrustmarkovunmaintained

bluesky-markov is a Rust bot that fetches posts from a source Bluesky account, trains a Markov chain on them, generates new text, and posts it to a destination account at random intervals between 30 minutes and 3 hours.

Status

Unmaintained.

Setup

Requires Rust 1.85+.

git clone git@github.com:ewanc26/bluesky-markov
cd bluesky-markov
cargo build --release

Create .env in the project root:

SOURCE_HANDLE=source.bsky.social
DESTINATION_HANDLE=destination.bsky.social
CHAR_LIMIT=280
SRC_APP_PASS=xxxx-xxxx-xxxx-xxxx
DST_APP_PASS=xxxx-xxxx-xxxx-xxxx
BSKY_HOST_URL=https://bsky.social

Run:

cargo run --release

Structure

  • src/main.rs — Entry point, orchestration, and logging
  • src/bsky.rs — Bluesky login, DID resolution, and API interactions
  • src/clean.rs — Text cleaning and preprocessing
  • src/markov_gen.rs — Post retrieval, Markov chain training, and text generation
  • src/time.rs — Random interval scheduling

Logs are written to log/general.log.

Licence

MIT.


← all docs