Post your last.fm now playing to your Bluesky followers
Rust 100.0%
6 1 0

Clone this repository

https://tangled.org/geesawra.industries/skeet.fm
git@tangled.org:geesawra.industries/skeet.fm

For self-hosted knots, clone URLs may differ based on your setup.

README.md

Skeet.fm#

A Cloudflare Worker that automatically posts your currently playing Last.fm track to Bluesky.

Overview#

This service monitors your Last.fm account for currently playing tracks and automatically creates posts on Bluesky with embedded album art and track information.

It's designed to run as a scheduled Cloudflare Worker, checking periodically for new songs and avoiding duplicate posts.

Prerequisites#

Configuration#

Environment Variables#

Set the following secrets in your Cloudflare Worker:

Variable Description Required
LASTFM_API_KEY Your Last.fm API key
LASTFM_USERNAME Your Last.fm username
BSKY_USERNAME Your Bluesky handle (e.g., user.bsky.social)
BSKY_PASSWORD Your Bluesky app password
PDS_ADDRESS Bluesky PDS URL (defaults to https://bsky.social)

KV Namespaces#

Create two KV namespaces in Cloudflare:

  1. skeetfm - Stores posted track history
  2. skeetfm_blobcache - Caches album artwork blobs

Deployment#

  1. Clone the repository
  2. Configure your wrangler.toml based on what's available in this repository:
name = "skeetfm"
main = "build/index.js"
compatibility_date = "2025-09-19"

[build]
command = "cargo install -q worker-build && worker-build --release"

[triggers]
crons = [" * * * * *"] # runs every minute, change it however you prefer

[observability]
enabled = true

[[kv_namespaces]]
binding = "skeetfm"
id = "1daf3d0198ef400e9ad03d8495955b03"
preview_id = "1daf3d0198ef400e9ad03d8495955b03"

[[kv_namespaces]]
binding = "skeetfm_blobcache"
id = "a60098e075e54b50814b2ae06f211c36"
preview_id = "a60098e075e54b50814b2ae06f211c36"
  1. Set your secrets:
wrangler secret put LASTFM_API_KEY
wrangler secret put LASTFM_USERNAME
wrangler secret put BSKY_USERNAME
wrangler secret put BSKY_PASSWORD
wrangler secret put PDS_ADDRESS  # Optional
  1. Deploy:
wrangler deploy

Post Format#

Posts appear on Bluesky with:

  • Text: "🎵🎶 Now Playing 🎤🎧🎸"
  • Embedded Card:
    • Album artwork thumbnail
    • Song title
    • Artist name
    • Link to the Last.fm track page

Limitations#

  • Only posts tracks that are currently playing (not recently played)
  • Requires active Last.fm scrobbling from your music player

Security Notes#

  • Store credentials as encrypted secrets, never in code
  • Use app passwords for Bluesky, not your main password
  • Consider the privacy implications of sharing your listening habits