Mirror of github.com/ewanc26/bluesky-avatar-updater
  • Rust 92.3%
  • Nix 7.7%
Find a file
2026-07-16 18:22:45 +01:00
.github/ISSUE_TEMPLATE Update issue templates 2025-02-21 18:44:06 +00:00
src docs: add module-level comments 2026-06-29 21:59:28 +01:00
.gitattributes Initial commit 2025-02-21 02:17:36 +00:00
.gitignore docs: add module-level comments 2026-06-29 21:59:28 +01:00
.pre-commit-config.yaml docs: add module-level comments 2026-06-29 21:59:28 +01:00
AGENTS.md docs: correct agent guidance after source audit 2026-07-16 18:22:45 +01:00
Cargo.lock Convert from Python to Rust 2026-06-14 16:27:06 +01:00
Cargo.toml docs: add module-level comments 2026-06-29 21:59:28 +01:00
flake.nix docs: add module-level comments 2026-06-29 21:59:28 +01:00
LICENSE Initial commit 2025-02-21 02:17:36 +00:00
README.md rewrite readme to be more direct 2026-06-29 22:12:58 +01:00

Bluesky Avatar Updater

No Maintenance Intended

Rotates your Bluesky avatar and banner every hour. Written in Rust.

Features

  • Updates avatar and banner on an hourly schedule
  • Loads config from .env
  • Logs to file with 14-day rotation
  • Self-installs as a cron job

Requirements

  • Rust 1.85+

Install

git clone https://github.com/ewanc26/bluesky-avatar-updater.git
cd bluesky-avatar-updater
cargo build --release

Create .env in assets/ (or root):

ENDPOINT=https://bsky.social
HANDLE=your_handle.bsky.social
PASSWORD=your_app_password
DID=did:plc:your_did
UPDATE_BANNER=false

Create assets/cids.json with hourly blob mappings:

{
  "00": { "avatar": "cid_for_midnight", "banner": "banner_cid_for_midnight" },
  "01": { "avatar": "cid_for_1am", "banner": "banner_cid_for_1am" }
}

Usage

cargo run --release

On startup it:

  1. Loads config
  2. Checks the endpoint is healthy
  3. Reads CID mappings from assets/cids.json
  4. Picks the avatar/banner for the current hour
  5. Logs into Bluesky, updates the profile
  6. Makes sure an hourly cron job exists

Files

  • src/main.rs — Orchestration
  • src/bsky.rs — Bluesky API + blob handling
  • src/cron.rs — Cron job management
  • src/utils.rs — Utilities and env validation
  • assets/cids.json — Hour-to-CID mappings

Licence

MIT