A command-line tool for syncing YouTube playlists. PlaySync allows you to automatically keep your YouTube playlists in sync by adding videos from source playlists to a target playlist, eliminating duplicates and saving you time from manual playlist management.
- Playlist Synchronization: Automatically sync videos from multiple source playlists to a target playlist
- Duplicate Prevention: Intelligent detection ensures videos aren't added twice
- Dry-Run Mode: Preview changes before applying them
- Configuration Management: Store and manage your playlist setup locally
- OAuth2 Authentication: Secure authentication with YouTube using OAuth2
- Multiple Playlist Support: Configure and manage multiple playlist sync rules
- Save Time: No more manually adding videos to playlists
- Stay Updated: Keep your playlists current with videos from multiple sources
- Avoid Duplicates: Never worry about the same video being added multiple times
- Flexible Configuration: Set up different sync rules for different playlists
- Safe Dry-Runs: Test your sync configuration before making actual changes
- YouTube API credentials (OAuth2 JSON file)
macOS (Homebrew)
brew tap KilDesu/playsync
brew install playsyncWindows (Scoop)
scoop install https://github.com/KilDesu/playsync/releases/latest/download/playsync.jsonLinux / manual download
# pick the target that matches your platform
curl -LO https://github.com/KilDesu/playsync/releases/latest/download/playsync-x86_64-unknown-linux-gnu.zip
unzip playsync-x86_64-unknown-linux-gnu.zip
chmod +x playsync
sudo mv playsync /usr/local/bin/git clone https://github.com/KilDesu/playsync
cd playsync
cargo build --releaseThe compiled binary will be located at target/release/playsync.
- Go to Google Cloud Console
- Create a new project
- Enable the YouTube Data API v3
- Create OAuth2 credentials (Desktop application)
- Download the credentials as a JSON file
Set the path to your OAuth2 JSON file:
playsync config --oauth2-json /path/to/your/oauth2.jsonAdd a target playlist that will receive videos:
playsync config --add YOUR_TARGET_PLAYLIST_IDWhen prompted, specify the source playlist IDs you want to sync from (space-separated).
List all configured playlists:
playsync config --listSync all configured playlists:
playsync syncSync only one playlist by its ID:
playsync sync --id YOUR_PLAYLIST_IDPreview what would be synced without making changes:
playsync sync --dry-runFor a specific playlist:
playsync sync --id YOUR_PLAYLIST_ID --dry-runReset Configuration:
playsync config --resetRemove a Playlist:
playsync config --remove YOUR_PLAYLIST_IDView Help:
playsync config --help
playsync sync --helpPlaySync stores its configuration in your system's config directory:
- Linux:
~/.config/rs.playsync/ - macOS:
~/Library/Application Support/rs.playsync/ - Windows:
%APPDATA%\rs.playsync\
The configuration file (playsync.toml) contains:
- OAuth2 JSON file path
- List of playlists with their sync rules
The token cache (token_cache.json) is also stored in the same directory for authentication purposes.
- Retrieves Videos: Gets the list of videos from all source playlists
- Checks Target: Compares against videos already in the target playlist
- Identifies New Videos: Finds videos that aren't already in the target
- Adds Videos: Adds new videos to your target playlist
- Reports Results: Shows you which videos were added and any errors
Run: playsync config --oauth2-json /path/to/your/oauth2.json
- Verify your OAuth2 JSON file path is correct
- Ensure the file hasn't been deleted or moved
- Try deleting
token_cache.jsonfrom your config directory and authenticating again
- Check your source playlist IDs are correct
- Ensure the videos aren't already in the target playlist
- Verify your YouTube API quota hasn't been exceeded
- Try a dry-run first:
playsync sync --dry-run
To run syncs automatically, use your system's task scheduler:
# Edit crontab
crontab -e
# Example: Sync every day at 9 AM
0 9 * * * /path/to/playsync sync- Open Task Scheduler
- Create a new task to run:
playsync sync(write the full path to the executable if it is not in your PATH) - Set your desired schedule
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
For issues, questions, or suggestions, please open an issue on GitHub.