Tweets-2-Bsky#
A powerful tool to crosspost Tweets to Bluesky, supporting threads, videos, and high-quality images.
Features#
- 🔄 Crossposting: Automatically mirrors your Tweets to Bluesky.
- 🧵 Thread Support: INTELLIGENTLY handles threads, posting them as Bluesky threads.
- 📹 Video & GIF Support: Downloads and uploads videos/GIFs natively to Bluesky (not just links!).
- 🖼️ High-Quality Images: Fetches the highest resolution images available.
- 🔗 Smart Link Expansion: Resolves
t.colinks to their original URLs. - 👥 Multiple Source Accounts: Map multiple Twitter accounts to a single Bluesky profile.
- ⚙️ Web Dashboard: Manage accounts, view status, and trigger runs via a modern UI.
- 🛠️ CLI & Web Support: Use the command line or the web interface.
Quick Start#
-
Clone the repository:
git clone https://github.com/yourusername/tweets-2-bsky.git cd tweets-2-bsky -
Install dependencies:
npm install -
Build the project:
npm run build -
Start the server:
npm startAccess the dashboard at
http://localhost:3000.
Updating#
To update to the latest version without losing your configuration:
./update.sh
This script will pull the latest code, install dependencies, and rebuild the project. Restart your application after running the update.
Configuration & Security#
Environment Variables#
Create a .env file for security (optional but recommended):
PORT=3000
JWT_SECRET=your-super-secret-key-change-this
⚠️ Security Note: If you do not set
JWT_SECRET, a fallback secret is used. For production or public-facing deployments, YOU MUST SET A STRONG SECRET.
Data Storage#
config.json: Stores your account mappings and encrypted web user passwords. Note that Bluesky app passwords are stored in plain text here to facilitate automated login. Do not share this file.data/database.sqlite: Stores the history of processed tweets to prevent duplicates.
Usage#
Web Interface#
- Register your first account (this user becomes the Admin).
- Go to settings to configure your Twitter Auth Token and CT0 (cookies).
- Add mappings:
- Enter one or more Twitter Usernames (comma-separated).
- Enter your Bluesky Handle and App Password.
- The system will check for new tweets every 5 minutes (configurable).
CLI#
- Add Mapping:
npm run cli add-mapping - Edit Mapping:
npm run cli edit-mapping - Import History:
npm run cli import-history - List Accounts:
npm run cli list
🤖 Gemini AI Alt Text (Optional)#
This tool can automatically generate Alt Text for images using Google's Gemini AI if the original tweet lacks it.
- Get an API Key: Get a free API Key from Google AI Studio.
- Configure:
- Web UI: Go to the Admin Dashboard and paste your key in the "Gemini AI (Alt Text)" section.
- Disable: Leave the field empty to disable this feature (default).
Twitter Cookies (Auth)#
You need your Twitter auth_token and ct0 cookies.
- Log in to Twitter/X in your browser.
- Open Developer Tools (F12) -> Application -> Cookies.
- Copy the values for
auth_tokenandct0.
License#
MIT