One-way playlist sync: mirrors your YouTube Music playlists into Gaana. YouTube Music is the source of truth; Gaana is the mirror. Additions only — deleting a track from the source does not delete it from Gaana (yet).
pipx install playlist-sync-tool(Or, from a clone: pip install -e ".[dev]" inside a virtualenv.)
playlist-sync auth setup ytmusic
playlist-sync auth setup gaanaEach command asks for that service's session credentials (captured from your
own logged-in browser session) and stores them locally at
~/.config/playlist-sync/<service>.json, permissioned 0600. Nothing is
ever sent anywhere except that service's own servers.
- YT Music: follow ytmusicapi's browser-auth guide to capture your request headers, then paste the resulting JSON when prompted.
- Gaana: log into gaana.com, open DevTools → Network, and copy the
tokenquery-parameter value from any authenticated request (e.g. an add-to-playlist or "like" call), then paste it when prompted.
- Gaana's public search API returns no duration or album info for a track, so YT Music → Gaana matches are decided on title+artist fuzzy similarity alone — the ±3s duration safety net only ever applies when both sides happen to report a duration, which Gaana's side never does.
- Gaana's write endpoints appear to return HTTP 200 even for some logical
failures (an invalid track/playlist id may not surface as an error at
all). If a track silently doesn't appear after a sync run despite no
reported failure, this is the likely cause — see
docs/superpowers/spikes/2026-09-07-gaana-write-endpoint.md.
Manual run (prompts you to resolve any ambiguous track matches):
playlist-sync syncScheduled/cron run (never prompts; logs ambiguous tracks to
~/.config/playlist-sync/sync.log and skips them until a manual run
resolves them):
playlist-sync sync --cronExample crontab entry (every 6 hours):
0 */6 * * * /path/to/playlist-sync sync --cronSet PLAYLIST_SYNC_CONFIG_DIR to change where credentials and the local
sync-state database are stored (defaults to ~/.config/playlist-sync).
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytestSee docs/superpowers/specs/2026-09-07-ytmusic-gaana-sync-design.md for the
full architecture writeup, and docs/superpowers/spikes/ for the
reverse-engineering notes on Gaana's undocumented write endpoint.
GPLv3 — see LICENSE.