A Node.js bot that automatically posts your Letterboxd "Now Watching" activity to Bluesky.
- 🎬 Automatically detects when you start watching a film on Letterboxd
- 📱 Posts "Now Watching" updates to Bluesky with film details
- 🎯 Includes director information and film metadata
- 🔄 Runs on a configurable schedule (default: every 10 minutes)
- 📊 SQLite database for tracking posted items
- 📝 Comprehensive logging with structured output
- Node.js 18+
- npm or yarn
- A Bluesky account
- A Letterboxd account with RSS feed enabled
- Clone the repository:
git clone https://github.com/dsamojlenko/bsky-letterboxd.git
cd bsky-letterboxd- Install dependencies:
npm install- Create a
.envfile with the following variables:
# Bluesky credentials
BSKY_USERNAME=your-bluesky-handle
BSKY_PASSWORD=your-app-password
# Letterboxd settings
LETTERBOXD_USERNAME=your-letterboxd-username
FEED_URI=https://letterboxd.com/your-username/rss/
# Database
DATABASE_FILE=./letterboxd.db
# Optional: Set to 'development' for debug logs
NODE_ENV=production- Go to your Letterboxd profile
- Click on the RSS icon or go to
https://letterboxd.com/your-username/rss/ - Copy this URL for the
FEED_URIenvironment variable
- Go to Bluesky Settings → Privacy and Security → App Passwords
- Create a new app password for this bot
- Use this app password (not your regular password) in the
.envfile
npm run db:initStart the bot with automatic scheduling:
npm startRefresh feed data manually:
npm run bot:get-feedPost a single "now watching" update:
npm run bot:now-watching- Feed Monitoring: The bot periodically fetches your Letterboxd RSS feed
- Detection: It looks for new "watched" entries that haven't been posted yet
- Metadata Extraction: For each new entry, it fetches additional film metadata (director, etc.)
- Posting: Creates a Bluesky post with the film title, director, and relevant hashtags
- Tracking: Marks the item as posted to avoid duplicates
This bot is designed for a specific Letterboxd workflow:
- Create a "watched" diary entry when you start watching a film
- The bot will detect this and post a "Now watching" update to Bluesky
- If you use Letterboxd differently, you may want to modify the posting text
src/
├── index.ts # Main application entry point
├── types/ # TypeScript type definitions
├── utils/ # Utility functions (logging, config, errors)
├── bsky/ # Bluesky authentication and API
├── bot/ # Bot logic (feed refresh, posting)
├── database/ # Database setup and services
└── scripts/ # Standalone utility scripts
The default schedule runs every 10 minutes. To change this, modify the cron expression in src/index.ts:
const letterboxdJob = new CronJob('*/10 * * * *', async () => {
// Job logic
});Logs are structured JSON in production and include:
- Timestamp
- Log level (ERROR, WARN, INFO, DEBUG)
- Message
- Additional metadata
Set NODE_ENV=development for debug logs.
The bot includes comprehensive error handling for:
- Network failures (Letterboxd/Bluesky API issues)
- Database connection problems
- Authentication failures
- Invalid feed data
Failed operations are logged with context, and the bot will continue running for subsequent attempts.
# Enable debug logging
NODE_ENV=development npm startThe project uses Prettier for code formatting:
npm run format # (if you add this script)The codebase is structured for easy extension:
- Add new bot functions in
src/bot/ - Create new database operations in
src/database/service.ts - Add utility functions in
src/utils/
- "No items to post": Check that your Letterboxd RSS feed contains "watched" entries
- Database errors: Ensure the database file path is writable
- Authentication failures: Verify your Bluesky credentials and app password
- Feed parsing errors: Check that your Letterboxd RSS URL is correct
Enable debug logging by setting NODE_ENV=development in your .env file.
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Support for "Just reviewed" posts
- List creation notifications
- Configurable post templates
- Multiple social media platforms
- Web dashboard for monitoring