A command-line tool for syncing your watched history from Plex to Jellyfin using IMDb IDs for accurate matching.
Great for migrating from Plex or keeping Jellyfin in sync with your real watch progress.
- ✅ Sync watched movies and episodes from Plex to Jellyfin
- ✅ Uses IMDb ID for reliable item matching
- ✅ Interactive command-line interface
- ✅ Works on Windows, macOS, and Linux
- ✅ Includes reset and stats features
git clone https://github.com/linkek/plex-jellyfin-sync
cd plex-jellyfin-sync
npm installcp config.json.example config.jsonThen edit config.json to match your setup.
Your config.json should look like this:
{
"plexBase": "http://localhost:32400",
"jellyfinBase": "http://localhost:8096",
"jellyfinApiKey": "123456789abcdef1234567890abcdef",
"debug": false,
"userMappings": [
{
"plexToken": "plexToken1234567890abcdef",
"jellyfinUsername": "username1"
}
]
}You can add more users by extending the userMappings array.
- Go to https://app.plex.tv
- Open DevTools (F12), go to the Network tab
- Find any request and look for
X-Plex-Tokenin the URL - Copy the token and paste it in
config.json
- Open Jellyfin web UI
- Go to Dashboard → API Keys
- Create a new API key for this tool
Run the interactive menu:
npm startAvailable options:
1. Sync watched data from Plex → Jellyfin (one-way)
2. Reset all watched data in Jellyfin for configured users
3. Show watched stats in Plex
4. Show watched stats in Jellyfin
5. Exit
- This tool only syncs from Plex to Jellyfin (not the other way).
- Only Plex items that have IMDb IDs will be synced.
- Jellyfin items must also have correct IMDb metadata for matching.
- Resetting will delete watch history in Jellyfin — use with caution.
- Works with multiple users if configured.
- Node.js (v18 or higher recommended)
- Access to both a Plex server and a Jellyfin server
- IMDb metadata available in both libraries
Set "debug": true in your config.json to print detailed logs for troubleshooting.
Pull requests, suggestions, and improvements are welcome!