Skip to main content
clickwheel syncs playlists to and from your Apple Music account through the official MusicKit API. Playlists propagate to your other Apple devices via iCloud Music Library.
Apple Music sync needs a paid Apple Developer Program membership to create the MusicKit key. The other integrations don’t.

Setup

1

Install the Apple Music extra

2

Create a MusicKit key

At developer.apple.com → Keys, create a key with Media Services (MusicKit) enabled and download the .p8.
3

Configure clickwheel

~/.clickwheel/config.yaml
chmod 600 the .p8.
4

Authorize and verify

auth opens MusicKit JS in your browser; sign in with your Apple ID. The doctor checks config, the .p8, both tokens, iCloud Music Library state, and storefront. Per-stage detail tells you what to fix.

Push, pull, delete

Pull is handy when you curated on your iPhone and want it on the iPod. Delete drives Music.app via AppleScript, because Apple’s REST API refuses to delete library playlists; the deletion propagates through iCloud Music Library.
Push resolves each track via a match ladder: ISRC tag → catalog fuzzy search (title/artist/album weighted) → your library when iCloud Music Library is on. Low-confidence matches are skipped unless you pass --include-low. Resolved IDs cache in SQLite, so repeat pushes skip the network.
MusicKit needs a developer token (a JWT clickwheel signs locally with your .p8, re-signed on demand) and a Music User Token (long-lived, minted in the browser by apple auth). Catalog reads need only the developer token; anything touching your library needs both. If you already have a pre-signed JWT from another project, set APPLE_MUSIC_DEVELOPER_TOKEN and the .p8/Key ID/Team ID become optional.

From Claude

You can also drive this from Claude. Set up the MCP server, then the Apple Music tools are yours.