A simple tool which lets you scrape twitter accounts and crosspost them to bluesky accounts! Comes with a CLI and a webapp for managing profiles! Works with images/videos/link embeds/threads.
···1-# 🐦 Tweets-2-Bsky
23-> **Note**: This project is built on top of [**bird**](https://github.com/steipete/bird) by [@steipete](https://github.com/steipete), which provides the core Twitter interaction capabilities.
45-A powerful tool to crosspost your Tweets to Bluesky automatically. Now features a **Web Dashboard** for easy management, **Multi-account support** for different owners, and **Custom PDS** hosting support.
67-## ✨ Features
000000089-- **Web Dashboard**: Modern interface to manage all your sync tasks.
10-- **Multi-User Mapping**: Let others add their accounts (e.g., Dan, Josh) with their own owners.
11-- **Multi-Account Support**: Sync Twitter A -> Bluesky A, Twitter B -> Bluesky B, etc.
12-- **Tailscale Ready**: Accessible over your local network or VPN.
13-- **Interactive CLI**: Manage everything from the terminal with `./crosspost`.
14-- **High Quality**: Supports threads, high-quality images, and videos.
000000000001516----
00001718-## 🚀 Quick Start
1920-### 1. Prerequisites
21-- **Node.js** installed.
22-- A Twitter account (burner recommended) for global cookies.
23-- Bluesky account(s) with **App Passwords**.
2425-### 2. Installation
26```bash
27-git clone https://github.com/j4ckxyz/tweets-2-bsky.git
28-cd tweets-2-bsky
29-npm install
30-npm run build
31```
3233-### 3. Start Syncing & Web UI
34-```bash
35-# This starts both the sync daemon AND the web dashboard
36-npm start
000000037```
38-By default, the web interface runs at **http://localhost:3000**. If you are using Tailscale, it's accessible at `http://your-tailscale-ip:3000`.
3940-### 4. Setup (Web Dashboard)
41-1. Open the dashboard in your browser.
42-2. **Register** a new account (email/password).
43-3. Log in and go to **Global Twitter Config** to enter your cookies.
44-4. Use **Add New Mapping** to connect a Twitter handle to a Bluesky account.
4546----
4748-## 🛠 Advanced Usage
04950-### Disable Web Interface
51-If you only want to run the sync daemon without the web UI:
52-```bash
53-npm start -- --no-web
54-```
5556-### Command Line Interface (CLI)
57-You can still manage everything via the terminal:
58-```bash
59-# Set Twitter cookies
60-./crosspost setup-twitter
6162-# Add a mapping
63-./crosspost add-mapping
00006465-# List/Remove
66-./crosspost list
67-./crosspost remove
68-```
006970-### Backfilling Old Tweets
71-```bash
72-# Example: Import the last 20 tweets for a user
73-npm run import -- --username YOUR_TWITTER_HANDLE --limit 20
74-```
7576----
0007778-## ⚙️ How to get Twitter Cookies
79-1. Log in to Twitter in your browser.
80-2. Open **Developer Tools** (F12) -> **Application** tab -> **Cookies**.
81-3. Copy `auth_token` and `ct0` values.
8283-## ⚖️ License
84-MIT
···1+# Tweets-2-Bsky
23+A powerful tool to crosspost Tweets to Bluesky, supporting threads, videos, and high-quality images.
45+## Features
67+- 🔄 **Crossposting**: Automatically mirrors your Tweets to Bluesky.
8+- 🧵 **Thread Support**: INTELLIGENTLY handles threads, posting them as Bluesky threads.
9+- 📹 **Video & GIF Support**: Downloads and uploads videos/GIFs natively to Bluesky (not just links!).
10+- 🖼️ **High-Quality Images**: Fetches the highest resolution images available.
11+- 🔗 **Smart Link Expansion**: Resolves `t.co` links to their original URLs.
12+- 👥 **Multiple Source Accounts**: Map multiple Twitter accounts to a single Bluesky profile.
13+- ⚙️ **Web Dashboard**: Manage accounts, view status, and trigger runs via a modern UI.
14+- 🛠️ **CLI & Web Support**: Use the command line or the web interface.
1516+## Quick Start
17+18+1. **Clone the repository:**
19+ ```bash
20+ git clone https://github.com/yourusername/tweets-2-bsky.git
21+ cd tweets-2-bsky
22+ ```
23+24+2. **Install dependencies:**
25+ ```bash
26+ npm install
27+ ```
28+29+3. **Build the project:**
30+ ```bash
31+ npm run build
32+ ```
3334+4. **Start the server:**
35+ ```bash
36+ npm start
37+ ```
38+ Access the dashboard at `http://localhost:3000`.
3940+## Updating
4142+To update to the latest version without losing your configuration:
00043044```bash
45+./update.sh
00046```
4748+This script will pull the latest code, install dependencies, and rebuild the project. **Restart your application** after running the update.
49+50+## Configuration & Security
51+52+### Environment Variables
53+54+Create a `.env` file for security (optional but recommended):
55+56+```env
57+PORT=3000
58+JWT_SECRET=your-super-secret-key-change-this
59```
06061+> **⚠️ 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**.
00006263+### Data Storage
6465+- **`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.**
66+- **`data/database.sqlite`**: Stores the history of processed tweets to prevent duplicates.
6768+## Usage
00006970+### Web Interface
00007172+1. Register your first account (this user becomes the **Admin**).
73+2. Go to settings to configure your Twitter Auth Token and CT0 (cookies).
74+3. Add mappings:
75+ * Enter one or more **Twitter Usernames** (comma-separated).
76+ * Enter your **Bluesky Handle** and **App Password**.
77+4. The system will check for new tweets every 5 minutes (configurable).
7879+### CLI
80+81+- **Add Mapping**: `npm run cli add-mapping`
82+- **Edit Mapping**: `npm run cli edit-mapping`
83+- **Import History**: `npm run cli import-history`
84+- **List Accounts**: `npm run cli list`
8586+## Twitter Cookies (Auth)
00008788+You need your Twitter `auth_token` and `ct0` cookies.
89+1. Log in to Twitter/X in your browser.
90+2. Open Developer Tools (F12) -> Application -> Cookies.
91+3. Copy the values for `auth_token` and `ct0`.
9293+## License
0009495+MIT0