← Commit history

Publish 0.2.0

Kyle Bergstedt ·e82c45da0b ·
7 files changed +331
README.mdadded+63
@@ -0,0 +1,63 @@+# Spotify + YouTube Music++Your AI can now work with your music on your Mac. It can see what's in your Spotify library, search YouTube Music, and move playlists from Spotify to YouTube Music. Everything goes through the apps you're already signed in to, so there are no API keys or developer accounts, and no passwords to type.++**Try asking your AI:**+- *"Import all my Spotify playlists to YouTube Music."*+- *"What's in my 'focus' playlist on Spotify?"*+- *"Find 'Midnight City' by M83 on YouTube Music."*+- *"How many of my Spotify songs can you find on YouTube Music? Don't change anything."*++## What it can do++| | Spotify | YouTube Music |+|---|---|---|+| List your playlists | ✓ (with folders) | ✓ |+| Read a playlist's songs | ✓ | – |+| Search | – | ✓ (songs or videos) |+| Create a playlist | – | ✓ (private by default) |+| Delete anything | **never** | **never** |++**Copying playlists from Spotify to YouTube Music** works by matching every song on title, artists and length. It prefers the official track over lyric videos, covers, remixes and live versions. You get a report with each new playlist's link, the songs it wasn't sure about, and the ones it couldn't find. A dry run shows the matches without writing anything, and a run that's interrupted picks up where it stopped.++**Your playlists are safe.** Spotify is read-only. In YouTube Music the bridge only creates new playlists and adds songs to playlists it made itself. Nothing is ever deleted, renamed or reordered.++## Install++It's a regular Adom Bridge bridge. In Adom Bridge, click **+ Bridge** and paste this manifest URL, or have your AI run:++```+adom-bridge bridge_install '{"manifestUrl":"https://wiki.adom.inc/api/v1/pages/kyle/spotify-ytmusic-bridge/files/adom-bridge-spotify-ytmusic-manifest.json"}'+```++It shows up as a card in the Bridges sidebar and updates itself from this page.++This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.++```+adom-wiki pkg install kyle/spotify-ytmusic-bridge+```++## Requirements++- macOS with **Adom Bridge for macOS** 1.9.84 or newer.+- The **Spotify desktop app**, signed in. The first time, the bridge reopens Spotify once with a local debugging port so it can read your library. Your AI asks before it does that.+- **YouTube Music** signed in in Chrome (the YouTube Music web app counts), with the **Adom Native Browser Extension** loaded in that Chrome profile.++## Verbs++| Verb | Purpose |+|---|---|+| `music_readiness` | Check Spotify, the Chrome profile and the extension (read-only) |+| `music_spotify_connect` | Connect to the signed-in Spotify app |+| `music_spotify_playlists` / `music_spotify_tracks` | Your Spotify playlists and their songs |+| `music_ytmusic_playlists` / `music_ytmusic_search` | Your YouTube Music playlists, and search |+| `music_transfer` | Copy Spotify playlists into new YouTube Music playlists (`dryRun`, `playlists`, `includeFollowed`, `privacy`) |+| `music_status` / `music_report` / `music_cancel` | Follow, review and stop a copy |++## How it works++- **Spotify:** the desktop app is a Chromium app. Launched with `--remote-debugging-port` (bound to localhost), it lets the bridge read the session the app already has. The bridge then makes the same read-only requests the app makes itself. Spotify's public Web API rate-limits that session, but the app's own endpoints don't.+- **YouTube Music:** each request is a `fetch()` inside a minimized `music.youtube.com` tab in your own Chrome, sent through the Adom Native Browser Extension. Your cookies never leave the browser.++**Limits for now:** Liked Songs isn't copied, and copying runs one way only (Spotify to YouTube Music). Songs that aren't on YouTube Music show up in the report as missing.
SKILL.mdadded+74
@@ -0,0 +1,74 @@+---+name: spotify-ytmusic+description: "Drive Spotify and YouTube Music on the user's Mac through the Spotify + YouTube Music bridge (music_* verbs on Adom Bridge): list Spotify playlists and their songs from the signed-in Spotify desktop app (read-only), search YouTube Music and list its playlists in the user's real signed-in Chrome, and copy Spotify playlists into new YouTube Music playlists with song matching. Nothing is ever deleted. Trigger words: spotify, youtube music, yt music, my spotify playlists, what's in my playlist, search youtube music, import spotify playlists to youtube music, move my playlists to youtube music, switch from spotify, music_transfer, music_spotify_playlists, music_ytmusic_search."+user-invocable: true+---++# Spotify + YouTube Music bridge++This bridge runs on the user's **Mac** under Adom Bridge. Drive it from the container with+`adom-bridge music_<verb> '<json>'`.++It works through the apps the user is already signed in to, so there are no API keys or developer accounts:+- **Spotify:** the Spotify desktop app, read-only. The bridge reads the app's own session through its local debugging port.+- **YouTube Music:** the user's real Chrome profile that has YouTube Music, through the Adom Native Browser Extension (`nbrowser_*`). Cookies never leave Chrome.++## ⛔ Never delete anything++The bridge has **no delete code**; don't work around that with other tools. Spotify is+**read-only**. On YouTube Music the bridge only **creates new playlists** and **adds songs to+playlists it created**. Never delete, rename, reorder or remove songs from the user's playlists on+either service. If something the bridge made needs to go, tell the user and let them remove it.++## Cold start: read this before you panic++| Response | Meaning | What you do |+|---|---|---|+| `errorCode: spotify_restart_needed` | Spotify is open without its local debugging port | **Ask the user**, then `music_spotify_connect {"restart":true}`. Spotify quits and reopens, and playback stops for a few seconds |+| `errorCode: spotify_not_installed` | No Spotify desktop app | Offer to install it (`brew install --cask spotify`); the user signs in |+| `errorCode: nb_missing_in_profile` | The Adom browser extension isn't loaded in the Chrome profile that has YouTube Music | Load it there: `chrome://extensions` → Developer mode → Load unpacked → the nb extension folder |+| `errorCode: ytmusic_signed_out` | YouTube Music is signed out in that profile | The user signs in |+| `errorCode: ytmusic_profile_unknown` | The bridge couldn't tell which Chrome profile has YouTube Music | Pass `ytProfile:"chrome:<email>"` (`nbrowser_profiles` lists them) |++Always start with **`music_readiness`**. It's read-only, and its `nextSteps` say exactly what's missing.++## Verbs++| Verb | What it does | Key args |+|---|---|---|+| `music_readiness` | Read-only check of Spotify, the YouTube Music Chrome profile and the extension | `ytProfile?` |+| `music_spotify_connect` | Connect to the signed-in Spotify app | `restart?` (ask first) |+| `music_spotify_playlists` | The Spotify library: name, track count, folder, `kind` (`mine`, `collaborative`, `followed`, `spotify-made`) | `refresh?` |+| `music_spotify_tracks` | The songs in one Spotify playlist (title, artists, album, length, ISRC) | `playlist`, `limit?` |+| `music_ytmusic_playlists` | The YouTube Music library playlists | `ytProfile?` |+| `music_ytmusic_search` | Search YouTube Music songs (or videos) | `query` or `queries[]`, `videos?` |+| `music_transfer` | Background job that copies Spotify playlists into new YouTube Music playlists | see below |+| `music_status` / `music_report` / `music_cancel` | Follow, review and stop the job | `jobId?`, `full?` |+| `music_describe` | The full catalog | |++## Copying playlists from Spotify to YouTube Music++1. `music_readiness`, then `music_spotify_connect`.+2. `music_spotify_playlists`: **show the user the summary and ask which set to copy.** The default+   is the user's own and collaborative playlists. `includeFollowed` and `includeSpotifyMade` add+   the other kinds, and `playlists:[names or ids]` picks specific ones.+3. For a big library, run `music_transfer {"dryRun":true}` and then `music_report` first. That+   shows the match quality and writes nothing.+4. `music_transfer {...}` returns a `jobId`. It runs at about 30 songs per 15 s. New playlists are+   **private** unless `privacy` says otherwise.+5. Poll `music_status` every ~20 s, and tell the user which playlist it's on.+6. `music_report`: give the user each new playlist's link, the **unsure** songs (added, worth a+   listen) and the **missing** ones (not added; they can add them by hand).++Matching uses title, artists and length. It prefers the official song over lyric videos, covers,+remixes and live versions, and it won't treat "Song 2" or "Song (Instrumental)" as the same track as "Song".++## Things to know++- **Resumable.** Rerunning `music_transfer` skips finished playlists and continues a half-done one.+  The state lives in `~/.adom/spotify-ytmusic/` on the Mac.+- **Background.** The YouTube Music tab opens minimized in the user's Chrome; don't raise it.+- **Testing.** Use `testPrefix:"[test] "` and `trackLimit`, so test playlists are obvious and the user can delete them.+- **Not songs.** Podcast episodes are skipped. Local files are searched by their tags. Liked Songs isn't supported yet.+- **`ok:true` isn't the finish line.** Check that `music_status.state` is `"done"`, and read the report, before telling the user it worked.+- Relay any `_hint` that asks the user to do something, unchanged.
docs/hero.pngadded
⋯ 1 unchanged line ⋯
install.shadded+14
@@ -0,0 +1,14 @@+#!/usr/bin/env bash+# Installs the spotify-ytmusic USER skill. The bridge runtime is not here: Adom Bridge installs it+# from the release zip (bridge_install with this page's manifest).+set -e+PKG_DIR="$(cd "$(dirname "$0")" && pwd)"+deploy_into() {+  mkdir -p "$1/spotify-ytmusic"+  cp "$PKG_DIR/SKILL.md" "$1/spotify-ytmusic/SKILL.md"+  echo "  -> $1/spotify-ytmusic"+}+echo "Installing the Spotify + YouTube Music skill:"+deploy_into "$HOME/.claude/skills"+[ -d "$HOME/.codex" ] && deploy_into "$HOME/.codex/skills"+echo "Done. Drive it with: adom-bridge music_readiness '{}'"
package.jsonadded+85
@@ -0,0 +1,85 @@+{+  "slug": "spotify-ytmusic-bridge",+  "name": "spotify-ytmusic-bridge",+  "title": "Spotify + YouTube Music",+  "version": "0.2.0",+  "type": "app",+  "description": "An Adom Bridge bridge for your music on a Mac: read your Spotify library, search YouTube Music, and copy playlists from Spotify into YouTube Music, using the apps you're already signed in to. It never deletes anything. This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.",+  "brief": "Your AI works with Spotify and YouTube Music on your Mac: browse, search, and move playlists. Never deletes anything.",+  "license": "MIT",+  "keywords": [+    "spotify",+    "youtube music",+    "yt music",+    "playlists",+    "music library",+    "transfer",+    "import",+    "adom-bridge",+    "bridge",+    "macos"+  ],+  "tags": [+    "spotify",+    "youtube-music",+    "music",+    "playlists",+    "adom-bridge",+    "bridge",+    "macos"+  ],+  "discovery_triggers": [+    "import my spotify playlists to youtube music",+    "transfer playlists from spotify to youtube music",+    "move my playlists to youtube music",+    "switch from spotify to youtube music",+    "copy spotify playlists to yt music",+    "migrate my music library",+    "list my spotify playlists",+    "what songs are in my spotify playlist",+    "export my spotify playlists",+    "search youtube music",+    "find a song on youtube music",+    "show my youtube music playlists",+    "make a youtube music playlist",+    "control spotify and youtube music",+    "spotify bridge",+    "youtube music bridge"+  ],+  "discovery_pitch": "Lets the AI read the user's Spotify library, search YouTube Music, and copy Spotify playlists into new YouTube Music playlists on their Mac. Check `adom-bridge bridge_list` for spotify-ytmusic; if it's missing, install it with bridge_install (manifest URL in the README), then run `adom-wiki pkg install kyle/spotify-ytmusic-bridge` for the skill, and start with `adom-bridge music_readiness '{}'`. Never delete playlists.",+  "dependencies": {+    "adom/adom-bridge-macos": "^1.9.84"+  },+  "sample_prompts": [+    {+      "label": "Move my playlists",+      "prompt": "Import all my Spotify playlists to YouTube Music"+    },+    {+      "label": "Check first",+      "prompt": "How many of my Spotify songs can you find on YouTube Music? Don't change anything yet"+    },+    {+      "label": "Peek at a playlist",+      "prompt": "What's in my 'focus' playlist on Spotify?"+    },+    {+      "label": "Search",+      "prompt": "Find Midnight City by M83 on YouTube Music"+    }+  ],+  "files": [+    "SKILL.md",+    "README.md",+    "package.json",+    "install.sh",+    "uninstall.sh"+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "hero": {+    "path": "docs/hero.png"+  }+}\ No newline at end of file
page.jsonadded+90
@@ -0,0 +1,90 @@+{+  "slug": "spotify-ytmusic-bridge",+  "name": "spotify-ytmusic-bridge",+  "title": "Spotify + YouTube Music",+  "version": "0.2.0",+  "type": "app",+  "description": "An Adom Bridge bridge for your music on a Mac: read your Spotify library, search YouTube Music, and copy playlists from Spotify into YouTube Music, using the apps you're already signed in to. It never deletes anything. This package installs the bridge's SKILLS into your container so your AI knows how to drive it; Adom Bridge loads the bridge runtime itself from the release zip.",+  "brief": "Your AI works with Spotify and YouTube Music on your Mac: browse, search, and move playlists. Never deletes anything.",+  "license": "MIT",+  "keywords": [+    "spotify",+    "youtube music",+    "yt music",+    "playlists",+    "music library",+    "transfer",+    "import",+    "adom-bridge",+    "bridge",+    "macos"+  ],+  "tags": [+    "spotify",+    "youtube-music",+    "music",+    "playlists",+    "adom-bridge",+    "bridge",+    "macos"+  ],+  "discovery_triggers": [+    "import my spotify playlists to youtube music",+    "transfer playlists from spotify to youtube music",+    "move my playlists to youtube music",+    "switch from spotify to youtube music",+    "copy spotify playlists to yt music",+    "migrate my music library",+    "list my spotify playlists",+    "what songs are in my spotify playlist",+    "export my spotify playlists",+    "search youtube music",+    "find a song on youtube music",+    "show my youtube music playlists",+    "make a youtube music playlist",+    "control spotify and youtube music",+    "spotify bridge",+    "youtube music bridge"+  ],+  "discovery_pitch": "Lets the AI read the user's Spotify library, search YouTube Music, and copy Spotify playlists into new YouTube Music playlists on their Mac. Check `adom-bridge bridge_list` for spotify-ytmusic; if it's missing, install it with bridge_install (manifest URL in the README), then run `adom-wiki pkg install kyle/spotify-ytmusic-bridge` for the skill, and start with `adom-bridge music_readiness '{}'`. Never delete playlists.",+  "dependencies": {+    "adom/adom-bridge-macos": "^1.9.84"+  },+  "sample_prompts": [+    {+      "label": "Move my playlists",+      "prompt": "Import all my Spotify playlists to YouTube Music"+    },+    {+      "label": "Check first",+      "prompt": "How many of my Spotify songs can you find on YouTube Music? Don't change anything yet"+    },+    {+      "label": "Peek at a playlist",+      "prompt": "What's in my 'focus' playlist on Spotify?"+    },+    {+      "label": "Search",+      "prompt": "Find Midnight City by M83 on YouTube Music"+    }+  ],+  "files": [+    "SKILL.md",+    "README.md",+    "package.json",+    "install.sh",+    "uninstall.sh"+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "hero": {+    "type": "image",+    "path": "docs/hero.png"+  },+  "visibility": "public",+  "author": {+    "name": "Kyle Bergstedt"+  }+}\ No newline at end of file
uninstall.shadded+5
@@ -0,0 +1,5 @@+#!/usr/bin/env bash+set -e+rm -rf "$HOME/.claude/skills/spotify-ytmusic"+[ -d "$HOME/.codex/skills" ] && rm -rf "$HOME/.codex/skills/spotify-ytmusic"+echo "Removed the spotify-ytmusic skill."