# Get albums for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-albums-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorAlbums # Get artists for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-artists-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorArtists # Get compatibility for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-compatibility-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorCompatibility # Get loved songs for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-loved-songs-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorLovedSongs # Get neighbours for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-neighbours-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorNeighbours # Get playlists for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-playlists-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorPlaylists # Get scrobbles for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-scrobbles-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorScrobbles # Get songs for an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-songs-for-an-actor /api-reference/openapi.json get /app.rocksky.actor.getActorSongs # Get the profile of an actor Source: https://docs.rocksky.app/api-reference/approckskyactor/get-the-profile-of-an-actor /api-reference/openapi.json get /app.rocksky.actor.getProfile # Get albums Source: https://docs.rocksky.app/api-reference/approckskyalbum/get-albums /api-reference/openapi.json get /app.rocksky.album.getAlbums # Get detailed album view Source: https://docs.rocksky.app/api-reference/approckskyalbum/get-detailed-album-view /api-reference/openapi.json get /app.rocksky.album.getAlbum # Get tracks for an album Source: https://docs.rocksky.app/api-reference/approckskyalbum/get-tracks-for-an-album /api-reference/openapi.json get /app.rocksky.album.getAlbumTracks # Create a new API key for the authenticated user Source: https://docs.rocksky.app/api-reference/approckskyapikey/create-a-new-api-key-for-the-authenticated-user /api-reference/openapi.json post /app.rocksky.apikey.createApikey The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Get a list of API keys for the authenticated user Source: https://docs.rocksky.app/api-reference/approckskyapikey/get-a-list-of-api-keys-for-the-authenticated-user /api-reference/openapi.json get /app.rocksky.apikey.getApikeys The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Remove an API key for the authenticated user Source: https://docs.rocksky.app/api-reference/approckskyapikey/remove-an-api-key-for-the-authenticated-user /api-reference/openapi.json post /app.rocksky.apikey.removeApikey The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Update an existing API key for the authenticated user Source: https://docs.rocksky.app/api-reference/approckskyapikey/update-an-existing-api-key-for-the-authenticated-user /api-reference/openapi.json post /app.rocksky.apikey.updateApikey The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Get artist details Source: https://docs.rocksky.app/api-reference/approckskyartist/get-artist-details /api-reference/openapi.json get /app.rocksky.artist.getArtist # Get artist listeners Source: https://docs.rocksky.app/api-reference/approckskyartist/get-artist-listeners /api-reference/openapi.json get /app.rocksky.artist.getArtistListeners # Get artist recent listeners ordered by most recent scrobble Source: https://docs.rocksky.app/api-reference/approckskyartist/get-artist-recent-listeners-ordered-by-most-recent-scrobble /api-reference/openapi.json get /app.rocksky.artist.getArtistRecentListeners # Get artists Source: https://docs.rocksky.app/api-reference/approckskyartist/get-artists /api-reference/openapi.json get /app.rocksky.artist.getArtists # Get artist's albums Source: https://docs.rocksky.app/api-reference/approckskyartist/get-artists-albums /api-reference/openapi.json get /app.rocksky.artist.getArtistAlbums # Get artist's tracks Source: https://docs.rocksky.app/api-reference/approckskyartist/get-artists-tracks /api-reference/openapi.json get /app.rocksky.artist.getArtistTracks # Get scrobble counts grouped by the release decade of the music Source: https://docs.rocksky.app/api-reference/approckskycharts/get-scrobble-counts-grouped-by-the-release-decade-of-the-music /api-reference/openapi.json get /app.rocksky.charts.getDecades # Get the listeners who scrobbled the most, all-time or over a date range Source: https://docs.rocksky.app/api-reference/approckskycharts/get-the-listeners-who-scrobbled-the-most-all-time-or-over-a-date-range /api-reference/openapi.json get /app.rocksky.charts.getTopScrobblers # Get the scrobbles chart Source: https://docs.rocksky.app/api-reference/approckskycharts/get-the-scrobbles-chart /api-reference/openapi.json get /app.rocksky.charts.getScrobblesChart # Get top artists Source: https://docs.rocksky.app/api-reference/approckskycharts/get-top-artists /api-reference/openapi.json get /app.rocksky.charts.getTopArtists # Get top tracks Source: https://docs.rocksky.app/api-reference/approckskycharts/get-top-tracks /api-reference/openapi.json get /app.rocksky.charts.getTopTracks # Download a file from Dropbox by its unique identifier Source: https://docs.rocksky.app/api-reference/approckskydropbox/download-a-file-from-dropbox-by-its-unique-identifier /api-reference/openapi.json get /app.rocksky.dropbox.downloadFile This route is registered but currently throws a not-implemented error. It does not return the download described by its lexicon. # Retrieve a list of files from Dropbox Source: https://docs.rocksky.app/api-reference/approckskydropbox/retrieve-a-list-of-files-from-dropbox /api-reference/openapi.json get /app.rocksky.dropbox.getFiles # Retrieve a temporary link to access a file in Dropbox Source: https://docs.rocksky.app/api-reference/approckskydropbox/retrieve-a-temporary-link-to-access-a-file-in-dropbox /api-reference/openapi.json get /app.rocksky.dropbox.getTemporaryLink # Retrieve metadata of a file or folder in Dropbox Source: https://docs.rocksky.app/api-reference/approckskydropbox/retrieve-metadata-of-a-file-or-folder-in-dropbox /api-reference/openapi.json get /app.rocksky.dropbox.getMetadata The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Create or update one of the authenticated user's equalizer presets. The record key is derived from the name (lower case, dashes, no spaces), so saving with an existing name overwrites that preset. Source: https://docs.rocksky.app/api-reference/approckskyequalizer/create-or-update-one-of-the-authenticated-users-equalizer-presets-the-record-key-is-derived-from-the-name-lower-case-dashes-no-spaces-so-saving-with-an-existing-name-overwrites-that-preset /api-reference/openapi.json post /app.rocksky.equalizer.putPreset # Delete one of the authenticated user's equalizer presets. Source: https://docs.rocksky.app/api-reference/approckskyequalizer/delete-one-of-the-authenticated-users-equalizer-presets /api-reference/openapi.json post /app.rocksky.equalizer.deletePreset # List equalizer presets. If `did` is provided the request is public; otherwise an auth token is required and the caller's own presets are returned. Source: https://docs.rocksky.app/api-reference/approckskyequalizer/list-equalizer-presets-if-`did`-is-provided-the-request-is-public;-otherwise-an-auth-token-is-required-and-the-callers-own-presets-are-returned /api-reference/openapi.json get /app.rocksky.equalizer.listPresets Supply did for public lookup, or authenticate to use your own DID. # Get all currently playing tracks by users Source: https://docs.rocksky.app/api-reference/approckskyfeed/get-all-currently-playing-tracks-by-users /api-reference/openapi.json get /app.rocksky.feed.getStories Authentication is required when filtering by following. # Get all feed generators Source: https://docs.rocksky.app/api-reference/approckskyfeed/get-all-feed-generators /api-reference/openapi.json get /app.rocksky.feed.getFeedGenerators # Get information about a feed generator Source: https://docs.rocksky.app/api-reference/approckskyfeed/get-information-about-a-feed-generator /api-reference/openapi.json get /app.rocksky.feed.getFeedGenerator # Get personalised album recommendations for a user Source: https://docs.rocksky.app/api-reference/approckskyfeed/get-personalised-album-recommendations-for-a-user /api-reference/openapi.json get /app.rocksky.feed.getAlbumRecommendations # Get personalised artist recommendations for a user Source: https://docs.rocksky.app/api-reference/approckskyfeed/get-personalised-artist-recommendations-for-a-user /api-reference/openapi.json get /app.rocksky.feed.getArtistRecommendations # Get personalised track recommendations for a user Source: https://docs.rocksky.app/api-reference/approckskyfeed/get-personalised-track-recommendations-for-a-user /api-reference/openapi.json get /app.rocksky.feed.getRecommendations # Get the feed by uri Source: https://docs.rocksky.app/api-reference/approckskyfeed/get-the-feed-by-uri /api-reference/openapi.json get /app.rocksky.feed.getFeed Authentication is required when filtering by following. # Search for content in the feed Source: https://docs.rocksky.app/api-reference/approckskyfeed/search-for-content-in-the-feed /api-reference/openapi.json get /app.rocksky.feed.search # Download a file from Google Drive by its unique identifier Source: https://docs.rocksky.app/api-reference/approckskygoogledrive/download-a-file-from-google-drive-by-its-unique-identifier /api-reference/openapi.json get /app.rocksky.googledrive.downloadFile This route is registered but currently throws a not-implemented error. It does not return the download described by its lexicon. # Get a file from Google Drive by its unique identifier Source: https://docs.rocksky.app/api-reference/approckskygoogledrive/get-a-file-from-google-drive-by-its-unique-identifier /api-reference/openapi.json get /app.rocksky.googledrive.getFile The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Get a list of files from Google Drive Source: https://docs.rocksky.app/api-reference/approckskygoogledrive/get-a-list-of-files-from-google-drive /api-reference/openapi.json get /app.rocksky.googledrive.getFiles # Creates a 'follow' relationship from the authenticated account to a specified account. Source: https://docs.rocksky.app/api-reference/approckskygraph/creates-a-follow-relationship-from-the-authenticated-account-to-a-specified-account /api-reference/openapi.json post /app.rocksky.graph.followAccount # Enumerates accounts which a specified account (actor) follows. Source: https://docs.rocksky.app/api-reference/approckskygraph/enumerates-accounts-which-a-specified-account-actor-follows /api-reference/openapi.json get /app.rocksky.graph.getFollows # Enumerates accounts which follow a specified account (actor). Source: https://docs.rocksky.app/api-reference/approckskygraph/enumerates-accounts-which-follow-a-specified-account-actor /api-reference/openapi.json get /app.rocksky.graph.getFollowers # Enumerates accounts which follow a specified account (actor) and are followed by the viewer. Source: https://docs.rocksky.app/api-reference/approckskygraph/enumerates-accounts-which-follow-a-specified-account-actor-and-are-followed-by-the-viewer /api-reference/openapi.json get /app.rocksky.graph.getKnownFollowers Without authentication, returns an empty result. # Removes a 'follow' relationship from the authenticated account to a specified account. Source: https://docs.rocksky.app/api-reference/approckskygraph/removes-a-follow-relationship-from-the-authenticated-account-to-a-specified-account /api-reference/openapi.json post /app.rocksky.graph.unfollowAccount # Browse a music directory (artist, album or root). Source: https://docs.rocksky.app/api-reference/approckskylibrary/browse-a-music-directory-artist-album-or-root /api-reference/openapi.json get /app.rocksky.library.getMusicDirectory # Create a new playlist. Source: https://docs.rocksky.app/api-reference/approckskylibrary/create-a-new-playlist /api-reference/openapi.json post /app.rocksky.library.createPlaylist # Delete a playlist. Source: https://docs.rocksky.app/api-reference/approckskylibrary/delete-a-playlist /api-reference/openapi.json post /app.rocksky.library.deletePlaylist # Delete an uploaded album owned by the authenticated user. Removes every upload the user owns for the album (storage objects + library entries); shared album/track metadata and scrobble history are preserved. Source: https://docs.rocksky.app/api-reference/approckskylibrary/delete-an-uploaded-album-owned-by-the-authenticated-user-removes-every-upload-the-user-owns-for-the-album-storage-objects-+-library-entries;-shared-albumtrack-metadata-and-scrobble-history-are-preserved /api-reference/openapi.json post /app.rocksky.library.deleteAlbum # Delete an uploaded song owned by the authenticated user. Removes the user's upload (storage object + library entry); the shared track metadata and scrobble history are preserved. Source: https://docs.rocksky.app/api-reference/approckskylibrary/delete-an-uploaded-song-owned-by-the-authenticated-user-removes-the-users-upload-storage-object-+-library-entry;-the-shared-track-metadata-and-scrobble-history-are-preserved /api-reference/openapi.json post /app.rocksky.library.deleteSong # Get a cover-art URL for an album, artist or song. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-a-cover-art-url-for-an-album-artist-or-song /api-reference/openapi.json get /app.rocksky.library.getCoverArtUrl # Get a download URL for a song. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-a-download-url-for-a-song /api-reference/openapi.json get /app.rocksky.library.getDownloadUrl # Get a list of albums by various criteria. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-a-list-of-albums-by-various-criteria /api-reference/openapi.json get /app.rocksky.library.getAlbumList # Get a list of random songs. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-a-list-of-random-songs /api-reference/openapi.json get /app.rocksky.library.getRandomSongs # Get a playable stream URL for a song. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-a-playable-stream-url-for-a-song /api-reference/openapi.json get /app.rocksky.library.getStreamUrl # Get a playlist and its entries. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-a-playlist-and-its-entries /api-reference/openapi.json get /app.rocksky.library.getPlaylist # Get album notes, images and similar info. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-album-notes-images-and-similar-info /api-reference/openapi.json get /app.rocksky.library.getAlbumInfo # Get all artists in the library, indexed alphabetically. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-all-artists-in-the-library-indexed-alphabetically /api-reference/openapi.json get /app.rocksky.library.getArtists # Get all configured top-level music folders. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-all-configured-top-level-music-folders /api-reference/openapi.json get /app.rocksky.library.getMusicFolders # Get all genres in the library. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-all-genres-in-the-library /api-reference/openapi.json get /app.rocksky.library.getGenres # Get all internet radio stations. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-all-internet-radio-stations /api-reference/openapi.json get /app.rocksky.library.getInternetRadioStations # Get all playlists owned by the user. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-all-playlists-owned-by-the-user /api-reference/openapi.json get /app.rocksky.library.getPlaylists # Get an indexed list of all artists. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-an-indexed-list-of-all-artists /api-reference/openapi.json get /app.rocksky.library.getIndexes # Get artist biography, images and similar artists. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-artist-biography-images-and-similar-artists /api-reference/openapi.json get /app.rocksky.library.getArtistInfo # Get details about the authenticated user. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-details-about-the-authenticated-user /api-reference/openapi.json get /app.rocksky.library.getUser # Get details about the software license. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-details-about-the-software-license /api-reference/openapi.json get /app.rocksky.library.getLicense # Get details for a single song. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-details-for-a-single-song /api-reference/openapi.json get /app.rocksky.library.getSong # Get details for an album, including a list of songs. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-details-for-an-album-including-a-list-of-songs /api-reference/openapi.json get /app.rocksky.library.getAlbum # Get details for an artist, including a list of albums. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-details-for-an-artist-including-a-list-of-albums /api-reference/openapi.json get /app.rocksky.library.getArtist # Get lyrics for a song. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-lyrics-for-a-song /api-reference/openapi.json get /app.rocksky.library.getLyrics # Get songs in a given genre. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-songs-in-a-given-genre /api-reference/openapi.json get /app.rocksky.library.getSongsByGenre # Get songs similar to the given artist. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-songs-similar-to-the-given-artist /api-reference/openapi.json get /app.rocksky.library.getSimilarSongs # Get starred songs, albums and artists. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-starred-songs-albums-and-artists /api-reference/openapi.json get /app.rocksky.library.getStarred # Get the current status of the media library scan. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-the-current-status-of-the-media-library-scan /api-reference/openapi.json get /app.rocksky.library.getScanStatus # Get the saved play queue for the user. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-the-saved-play-queue-for-the-user /api-reference/openapi.json get /app.rocksky.library.getPlayQueue # Get the top songs for an artist. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-the-top-songs-for-an-artist /api-reference/openapi.json get /app.rocksky.library.getTopSongs # Get what the user is currently playing. Source: https://docs.rocksky.app/api-reference/approckskylibrary/get-what-the-user-is-currently-playing /api-reference/openapi.json get /app.rocksky.library.getNowPlaying # Initiate a rescan of the media library. Source: https://docs.rocksky.app/api-reference/approckskylibrary/initiate-a-rescan-of-the-media-library /api-reference/openapi.json get /app.rocksky.library.startScan # Register a play (scrobble) for a song. Source: https://docs.rocksky.app/api-reference/approckskylibrary/register-a-play-scrobble-for-a-song /api-reference/openapi.json post /app.rocksky.library.scrobble # Remove a star from a song, album or artist. Source: https://docs.rocksky.app/api-reference/approckskylibrary/remove-a-star-from-a-song-album-or-artist /api-reference/openapi.json post /app.rocksky.library.unstar # Save the play queue for the user. Source: https://docs.rocksky.app/api-reference/approckskylibrary/save-the-play-queue-for-the-user /api-reference/openapi.json post /app.rocksky.library.savePlayQueue # Search for artists, albums and songs. Source: https://docs.rocksky.app/api-reference/approckskylibrary/search-for-artists-albums-and-songs /api-reference/openapi.json get /app.rocksky.library.search # Star a song, album or artist. Source: https://docs.rocksky.app/api-reference/approckskylibrary/star-a-song-album-or-artist /api-reference/openapi.json post /app.rocksky.library.star # Test connectivity with the server. Source: https://docs.rocksky.app/api-reference/approckskylibrary/test-connectivity-with-the-server /api-reference/openapi.json get /app.rocksky.library.ping # Update an existing playlist. Source: https://docs.rocksky.app/api-reference/approckskylibrary/update-an-existing-playlist /api-reference/openapi.json post /app.rocksky.library.updatePlaylist # Update the now-playing song for the user. Source: https://docs.rocksky.app/api-reference/approckskylibrary/update-the-now-playing-song-for-the-user /api-reference/openapi.json post /app.rocksky.library.updateNowPlaying # Dislike a shout Source: https://docs.rocksky.app/api-reference/approckskylike/dislike-a-shout /api-reference/openapi.json post /app.rocksky.like.dislikeShout # Dislike a song Source: https://docs.rocksky.app/api-reference/approckskylike/dislike-a-song /api-reference/openapi.json post /app.rocksky.like.dislikeSong # Like a shout Source: https://docs.rocksky.app/api-reference/approckskylike/like-a-shout /api-reference/openapi.json post /app.rocksky.like.likeShout # Like a song Source: https://docs.rocksky.app/api-reference/approckskylike/like-a-song /api-reference/openapi.json post /app.rocksky.like.likeSong # Get the authenticated user's scrobble mirror sources (Last.fm, ListenBrainz, Teal.fm). Source: https://docs.rocksky.app/api-reference/approckskymirror/get-the-authenticated-users-scrobble-mirror-sources-lastfm-listenbrainz-tealfm /api-reference/openapi.json get /app.rocksky.mirror.getMirrorSources Without authentication, returns the default disabled provider settings. # Upsert a mirror source for the authenticated user. Toggling `enabled` notifies the mirror process over NATS so it can start/stop the per-user task without a restart. Source: https://docs.rocksky.app/api-reference/approckskymirror/upsert-a-mirror-source-for-the-authenticated-user-toggling-`enabled`-notifies-the-mirror-process-over-nats-so-it-can-startstop-the-per-user-task-without-a-restart /api-reference/openapi.json post /app.rocksky.mirror.putMirrorSource # Get the number of unread notifications for the authenticated user. Source: https://docs.rocksky.app/api-reference/approckskynotification/get-the-number-of-unread-notifications-for-the-authenticated-user /api-reference/openapi.json get /app.rocksky.notification.getUnreadCount Authenticate to retrieve your unread count. Without a token, returns zero. # List notifications for the authenticated user, most recent first. Source: https://docs.rocksky.app/api-reference/approckskynotification/list-notifications-for-the-authenticated-user-most-recent-first /api-reference/openapi.json get /app.rocksky.notification.listNotifications Authenticate to retrieve your notifications. Without a token, returns an empty list and zero unread count. # Mark notifications as viewed. When no ids are provided, marks all of the authenticated user's notifications as viewed. Source: https://docs.rocksky.app/api-reference/approckskynotification/mark-notifications-as-viewed-when-no-ids-are-provided-marks-all-of-the-authenticated-users-notifications-as-viewed /api-reference/openapi.json post /app.rocksky.notification.updateSeen Authentication is needed to change notifications. Without a token, makes no changes and returns zero unread count. # Add items to the player's queue Source: https://docs.rocksky.app/api-reference/approckskyplayer/add-items-to-the-players-queue /api-reference/openapi.json post /app.rocksky.player.addItemsToQueue The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Get the currently playing track Source: https://docs.rocksky.app/api-reference/approckskyplayer/get-the-currently-playing-track /api-reference/openapi.json get /app.rocksky.player.getCurrentlyPlaying The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Pause the currently playing track Source: https://docs.rocksky.app/api-reference/approckskyplayer/pause-the-currently-playing-track /api-reference/openapi.json post /app.rocksky.player.pause The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Play a specific audio file Source: https://docs.rocksky.app/api-reference/approckskyplayer/play-a-specific-audio-file /api-reference/openapi.json post /app.rocksky.player.playFile The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Play all tracks in a directory Source: https://docs.rocksky.app/api-reference/approckskyplayer/play-all-tracks-in-a-directory /api-reference/openapi.json post /app.rocksky.player.playDirectory The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Play the next track in the queue Source: https://docs.rocksky.app/api-reference/approckskyplayer/play-the-next-track-in-the-queue /api-reference/openapi.json post /app.rocksky.player.next The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Play the previous track in the queue Source: https://docs.rocksky.app/api-reference/approckskyplayer/play-the-previous-track-in-the-queue /api-reference/openapi.json post /app.rocksky.player.previous The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Resume playback of the currently paused track Source: https://docs.rocksky.app/api-reference/approckskyplayer/resume-playback-of-the-currently-paused-track /api-reference/openapi.json post /app.rocksky.player.play The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Retrieve the current playback queue Source: https://docs.rocksky.app/api-reference/approckskyplayer/retrieve-the-current-playback-queue /api-reference/openapi.json get /app.rocksky.player.getPlaybackQueue The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Seek to a specific position in the currently playing track Source: https://docs.rocksky.app/api-reference/approckskyplayer/seek-to-a-specific-position-in-the-currently-playing-track /api-reference/openapi.json post /app.rocksky.player.seek The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Add songs to a playlist. Publishes one app.rocksky.playlist.song record per song to the caller's repo; only the playlist owner may do so. Source: https://docs.rocksky.app/api-reference/approckskyplaylist/add-songs-to-a-playlist-publishes-one-approckskyplaylistsong-record-per-song-to-the-callers-repo;-only-the-playlist-owner-may-do-so /api-reference/openapi.json post /app.rocksky.playlist.addSongs # Create a new playlist Source: https://docs.rocksky.app/api-reference/approckskyplaylist/create-a-new-playlist /api-reference/openapi.json post /app.rocksky.playlist.createPlaylist # Insert a directory into a playlist Source: https://docs.rocksky.app/api-reference/approckskyplaylist/insert-a-directory-into-a-playlist /api-reference/openapi.json post /app.rocksky.playlist.insertDirectory # Insert files into a playlist Source: https://docs.rocksky.app/api-reference/approckskyplaylist/insert-files-into-a-playlist /api-reference/openapi.json post /app.rocksky.playlist.insertFiles The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Remove a playlist Source: https://docs.rocksky.app/api-reference/approckskyplaylist/remove-a-playlist /api-reference/openapi.json post /app.rocksky.playlist.removePlaylist # Remove one track from a playlist. Deletes the app.rocksky.playlist.song record that put it there, which only the repo that added it can do. Prefer `index`: a song can sit in a playlist more than once, and `songUri` alone cannot say which copy to drop. Source: https://docs.rocksky.app/api-reference/approckskyplaylist/remove-one-track-from-a-playlist-deletes-the-approckskyplaylistsong-record-that-put-it-there-which-only-the-repo-that-added-it-can-do-prefer-`index`:-a-song-can-sit-in-a-playlist-more-than-once-and-`songuri`-alone-cannot-say-which-copy-to-drop /api-reference/openapi.json post /app.rocksky.playlist.removeTrack # Retrieve a list of playlists Source: https://docs.rocksky.app/api-reference/approckskyplaylist/retrieve-a-list-of-playlists /api-reference/openapi.json get /app.rocksky.playlist.getPlaylists # Retrieve a playlist by its ID Source: https://docs.rocksky.app/api-reference/approckskyplaylist/retrieve-a-playlist-by-its-id /api-reference/openapi.json get /app.rocksky.playlist.getPlaylist # Start a playlist Source: https://docs.rocksky.app/api-reference/approckskyplaylist/start-a-playlist /api-reference/openapi.json post /app.rocksky.playlist.startPlaylist The current handler contains placeholder logic; a successful response does not guarantee the requested operation was performed. # Update a playlist's metadata. Rewrites the app.rocksky.playlist record in place; only the owner may do so. Source: https://docs.rocksky.app/api-reference/approckskyplaylist/update-a-playlists-metadata-rewrites-the-approckskyplaylist-record-in-place;-only-the-owner-may-do-so /api-reference/openapi.json post /app.rocksky.playlist.updatePlaylist # Get Rockbox audio settings. If `did` is provided the request is public; otherwise an auth token is required and the caller's own settings are returned. Source: https://docs.rocksky.app/api-reference/approckskyrockbox/get-rockbox-audio-settings-if-`did`-is-provided-the-request-is-public;-otherwise-an-auth-token-is-required-and-the-callers-own-settings-are-returned /api-reference/openapi.json get /app.rocksky.rockbox.getAudioSettings Supply did for public lookup, or authenticate to use your own DID. # Upsert the authenticated user's Rockbox audio settings. Only provided sections are merged; omitted sections are left unchanged. Source: https://docs.rocksky.app/api-reference/approckskyrockbox/upsert-the-authenticated-users-rockbox-audio-settings-only-provided-sections-are-merged;-omitted-sections-are-left-unchanged /api-reference/openapi.json post /app.rocksky.rockbox.putAudioSettings # Create a new scrobble Source: https://docs.rocksky.app/api-reference/approckskyscrobble/create-a-new-scrobble /api-reference/openapi.json post /app.rocksky.scrobble.createScrobble # Get a scrobble by its unique identifier Source: https://docs.rocksky.app/api-reference/approckskyscrobble/get-a-scrobble-by-its-unique-identifier /api-reference/openapi.json get /app.rocksky.scrobble.getScrobble # Get scrobbles all scrobbles Source: https://docs.rocksky.app/api-reference/approckskyscrobble/get-scrobbles-all-scrobbles /api-reference/openapi.json get /app.rocksky.scrobble.getScrobbles # Create a new shout Source: https://docs.rocksky.app/api-reference/approckskyshout/create-a-new-shout /api-reference/openapi.json post /app.rocksky.shout.createShout # Get all shouts for a specific track Source: https://docs.rocksky.app/api-reference/approckskyshout/get-all-shouts-for-a-specific-track /api-reference/openapi.json get /app.rocksky.shout.getTrackShouts # Get replies to a shout Source: https://docs.rocksky.app/api-reference/approckskyshout/get-replies-to-a-shout /api-reference/openapi.json get /app.rocksky.shout.getShoutReplies # Get shouts for an album Source: https://docs.rocksky.app/api-reference/approckskyshout/get-shouts-for-an-album /api-reference/openapi.json get /app.rocksky.shout.getAlbumShouts # Get shouts for an artist Source: https://docs.rocksky.app/api-reference/approckskyshout/get-shouts-for-an-artist /api-reference/openapi.json get /app.rocksky.shout.getArtistShouts # Get the shouts of an actor's profile Source: https://docs.rocksky.app/api-reference/approckskyshout/get-the-shouts-of-an-actors-profile /api-reference/openapi.json get /app.rocksky.shout.getProfileShouts # Remove a shout by its ID Source: https://docs.rocksky.app/api-reference/approckskyshout/remove-a-shout-by-its-id /api-reference/openapi.json post /app.rocksky.shout.removeShout # Reply to a shout Source: https://docs.rocksky.app/api-reference/approckskyshout/reply-to-a-shout /api-reference/openapi.json post /app.rocksky.shout.replyShout # Report a shout for moderation Source: https://docs.rocksky.app/api-reference/approckskyshout/report-a-shout-for-moderation /api-reference/openapi.json post /app.rocksky.shout.reportShout # Create a new song Source: https://docs.rocksky.app/api-reference/approckskysong/create-a-new-song /api-reference/openapi.json post /app.rocksky.song.createSong # Get a song by its uri, MusicBrainz ID, or ISRC Source: https://docs.rocksky.app/api-reference/approckskysong/get-a-song-by-its-uri-musicbrainz-id-or-isrc /api-reference/openapi.json get /app.rocksky.song.getSong # Get song recent listeners ordered by most recent scrobble Source: https://docs.rocksky.app/api-reference/approckskysong/get-song-recent-listeners-ordered-by-most-recent-scrobble /api-reference/openapi.json get /app.rocksky.song.getSongRecentListeners # Get songs Source: https://docs.rocksky.app/api-reference/approckskysong/get-songs /api-reference/openapi.json get /app.rocksky.song.getSongs # Matches a song against Rocksky’s music database and external metadata providers to resolve the best canonical track, artist, and album Source: https://docs.rocksky.app/api-reference/approckskysong/matches-a-song-against-rocksky’s-music-database-and-external-metadata-providers-to-resolve-the-best-canonical-track-artist-and-album /api-reference/openapi.json get /app.rocksky.song.matchSong # Get the currently playing track Source: https://docs.rocksky.app/api-reference/approckskyspotify/get-the-currently-playing-track /api-reference/openapi.json get /app.rocksky.spotify.getCurrentlyPlaying # Pause the currently playing track Source: https://docs.rocksky.app/api-reference/approckskyspotify/pause-the-currently-playing-track /api-reference/openapi.json post /app.rocksky.spotify.pause # Play the next track in the queue Source: https://docs.rocksky.app/api-reference/approckskyspotify/play-the-next-track-in-the-queue /api-reference/openapi.json post /app.rocksky.spotify.next # Play the previous track in the queue Source: https://docs.rocksky.app/api-reference/approckskyspotify/play-the-previous-track-in-the-queue /api-reference/openapi.json post /app.rocksky.spotify.previous # Resume playback of the currently paused track Source: https://docs.rocksky.app/api-reference/approckskyspotify/resume-playback-of-the-currently-paused-track /api-reference/openapi.json post /app.rocksky.spotify.play # Seek to a specific position in the currently playing track Source: https://docs.rocksky.app/api-reference/approckskyspotify/seek-to-a-specific-position-in-the-currently-playing-track /api-reference/openapi.json post /app.rocksky.spotify.seek # Get a user's Wrapped stats for a year or a recent rolling window Source: https://docs.rocksky.app/api-reference/approckskystats/get-a-users-wrapped-stats-for-a-year-or-a-recent-rolling-window /api-reference/openapi.json get /app.rocksky.stats.getWrapped # Get all-time stats across all of Rocksky. Source: https://docs.rocksky.app/api-reference/approckskystats/get-all-time-stats-across-all-of-rocksky /api-reference/openapi.json get /app.rocksky.stats.getGlobalStats # stats.getStats Source: https://docs.rocksky.app/api-reference/approckskystats/statsgetstats /api-reference/openapi.json get /app.rocksky.stats.getStats # Introduction Source: https://docs.rocksky.app/api-reference/introduction The Rocksky HTTP API, built on AT Protocol XRPC. The Rocksky API is an XRPC ([AT Protocol](https://atproto.com)) API. Every endpoint lives under the `app.rocksky.*` namespace and is reachable at `https://api.rocksky.app/xrpc/`. ## Base URL ``` https://api.rocksky.app ``` ## Authentication Authenticated endpoints expect a **bearer token** in the `Authorization` header: ``` Authorization: Bearer ``` You can obtain a token by: * Signing in at [rocksky.app](https://rocksky.app) and copying the OAuth callback JWT * Running [`rocksky login `](/cli/login) with the CLI * Creating an [API key](/cli/create-apikey) for an application * Creating a personal **Access Token** at [rocksky.app/access-tokens](https://rocksky.app/access-tokens) — name it, copy the secret once, and use it interchangeably with a JWT (see [Personal access tokens](#personal-access-tokens) below) Public profiles, charts, public scrobble feeds, and search work without authentication. Private library, notification, and account operations require authentication even when they only read data. Some public endpoints accept a token to include viewer-specific information. Each endpoint lists its own authentication requirements. ## Personal access tokens Access tokens are long-lived JWTs you generate from the web UI for scripts, CLIs, and integrations that can't run an interactive OAuth flow. They behave exactly like an OAuth-issued JWT — pass them in the `Authorization: Bearer` header on any authenticated endpoint. Create / list / revoke them at: * Web: [rocksky.app/access-tokens](https://rocksky.app/access-tokens) * Mobile web: [m.rocksky.app/access-tokens](https://m.rocksky.app/access-tokens) The full secret is shown **once**, at creation — copy it somewhere safe. Subsequent listings only show the last four characters. Deleting a token revokes it immediately on the API side (no waiting for expiry). ```http theme={"theme":{"light":"github-light","dark":"synthwave-84"}} GET https://api.rocksky.app/access-tokens Authorization: Bearer POST https://api.rocksky.app/access-tokens Authorization: Bearer Content-Type: application/json { "name": "my-laptop" } DELETE https://api.rocksky.app/access-tokens/{id} Authorization: Bearer ``` ## Audioscrobbler endpoints For Last.fm / ListenBrainz compatibility, Rocksky exposes a separate host: ``` https://audioscrobbler.rocksky.app ``` * [Migrate from Last.fm](/migrations/from-lastfm) * [Migrate from ListenBrainz](/migrations/from-listenbrainz) ## SDKs Prefer typed bindings? Use one of the [official SDKs](/sdks/overview) in TypeScript, Python, Rust, Go, Ruby, Kotlin, Elixir, Clojure, or Gleam — every endpoint in this reference is wrapped. ## Errors Non-2xx responses return an XRPC-style error body: ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "error": "InvalidRequest", "message": "actor must be a DID or handle" } ``` The HTTP status code carries the category (400-class for client errors, 500-class for server errors). ## OpenAPI spec The endpoint reference below is generated directly from the [OpenAPI specification](/api-reference/openapi.json) shipped with this site. It follows the registered XRPC routes and lexicons in the Rocksky source repository. Production may run an earlier revision. Queries use `GET`; procedures use `POST`. Some procedures take query parameters instead of a JSON body, so follow the parameter location shown on each endpoint. Nullable response fields are distinct from optional fields. OpenSubsonic payloads retain provider-defined fields. Routes whose handlers are unfinished are marked in the reference. Some handlers return empty fallback objects when an upstream service fails; HTTP 200 alone does not always mean that a lookup found data. # albums Source: https://docs.rocksky.app/cli/albums Show top albums for a user. List a user's top albums, ranked by play count. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky albums [options] [did] ``` ## Parameters | Name | Required | Description | | - | - | - | | `[did]` | No | DID to inspect. Defaults to the authenticated session. | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky albums did:plc:7vdlgi2bflelz7mmuxoqjfcr ``` # artists Source: https://docs.rocksky.app/cli/artists Show top artists for a user. List a user's top artists, ranked by play count. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky artists [options] [did] ``` ## Parameters | Name | Required | Description | | - | - | - | | `[did]` | No | DID to inspect. Defaults to the authenticated session. | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky artists did:plc:7vdlgi2bflelz7mmuxoqjfcr ``` # create apikey Source: https://docs.rocksky.app/cli/create-apikey Generate a new API key for an application or integration. Create a Rocksky API key. Use it with the [scrobble API](/migrations/from-listenbrainz), the [SDKs](/sdks/overview), or any third-party scrobbler. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky create apikey [options] ``` ## Parameters | Name | Required | Description | | - | - | - | | `` | Yes | Human-readable name for the key | ## Options | Flag | Description | | - | - | | `-d ` | Description of what the key is used for | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky create apikey -d "Used for my scrobbling bot" scrobbler-bot ``` # help Source: https://docs.rocksky.app/cli/help Show help for any rocksky command. Display usage info for the CLI or a specific subcommand. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky help [command] ``` ## Examples ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky help rocksky help scrobble rocksky help create apikey ``` # import Source: https://docs.rocksky.app/cli/import Import your listening history from a Spotify or Last.fm export. Bulk-import your past listens into Rocksky from a **Spotify Extended Streaming History** or **Last.fm** export. The command autodetects the format, enriches each play with full metadata, and publishes it to your PDS as a scrobble — throttled to stay within Bluesky's write limits and safe to stop and resume. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky import [options] ``` `` is a Spotify or Last.fm export — a JSON/CSV file, or the whole **Spotify Extended Streaming History** folder (the format is autodetected from the contents). ## Import your history * **Spotify** — request your *Extended Streaming History* from [Privacy settings](https://www.spotify.com/account/privacy/). Spotify emails a `my_spotify_data.zip`; unzip it and keep the **Spotify Extended Streaming History** folder. * **Last.fm** — export your scrobbles as CSV with a tool such as [ghan64's export](https://lastfm.ghan.nl/export/). `import` writes scrobbles to your repo on your PDS, so it needs to sign in. Use a **dedicated App Password** — never your main account password. 1. Sign in at [bsky.app](https://bsky.app). 2. Go to **Settings → Privacy and Security → App Passwords** ([direct link](https://bsky.app/settings/app-passwords)). 3. Click **Add App Password**, name it (e.g. `rocksky-import`), and copy the generated password (format `xxxx-xxxx-xxxx-xxxx`). An App Password is scoped and revocable — you can delete it any time without changing your main password. Do not use your account password here. `import` reads your credentials from the environment (or a `.env` file in the current directory): ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} export ROCKSKY_IDENTIFIER=alice.bsky.social # your handle or DID export ROCKSKY_PASSWORD=xxxx-xxxx-xxxx-xxxx # the App Password from step 2 ``` | Variable | Required | Description | | - | - | - | | `ROCKSKY_IDENTIFIER` | Yes | Your Bluesky handle or DID | | `ROCKSKY_PASSWORD` | Yes | A Bluesky **App Password** (not your login password) | Both are **required** — the import aborts with an error if either is missing. Always dry-run first. This parses the export and prints exactly what would be published — **without writing anything** to your PDS and without needing your credentials: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky import "Spotify Extended Streaming History" --dry-run ``` A dry run always previews the full import from the beginning, regardless of any earlier partial run. When the preview looks right, drop `--dry-run`: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky import "Spotify Extended Streaming History" ``` The command logs each step — reading, authenticating, building a dedup index, then publishing — with a live progress bar showing the scrobble currently being written. A large history is throttled and can take a while; it is safe to stop with `Ctrl-C` and re-run to **resume exactly where it left off**. ## Options | Flag | Default | Description | | - | - | - | | `-f, --format ` | autodetect | Force the format: `spotify` or `lastfm` | | `-n, --dry-run` | off | Parse and print what would be published, without writing to your PDS | | `-c, --concurrency ` | `4` | Number of scrobbles to publish in parallel | | `-r, --rate ` | max safe | Scrobbles published per hour (hard-capped under the PDS write limit) | | `-l, --limit ` | all | Only import the first N scrobbles | | `--min-seconds ` | `30` | Skip Spotify plays shorter than this many seconds | | `--from ` | — | Only import scrobbles on or after this date (e.g. `2024-01-01`) | | `--to ` | — | Only import scrobbles on or before this date | | `--restart` | off | Ignore the saved checkpoint and import from the beginning | ## How it works * **Autodetection** — a Spotify export folder, a Spotify JSON file, or a Last.fm CSV/JSON file are all recognized automatically. Podcasts, audiobooks, and very short Spotify plays (under `--min-seconds`) are skipped and reported. * **Metadata enrichment** — the exports carry only title, artist, and album, so each play is matched against Rocksky's catalog to fill in duration, album art, MusicBrainz IDs, and streaming links before it is written. * **Rate limiting** — Bluesky rate-limits repo writes, and each scrobble also publishes its artist, album, and song records (deduplicated). The publish rate is **hard-capped** below that budget, so neither the default nor any `--rate` you pass can exceed the PDS write limit. * **Deduplication** — a local index of your existing repo is built first (and kept live off the firehose during the run), so re-imports never republish a scrobble you already have. * **Resumable** — a checkpoint tracks the last imported scrobble. Interrupt the import at any time and re-run the same command to continue from exactly where it stopped; use `--restart` to start over from the beginning. ## Examples ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} # Preview a Last.fm CSV export rocksky import scrobbles.csv --dry-run # Import only 2024 plays, forcing the Spotify parser rocksky import history.json --format spotify --from 2024-01-01 --to 2024-12-31 # Import the first 100 scrobbles as a small test run rocksky import "Spotify Extended Streaming History" --limit 100 ``` Prefer to point an existing app at Rocksky instead of a one-time import? See [Migrating from Last.fm](/migrations/from-lastfm) and [Migrating from ListenBrainz](/migrations/from-listenbrainz). # login Source: https://docs.rocksky.app/cli/login Authenticate the CLI with your Bluesky account. Sign in with a Bluesky handle. The CLI exchanges credentials for a session token used by every subsequent command. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky login ``` ## Parameters | Name | Required | Description | | - | - | - | | `` | Yes | Your Bluesky handle (e.g. `alice.bsky.social`) | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky login tsiry-sandratraina.com ``` After login completes, run [`rocksky whoami`](/cli/whoami) to confirm the session is active. # mcp Source: https://docs.rocksky.app/cli/mcp Start an MCP server so Claude and other LLMs can read your Rocksky data. Start a [Model Context Protocol](https://modelcontextprotocol.io) server. Once registered with an MCP-capable client (Claude Desktop, Cursor, …), the LLM can call Rocksky tools to query your scrobbles, top artists, now playing, and more. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky mcp ``` ## Wire it into Claude Desktop Add this to your Claude Desktop MCP config: ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "mcpServers": { "rocksky": { "command": "rocksky", "args": ["mcp"] } } } ``` See [Claude Desktop (MCP)](/integrations/claude-desktop) for the full setup walkthrough. # mpd Source: https://docs.rocksky.app/cli/mpd Serve your Rocksky library over the MPD protocol to control playback and browse music. Start an [MPD](https://www.musicpd.org/)-protocol server backed by your Rocksky library. Any MPD client — `ncmpcpp`, `mpc`, `Cantata`, mobile MPD apps — can then browse your music and control playback, with Rocksky handling the streaming and scrobbling behind the scenes. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky mpd [options] ``` ## Requirements Playback needs an authenticated session. Log in once first: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky login ``` The server still starts if you are not logged in — it just prints a note and serves an empty library until you authenticate. Unlike [`import`](/cli/import) and [`scrobble-api`](/cli/scrobble-api), `mpd` uses your saved [`login`](/cli/login) session, not `ROCKSKY_IDENTIFIER` / `ROCKSKY_PASSWORD`. ## Options | Flag | Default | Description | | - | - | - | | `-p, --port ` | `6600` | Port to listen on | | `-b, --bind
` | `127.0.0.1` | Address to bind | Port and bind default to the `[mpd]` section of `~/.rocksky/settings.toml`; the flags override those values. If the chosen port is busy, the server automatically falls back to the next free one. ## Examples ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} # Start on the default MPD port (6600), localhost only rocksky mpd # Listen on all interfaces on a custom port rocksky mpd --bind 0.0.0.0 --port 6601 ``` Point a client at the server and browse your library: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} # Recent tracks with mpc mpc -h 127.0.0.1 -p 6600 status # Or launch a full TUI client ncmpcpp -h 127.0.0.1 -p 6600 ``` ## Configuration Persist your preferred port and bind address in `~/.rocksky/settings.toml`: ```toml theme={"theme":{"light":"github-light","dark":"synthwave-84"}} [mpd] port = 6600 bind = "127.0.0.1" ``` Prefer a built-in interface? Run `rocksky` with no arguments to launch the interactive terminal UI, which browses your scrobbles and streams your music without a separate MPD client. # nowplaying Source: https://docs.rocksky.app/cli/nowplaying Show the currently playing track for yourself or any user. Print the track a user is currently listening to. Omit the DID to query your own account. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky nowplaying [did] ``` ## Parameters | Name | Required | Description | | - | - | - | | `[did]` | No | DID of the user to inspect. Defaults to the authenticated session. | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky nowplaying did:plc:7vdlgi2bflelz7mmuxoqjfcr ``` # Overview Source: https://docs.rocksky.app/cli/overview Scrobble tracks, view stats, and manage your listening history from the terminal. `rocksky` is a command-line interface for the Rocksky API. Use it to scrobble plays, inspect listening stats, manage API keys, and run the MCP / local scrobble servers. ## Install ```bash Global theme={"theme":{"light":"github-light","dark":"synthwave-84"}} npm install -g @rocksky/cli ``` ```bash One-off theme={"theme":{"light":"github-light","dark":"synthwave-84"}} npx @rocksky/cli --help ``` ## Common workflow ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky login alice.bsky.social # one-time auth rocksky whoami # confirm session rocksky nowplaying # what's playing right now rocksky scrobbles --limit 20 # your recent history rocksky stats # listening stats ``` ## Commands | Command | Description | | - | - | | [`login`](/cli/login) | Authenticate with your Bluesky handle | | [`whoami`](/cli/whoami) | Show the currently authenticated user | | [`nowplaying`](/cli/nowplaying) | Show the currently playing track | | [`scrobbles`](/cli/scrobbles) | List recent scrobbles | | [`scrobble`](/cli/scrobble) | Record a track to your profile | | [`search`](/cli/search) | Search tracks, albums, and accounts | | [`stats`](/cli/stats) | Listening stats for a user | | [`artists`](/cli/artists) | Top artists for a user | | [`albums`](/cli/albums) | Top albums for a user | | [`tracks`](/cli/tracks) | Top tracks for a user | | [`create apikey`](/cli/create-apikey) | Generate a new API key | | [`import`](/cli/import) | Import history from a Spotify or Last.fm export | | [`sync`](/cli/sync) | Sync local data from the AT Protocol | | [`mcp`](/cli/mcp) | Start the MCP server for Claude and other LLMs | | [`scrobble-api`](/cli/scrobble-api) | Run a local Last.fm / ListenBrainz-compatible server | | [`mpd`](/cli/mpd) | Serve your library over the MPD protocol | | [`help`](/cli/help) | Show help for any command | ## Remote control Whenever the CLI player is running (the interactive TUI, or the [`mpd`](/cli/mpd) daemon), it connects to Rocksky over a WebSocket and appears as a controllable device in the Rocksky web and mobile miniplayers — just like the Rockbox companion. What you play on the CLI shows up there in real time, and play / pause / next / previous / seek from the miniplayer drive the CLI, with elapsed time kept in sync both ways. It authenticates with the same session token from `rocksky login`, so no extra setup is needed. The name shown in the miniplayer's source selector is configurable in `~/.rocksky/settings.toml`: ```toml theme={"theme":{"light":"github-light","dark":"synthwave-84"}} [remote] name = "Living Room" ``` Set `ROCKSKY_NO_REMOTE=1` to disable the connection entirely. # scrobble Source: https://docs.rocksky.app/cli/scrobble Record a play to your Rocksky profile. Submit a one-off scrobble. Useful for testing integrations or recording a play from a source the CLI doesn't watch automatically. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky scrobble [options] ``` ## Parameters | Name | Required | Description | | - | - | - | | `` | Yes | Track title (quote multi-word values) | | `` | Yes | Artist name (quote multi-word values) | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky scrobble "Karma Police" "Radiohead" ``` Run `rocksky help scrobble` to see the optional metadata flags (album, duration, timestamp, MBID, ISRC). # scrobble-api Source: https://docs.rocksky.app/cli/scrobble-api Run a local Last.fm / ListenBrainz / Web Scrobbler-compatible server. Start a local API server that accepts scrobbles from Last.fm, ListenBrainz, and Web Scrobbler clients, and forwards them to Rocksky. Useful for testing or running on a home server. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky scrobble-api [options] ``` ## Required environment variables ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} ROCKSKY_API_KEY=... ROCKSKY_SHARED_SECRET=... ROCKSKY_SESSION_KEY=... ROCKSKY_WEBSCROBBLER_KEY=... ROCKSKY_IDENTIFIER=alice.bsky.social ROCKSKY_PASSWORD=... ``` ## Endpoint summary | Client family | Base URL | | - | - | | ListenBrainz | `http://localhost:8778` | | Last.fm (API 2.0) | `http://localhost:8778/2.0` | | Web Scrobbler | `http://localhost:8778/webscrobbler/` | See [Local scrobble API](/integrations/scrobble-api-local) for the end-to-end setup, including how to obtain each credential. # scrobbles Source: https://docs.rocksky.app/cli/scrobbles List recent scrobbles for yourself or another user. Show the most recent scrobbles for a user. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky scrobbles [options] [did] ``` ## Parameters | Name | Required | Description | | - | - | - | | `[did]` | No | DID to inspect. Defaults to the authenticated session. | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky scrobbles did:plc:7vdlgi2bflelz7mmuxoqjfcr ``` Run `rocksky help scrobbles` to see the available flags (limit, offset, date ranges). # search Source: https://docs.rocksky.app/cli/search Search Rocksky for tracks, albums, and accounts. Free-text search across the Rocksky catalog. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky search [options] ``` ## Parameters | Name | Required | Description | | - | - | - | | `` | Yes | Search string (artist, album, track, or account) | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky search "linkin park" ``` # stats Source: https://docs.rocksky.app/cli/stats Show listening statistics for a user. Print aggregated listening stats for a user (scrobble totals, unique artists, unique tracks, etc.). ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky stats [options] [did] ``` ## Parameters | Name | Required | Description | | - | - | - | | `[did]` | No | DID to inspect. Defaults to the authenticated session. | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky stats did:plc:7vdlgi2bflelz7mmuxoqjfcr ``` # sync Source: https://docs.rocksky.app/cli/sync Sync local Rocksky data from the AT Protocol. Pull your scrobbles and metadata from the AT Protocol into local state. Useful when running the [local scrobble API](/cli/scrobble-api) or after restoring from a backup. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky sync ``` Run `rocksky help sync` for the optional flags. # tracks Source: https://docs.rocksky.app/cli/tracks Show top tracks for a user. List a user's top tracks, ranked by play count. ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky tracks [options] [did] ``` ## Parameters | Name | Required | Description | | - | - | - | | `[did]` | No | DID to inspect. Defaults to the authenticated session. | ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky tracks did:plc:7vdlgi2bflelz7mmuxoqjfcr ``` # whoami Source: https://docs.rocksky.app/cli/whoami Show the currently authenticated user. Print the identity attached to the current CLI session — useful as a smoke test after [`rocksky login`](/cli/login). ## Usage ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} rocksky whoami ``` ## Example ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} $ rocksky whoami alice.bsky.social (did:plc:7vdlgi2bflelz7mmuxoqjfcr) ``` # FAQ Source: https://docs.rocksky.app/faq Common questions about Rocksky, scrobbling, self-hosting, and privacy. ## General Rocksky is a decentralized, open-source alternative to Last.fm built on the AT Protocol (the same protocol that powers Bluesky). It automatically tracks ("scrobbles") your music listening from many sources and publishes it to your own decentralized identity, giving you full ownership of your data. * You **own your data** on the AT Protocol — you can move it or self-host * Real-time **Stories** feed showing what your friends are playing * Strong compatibility with existing scrobblers * Fully open source and self-hostable * No corporate control or data lock-in Yes for the hosted version at [rocksky.app](https://rocksky.app). Any AT Protocol identity works, including one from a self-hosted PDS. No. Rocksky is an independent project built on top of the AT Protocol. It is not affiliated with or endorsed by Bluesky. ## Privacy & data Your scrobbles are stored on an **AT Protocol Personal Data Server (PDS)**. You control your data and can export or migrate it any time. Yes. You can delete individual scrobbles or your entire history at any time. ## Scrobbling & integrations Scrobbling is the act of automatically recording the songs you play — artist, track, album, timestamp, duration, etc. — and publishing them to your profile. * **Spotify** * **[Jellyfin](/integrations/jellyfin)** * **[Navidrome](/integrations/navidrome)** * **[Pano Scrobbler](/integrations/pano-scrobbler)** (Android, Windows, Linux) * **WebScrobbler** (Chrome / Firefox) * **[Kodi](/integrations/kodi)** * Any player that supports the **Last.fm** or **ListenBrainz** API Yes — especially with Spotify and supported native clients. ## Self-hosting Absolutely. Rocksky is designed to be fully self-hostable. It requires Docker, some technical knowledge, and ongoing maintenance. Detailed guides and Docker Compose files are provided. A simpler one-click setup is planned. Yes. ## Social & features A real-time decentralized feed showing what your Bluesky friends (and other Rocksky users) are listening to right now. Yes — likes and a shoutbox-style commenting system are supported. On the roadmap (high priority). ## Troubleshooting 1. Check that the scrobbler is pointing to the correct Rocksky endpoint 2. Verify your API key (if using manual setup) 3. Make sure your player is sending the required metadata The hosted version is still in active development; performance is improving quickly. Self-hosting close to you usually feels faster. ## Development Yes. Rocksky is open source and lives on Tangled at [tangled.org/@rocksky.app/rocksky](https://tangled.org/@rocksky.app/rocksky). You can explore the source, self-host, build integrations, and contribute. * Join the [Discord](https://discord.gg/EVcBy2fVa3) * Open issues or PRs on Tangled * Help improve documentation * Build integrations *** **Still have questions?** * Join the [Discord community](https://discord.gg/EVcBy2fVa3) * Open an issue on [Tangled](https://tangled.org/@rocksky.app/rocksky/issues/new) * Send us a message on [Bluesky](https://bsky.app/profile/did:plc:vegqomyce4ssoqs7zwqvgqty) # Introduction Source: https://docs.rocksky.app/index Rocksky is a decentralized, open-source music scrobbling network built on the AT Protocol. **Rocksky** is a decentralized, open-source alternative to Last.fm built on the [AT Protocol](https://atproto.com) — the same protocol that powers [Bluesky](https://bsky.app). It tracks ("scrobbles") the songs you play across your music apps and publishes them to your own decentralized identity, so your listening history belongs to you, not a single company. The hosted version is the fastest way to get started. Sign in with Bluesky and connect a source. A 5-minute walkthrough: sign in, connect a source, start scrobbling. ## Why Rocksky? * **You own your data.** Scrobbles live on your AT Protocol PDS, not on a vendor-controlled server. Export, migrate, or self-host whenever you want. * **Works with what you already use.** Spotify, Jellyfin, Navidrome, Kodi, Pano Scrobbler, WebScrobbler, plus anything that speaks the Last.fm or ListenBrainz protocol. * **Real-time and social.** A live **Stories** feed shows what people you follow are playing right now. Likes and shoutbox comments are first-class. * **Bring your own music and storage.** Upload music to your own S3-compatible bucket or use Rocksky storage. Stream your library with any [Navidrome / Subsonic client](/integrations/navidrome-server) or [Jellyfin client](/integrations/jellyfin-server). * **Open source.** [Self-host the whole stack](https://tangled.org/@rocksky.app/rocksky), build integrations, or contribute on Tangled. ## What is "scrobbling"? Scrobbling means automatically recording the track you're listening to — artist, title, album, timestamp, duration — and publishing it to your profile. Rocksky scrobbles from your music apps in real time and makes the history queryable, shareable, and portable. ## How it works Use any AT Protocol identity. No separate Rocksky account to manage. Spotify connects in one click. Self-hosted players (Jellyfin, Navidrome, Kodi) point their ListenBrainz/Last.fm scrobbler at the Rocksky endpoint. Your plays show up on your profile and in the Stories feed within seconds. Browse charts, find new neighbours, follow friends, react to shouts, or pull your data through the [SDKs](/sdks/overview) and [API](/api-reference/introduction). ## Who is it for? Keep your listening history on infrastructure you control. A native scrobbling layer for the open social web. Plays nicely with Jellyfin, Navidrome, and your own PDS. Typed [SDKs in 10 languages](/sdks/overview), a Last.fm/ListenBrainz-compatible scrobble API, and an [MCP server](/cli/mcp) for LLMs. ## Next steps Scrobble from your Jellyfin library. Scrobble from Navidrome. Point a Last.fm-compatible scrobbler at Rocksky. Swap the API endpoint, reuse your existing clients. # Native Android scrobbling Source: https://docs.rocksky.app/integrations/android Record plays from other music apps with Rocksky's built-in Android scrobbler. The Rocksky Android app can scrobble music from other apps on your phone. Sign in, grant notification access, and listen normally. You do not need to create an API key or configure a separate scrobbler. Rocksky reads the title, artist, and available album information from Android media sessions. Players such as Spotify, Tidal, Deezer, YouTube Music, and Apple Music can provide this information. Detection depends on the metadata each player shares with Android; a title and artist are required. Get the Android app and start scrobbling from your music players. ## Set up scrobbling Install the [Rocksky Android app](https://play.google.com/store/apps/details?id=app.rocksky) and sign in to the account where you want to save your listens. Go to **Profile > Scrobbling**. Make sure **Scrobble other apps** is on. Scrobbling and newly detected players are enabled by default. Go to **Profile > Scrobbling > Manage Notification access** and give Rocksky permission to read notifications in Android's settings. Return to Rocksky when you finish. Android may also ask permission to show notifications. That permission controls Rocksky's ongoing service notification; you still need to grant **notification access** so Rocksky can detect music from other apps. Under **Apps to scrobble**, leave the players you want to track switched on. Other media players appear automatically when detected. Turn a player off to stop collecting new listens from it. Start music in an enabled player. The scrobbling screen should show **Listening in the background** and a **DETECTED NOW** card with the track. After it qualifies, the card changes to **LISTEN SAVED**. This feature requires a native Android build of Rocksky. It is not available in Expo Go or on iOS. Rocksky's own player is excluded from this listener because it already has its own scrobbling support. ## Choose when a track counts In **When to scrobble**, the default **Listening time** mode saves a play after 50% of the track or 4 minutes of actual listening, whichever comes first. Tracks with a known duration below 30 seconds are skipped. Pauses, buffering, and seeking forward do not add listening time. If the duration is unavailable, Rocksky uses the configured time in seconds. You can change **Maximum listening time (seconds)**, **Track percentage**, and **Minimum track length (seconds)**, then tap **Save timing**. Tap **Restore default timing** to reset these settings. Choose **Track position** to save when playback reaches a particular position instead. Seeking to that position can qualify the play. A track shorter than the selected position cannot qualify. ## Scrobble recognized music Turn on **Music recognition** and enable the recognition app under **Apps to scrobble**. Rocksky reads supported recognition-result notifications; these results do not have a playback position. | Source | When Rocksky saves the result | | - | - | | Shazam / Auto Shazam and Audile | Immediately after a supported result notification appears | | Supported legacy Pixel Now Playing, Pixel Ambient Services, and Ambient Music Mod notifications | After 15 seconds, unless the notification disappears first | Repeated recognitions of the same track are suppressed for five minutes. Album information is included when the recognition app supplies it. Newer Pixel Now Playing versions may hide recognition data. If the notification does not expose a supported title and artist, Rocksky cannot record it. ## Background listening and offline uploads The native listener can continue with the screen off and without keeping the Rocksky screen open. If your phone restricts background activity, tap **Background & battery settings** and allow unrestricted battery usage for Rocksky. Android force-stop suspends detection until you reopen the app. Qualifying listens are saved on your device before upload. **Offline queue** shows how many are waiting, whether any need a retry, and the last upload time. Uploads resume automatically when you have a connection and scrobbling is enabled, even with the app closed. Queued listens keep their original listening timestamps. **LISTEN SAVED** means the listen has been saved locally; it may still be waiting to upload. Check your Rocksky profile after the queue drains to see your plays. Turning off **Scrobble other apps** pauses both collection and uploads without deleting queued listens. Turning off an individual player stops new collection from that player. Saved listens stay tied to the account that collected them; signing in to another account does not upload them to that account. ## Troubleshooting * **No track appears:** Check that you are signed in, notification access is enabled, and the player is on under **Apps to scrobble**. Start playback again. The player must provide both a title and an artist. * **Tracking stops with the screen off:** Allow unrestricted battery usage and reopen Rocksky if you force-stopped it. * **Listens stay queued:** Check your connection and turn on **Scrobble other apps**. Sign in again if your session has expired, using the account that collected the listens. Tap **Retry saved listens** to retry failed uploads. * **A play appears twice:** Disable overlapping scrobbling for the same player in other integrations, such as [Pano Scrobbler](/integrations/pano-scrobbler) or a separate Spotify connection. If you prefer a separate Android scrobbler, see the [Pano Scrobbler setup guide](/integrations/pano-scrobbler). # Claude Desktop (MCP) Source: https://docs.rocksky.app/integrations/claude-desktop Query your scrobble history from Claude Desktop using the Rocksky MCP server. The Rocksky CLI ships a [Model Context Protocol](https://modelcontextprotocol.io) server. Plug it into Claude Desktop and Claude can read your scrobble history, top artists, now playing, and search the Rocksky catalog. ## Prerequisites * [Node.js](https://nodejs.org/) and `npm` * [Claude Desktop](https://claude.ai/download) * A [Rocksky](https://rocksky.app) account ## Install the CLI ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} npm install -g @rocksky/cli ``` ## Add the MCP server to Claude Desktop Open Claude Desktop's settings, find the **MCP** section, and add this entry to your config: ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "mcpServers": { "rocksky": { "command": "rocksky", "args": ["mcp"] } } } ``` Restart Claude Desktop to load the server. ## What you can ask * "What were my top 10 tracks last week?" * "What am I listening to right now?" * "Show me the recent scrobbles for @alice.bsky.social" * "Search Rocksky for albums by Radiohead" * "Create a new API key called `my-bot`" Claude Desktop listing the user's recently played scrobbles via the Rocksky MCP server ## Troubleshooting * Confirm the CLI is on your PATH: `rocksky --help` * Make sure you've logged in once: `rocksky login ` * Restart Claude Desktop after editing the MCP config * Check Claude Desktop's MCP logs if a tool call fails See the [`rocksky mcp`](/cli/mcp) command reference for more. # Jellyfin Source: https://docs.rocksky.app/integrations/jellyfin Scrobble plays from your Jellyfin server to Rocksky. Rocksky speaks the ListenBrainz protocol, which means the community ListenBrainz plugin for Jellyfin works out of the box — you just need to point it at the Rocksky endpoint. ## Prerequisites * A running [Jellyfin](https://jellyfin.org) server * A [Rocksky](https://rocksky.app) account * An API key from the [API Applications](https://rocksky.app/apikeys) page ## Setup Install the community [ListenBrainz plugin](https://github.com/lyarenei/jellyfin-plugin-listenbrainz), then open its settings under **Dashboard → Plugins → ListenBrainz**. Replace the default endpoint: ``` https://api.listenbrainz.org ``` with the Rocksky endpoint: ``` https://audioscrobbler.rocksky.app ``` Paste your Rocksky API key into the **User token** field and save. Jellyfin ListenBrainz plugin configured with the Rocksky audioscrobbler URL Play a track in Jellyfin and refresh your Rocksky profile — the scrobble should appear in real time. Jellyfin sends a scrobble after you've played enough of a track. If a play doesn't register, scrub past \~30 seconds and let it keep playing. # Rocksky as a personal Jellyfin server Source: https://docs.rocksky.app/integrations/jellyfin-server Stream your uploaded library through any Jellyfin-compatible client, using Rocksky as the backend. Rocksky exposes a Jellyfin-compatible API alongside the [Subsonic one](/integrations/navidrome-server). Upload your music to your private Rocksky library and stream it from any Jellyfin client — phone, desktop, car head unit — without running your own server. Bring your own S3-compatible storage for your uploaded music, or use Rocksky storage. Both options work with any Jellyfin or Navidrome-compatible client. This is the same library, the same credentials and the same uploads as the Subsonic endpoint. Use whichever protocol your favourite app speaks; you can use both at once. ## Step 1: Upload music To use your own S3-compatible bucket, follow the [storage setup instructions](/integrations/navidrome-server#step-1-upload-music), then select **Your storage** on the upload page. You can also select **Rocksky storage** to use managed storage. Open **My Library** in Rocksky's sidebar and drag your audio files (MP3, FLAC, M4A, OGG, WAV, AIFF) into the upload page. Required tags: title, artist, album, album artist, duration, album art. Need to tag your files first? [MusicBrainz Picard](https://picard.musicbrainz.org/) auto-fills metadata from the MusicBrainz database. Your uploaded music is private — only you can access and stream your files. ## Step 2: Get an API key Visit the [API Keys](https://rocksky.app/apikeys) page and generate a new key. You'll use it as the password in your Jellyfin client. ## Step 3: Configure your client Add a new server. Most clients ask for the address first, then the credentials on a separate screen — the login screen will not list any users, because this server fronts every Rocksky account. Type your handle in manually. | Field | Value | | - | - | | Server URL | `https://jellyfin.rocksky.app` | | Username | Your ATProto handle (e.g. `alice.bsky.social`) | | Password | Your Rocksky API key | ## Compatible apps * **Finamp** (Android, iOS) * **Symfonium** (Android) * **Streamyfin** (Android, iOS) * **Findroid** (Android) * **Feishin** (desktop) * …and most other Jellyfin music clients. ## Scrobbling Plays from any of these clients are scrobbled automatically — there's nothing extra to wire up. Hearting a track in your client stars it on Rocksky and publishes the like to your PDS, the same as it does over Subsonic. ## What's there and what isn't Artists, albums, songs, genres, years, playlists, favourites, search, resume positions and play counts all work. There is no video library, no transcoding (clients get the original file) and no lyrics — Rocksky stores neither. # Kodi Source: https://docs.rocksky.app/integrations/kodi Scrobble plays from Kodi to Rocksky using the official ListenBrainz add-on. Kodi ships a ListenBrainz Scrobbler add-on in the official repository. With two settings, you can point it at Rocksky. ## Prerequisites * [Kodi](https://kodi.tv/) media center * A [Rocksky](https://rocksky.app) account * An API key from the [API Applications](https://rocksky.app/apikeys) page ## Setup In Kodi, go to **Add-ons → Install from repository → Kodi Add-on repository → Services → ListenBrainz Scrobbler** and install it. Open the add-on settings and change the ListenBrainz API endpoint to: ``` https://audioscrobbler.rocksky.app ``` Paste your Rocksky API key into the **Token** field. Kodi ListenBrainz Scrobbler settings configured with the Rocksky audioscrobbler URL Restart Kodi, play a track, and check your Rocksky profile to confirm the scrobble appears. # Navidrome Source: https://docs.rocksky.app/integrations/navidrome Scrobble from a Navidrome server to Rocksky using the ListenBrainz-compatible API. Navidrome ships with native ListenBrainz scrobbling. Rocksky implements that same protocol, so the integration is a one-line config change. ## Prerequisites * A running [Navidrome](https://www.navidrome.org/) server * A [Rocksky](https://rocksky.app) account * An API key from the [API Applications](https://rocksky.app/apikeys) page ## Configure Navidrome Enable ListenBrainz scrobbling, then point Navidrome at the Rocksky endpoint. ```toml navidrome.toml theme={"theme":{"light":"github-light","dark":"synthwave-84"}} ListenBrainz.Enabled = true ListenBrainz.BaseURL = "https://audioscrobbler.rocksky.app/1/" ``` ```bash Environment theme={"theme":{"light":"github-light","dark":"synthwave-84"}} ND_LISTENBRAINZ_ENABLED=true ND_LISTENBRAINZ_BASEURL=https://audioscrobbler.rocksky.app/1/ ``` Restart Navidrome to pick up the changes. ## Add your API key 1. Open your Navidrome profile. 2. Enable **ListenBrainz** scrobbling. 3. Paste your Rocksky API key into the token field. ## Verify Play a track through Navidrome and check your [Rocksky profile](https://rocksky.app) — the scrobble should appear in your history. Navidrome only sends a scrobble once you've played enough of a track. # Rocksky as a personal Navidrome server Source: https://docs.rocksky.app/integrations/navidrome-server Stream your uploaded library through any Navidrome / Subsonic-compatible client, using Rocksky as the backend. Rocksky exposes a Subsonic / Navidrome-compatible API. Upload your music to your private Rocksky library and stream it from any Subsonic client — phone, desktop, car head unit — without running your own server. Bring your own S3-compatible storage for your uploaded music, or use Rocksky storage. You can also stream the same library with any [Jellyfin client](/integrations/jellyfin-server). ## Step 1: Upload music Open **My Library** in Rocksky's sidebar: Rocksky sidebar with 'My Library (experimental)' link and the Scrobble Stats chart To store uploads in your own S3-compatible bucket: 1. Open [Storage](https://rocksky.app/storage) and click **Connect storage**. 2. Enter a name, bucket, S3 endpoint, access key ID, secret access key, and region. 3. Click **Connect & verify**. 4. On the upload page, select **Your storage** and choose your bucket. You can use AWS S3, Cloudflare R2, Backblaze B2, MinIO, or another S3-compatible provider. Select **Rocksky storage** to use managed storage instead. Drag and drop your audio files (MP3, FLAC, M4A, OGG, WAV, AIFF) into the upload page. Required tags: title, artist, album, album artist, duration, album art. Need to tag your files first? [MusicBrainz Picard](https://picard.musicbrainz.org/) auto-fills metadata from the MusicBrainz database. Rocksky Upload Music page with a track successfully uploaded Your uploaded music is private — only you can access and stream your files. ## Step 2: Get an API key Visit the [API Keys](https://rocksky.app/apikeys) page and generate a new key. You'll use it as the password in your Subsonic client. ## Step 3: Configure your client In any Subsonic / Navidrome-compatible app, add a new server with these details: | Field | Value | | - | - | | Server URL | `https://navidrome.rocksky.app` | | Username | Your ATProto handle (e.g. `alice.bsky.social`) | | Password | Your Rocksky API key | Cassette desktop app configured against navidrome.rocksky.app ## Compatible apps * **Symfonium** (Android) * **Substreamer** (Android, iOS) * **Cassette** (iOS) * **play:Sub** (iOS) * **Amperfy** (iOS, macOS) * **Tempo** (iOS, macOS) * …and many other Navidrome / Subsonic clients. ## Scrobbling Plays from any of these clients are scrobbled automatically — there's nothing extra to wire up. # Pano Scrobbler (Android) Source: https://docs.rocksky.app/integrations/pano-scrobbler Scrobble from any Android music player using Pano Scrobbler. [Pano Scrobbler](https://github.com/kawaiiDango/pano-scrobbler) watches playback on your Android device and forwards each play to a scrobbling service. Point it at Rocksky's ListenBrainz endpoint and every Android player on your phone starts scrobbling. ## Prerequisites * Android device with Pano Scrobbler installed * A [Rocksky](https://rocksky.app) account * An API key from the [API Applications](https://rocksky.app/apikeys) page ## Setup Launch the app on your Android device. Go to **Settings** and scroll to the **ListenBrainz** section. Enable it if it isn't already. Tap **Custom server URL** and enter: ``` https://audioscrobbler.rocksky.app ``` Paste your Rocksky API key into the **Authentication token** field, then save. Pano Scrobbler Custom ListenBrainz settings with the Rocksky API URL filled in Once it's running, Pano Scrobbler watches every playing app on your device: Pano Scrobbler home screen listing recently played tracks ## Verify Start playing a track. Visit [rocksky.app](https://rocksky.app) — your recent scrobbles should appear in real time. Pano Scrobbler waits until enough of a track has played before submitting it. ## What you can see in the app Rocksky answers the full ListenBrainz read API, so Pano Scrobbler's own screens are filled from your Rocksky account rather than left blank: | Screen | Reads from | | - | - | | Scrobbles | your listen history, with the track playing now | | Charts — top artists | your plays in the selected period | | Charts — top albums | the same, by album | | Charts — top tracks | the same, by track | | The bar chart | plays per day, month or year across the period | | Loved | the songs you have hearted on Rocksky | | Friends | the people you follow, and what each is playing | | Profile / drawer | your total scrobble count | Hearting a song in Pano Scrobbler loves it on Rocksky, and unhearting removes it — the same list the web app shows. Every period the app offers works: this week, last week, this month, last month, last quarter, last half year, this year, last year, and all time. ## Two things that do not work * **No album art.** A ListenBrainz listen carries no image URL; clients build cover art from a MusicBrainz *release* id against the Cover Art Archive, and Rocksky's catalogue does not store one. There is no field on the wire to put Rocksky's own artwork in, so the app falls back to placeholders. * **Deleting a scrobble.** A Rocksky scrobble lives in your own AT Protocol repository and the row Rocksky shows is a copy of it, so deleting the copy would only make it reappear on the next sync. Pano Scrobbler reports the delete as failed. Remove the scrobble from the Rocksky app instead. # Local scrobble API Source: https://docs.rocksky.app/integrations/scrobble-api-local Run a local ListenBrainz / Last.fm / Web Scrobbler-compatible server backed by Rocksky. The Rocksky CLI can boot a local scrobble server that speaks the ListenBrainz, Last.fm, and Web Scrobbler protocols. Point any compatible client at `localhost` and have your plays forwarded to Rocksky — handy for offline-tolerant setups, testing integrations, or running on a home server. `npx @rocksky/cli scrobble-api` running in a terminal, syncing scrobbles and connecting to JetStream ## Prerequisites * [Node.js](https://nodejs.org/) * An AT Protocol (Bluesky) account ## Configure credentials Set these environment variables once so the server can authenticate after a restart: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} export ROCKSKY_API_KEY=... export ROCKSKY_SHARED_SECRET=... export ROCKSKY_SESSION_KEY=... export ROCKSKY_WEBSCROBBLER_KEY=... export ROCKSKY_IDENTIFIER=alice.bsky.social # your handle or DID export ROCKSKY_PASSWORD=... # app password from https://bsky.app/settings/app-passwords ``` ## Start the server ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} npx @rocksky/cli scrobble-api ``` The server listens on `http://localhost:8778`. First startup can take a while: it syncs your existing scrobble history locally before accepting writes. ## Point your clients at it Base URL: `http://localhost:8778`. Use your `ROCKSKY_API_KEY` as the authentication token. Base URL: `http://localhost:8778/2.0`. Use your `ROCKSKY_API_KEY` and `ROCKSKY_SESSION_KEY`. Endpoint: `http://localhost:8778/webscrobbler/` See the [`rocksky scrobble-api`](/cli/scrobble-api) command reference for the full surface. # Web Scrobbler Source: https://docs.rocksky.app/integrations/web-scrobbler Scrobble plays from YouTube, SoundCloud, Spotify Web, and 100+ other sites with the Web Scrobbler browser extension. [Web Scrobbler](https://github.com/web-scrobbler/web-scrobbler) is a free browser extension that detects what you're playing on YouTube, SoundCloud, Spotify Web, Bandcamp, Apple Music Web, and over 100 other sites. Point its custom webhook at Rocksky and every detected play lands in your timeline. ## Prerequisites * A [Rocksky](https://rocksky.app) account * A supported browser (Chrome, Firefox, Edge, or any Chromium-based browser) ## Setup Install the extension from the [Web Scrobbler repository](https://github.com/web-scrobbler/web-scrobbler) or your browser's add-on store. Pin it to the toolbar so you can confirm detections. Sign in to [rocksky.app](https://rocksky.app), open the avatar menu in the top-right, and select **Web Scrobbler**. A modal pops up with a personal webhook URL of the form: ``` https://webscrobbler.rocksky.app/ ``` Click the copy icon next to the URL. Your webhook UUID is created automatically the first time you open the Web Scrobbler modal. Keep it private — anyone with the URL can post scrobbles to your account. Open the Web Scrobbler extension settings and go to **Accounts → Webhook → API URL**. Paste the URL you copied and save. Web Scrobbler extension settings — Accounts › Webhook › API URL field showing the Rocksky webhook URL Play a song on any supported site (YouTube is the easiest test) and let it run past the scrobble threshold (usually \~30 seconds or 50% of the track, whichever comes first). Refresh your Rocksky profile — the play should appear. ## What gets sent Web Scrobbler posts a JSON payload to the webhook for two event types: * **Now playing** — when a track starts. Surfaces as your current "Now playing" status on Rocksky. * **Scrobble** — when the track meets Web Scrobbler's threshold. Stored as a permanent scrobble. Track metadata is best-effort — Web Scrobbler reads what each site exposes, so the title/artist/album fidelity depends on the source. Rocksky normalises the incoming text and tries to match it against its catalog. ## Rotating the webhook If your webhook URL leaks, reach out on [Discord](https://discord.gg/EVcBy2fVa3) to have the UUID rotated. After rotation, paste the new URL into Web Scrobbler's API URL field — the old one will start rejecting submissions. Web Scrobbler detection runs in the page context of each site. Some sites change their DOM and break detection temporarily — check [the Web Scrobbler issue tracker](https://github.com/web-scrobbler/web-scrobbler/issues) if a specific site stops scrobbling. # Migrating from Last.fm Source: https://docs.rocksky.app/migrations/from-lastfm Repoint any Last.fm Audioscrobbler-compatible client at Rocksky. Rocksky implements the Last.fm Audioscrobbler API (both the modern 2.0 protocol and the legacy submission protocol). Migrating an existing client usually means changing one URL and swapping credentials. ## Get your credentials 1. Sign in to [rocksky.app](https://rocksky.app). 2. Go to your [API Applications](https://rocksky.app/apikeys). 3. Create an application to get an **API key** and **shared secret**. 4. Generate a **session key** with [`rocksky login`](/cli/login). ## Modern Last.fm clients (API 2.0) Replace the base URL: | Last.fm | Rocksky | | - | - | | `https://ws.audioscrobbler.com/2.0` | `https://audioscrobbler.rocksky.app/2.0` | Authentication still uses `api_key` and `sk` (session key) parameters with MD5-signed requests: 1. Sort all request parameters by key alphabetically. 2. Concatenate `key + value` pairs into one string. 3. Append your shared secret. 4. MD5-hash the result; send it as `api_sig`. ## Legacy submission protocol For older clients (e.g. Deadbeef), use the legacy endpoint: ``` https://audioscrobbler.rocksky.app ``` * **Username**: your API key * **Password**: your shared secret ## Metadata normalization Rocksky normalizes incoming track metadata before storing it. If the track can't be matched against a known song, the scrobble is skipped rather than stored as an orphan record. ## Why migrate? * Your scrobbles live on infrastructure you can self-host * Real-time **Stories** feed for what your network is playing * AT Protocol identity — portable, exportable, no lock-in * Compatible with existing tools you already trust Need help? Open a thread in the [Discord](https://discord.gg/EVcBy2fVa3). # Migrating from ListenBrainz Source: https://docs.rocksky.app/migrations/from-listenbrainz Switch any ListenBrainz client over to Rocksky in two steps. Rocksky exposes a ListenBrainz-compatible API for the core scrobbling endpoints. Most ListenBrainz clients can be moved over by changing the base URL and the API token. ## Prerequisites * A [Rocksky](https://rocksky.app) account * An API key from the [API Applications](https://rocksky.app/apikeys) page * A ListenBrainz-compatible scrobbler ## Step 1: Change the base URL | ListenBrainz | Rocksky | | - | - | | `https://api.listenbrainz.org` | `https://audioscrobbler.rocksky.app` | ## Step 2: Use your Rocksky API key Update the `Authorization` header your client sends: ``` Authorization: Token ``` ## Step 3: Test it Submit a sample scrobble to `/submit-listens` with valid metadata, then check your [Rocksky profile](https://rocksky.app) to confirm it landed. ## Supported endpoints The Rocksky audioscrobbler implements the core ListenBrainz endpoints, including: * `POST /1/submit-listens` * `GET /1/validate-token` ## Metadata normalization Rocksky tries to normalize incoming track metadata against its catalog. If a match cannot be found, the scrobble may be skipped instead of stored. ## Per-client setup If you use one of these clients, the per-client guide already covers the URL swap: * [Jellyfin](/integrations/jellyfin) * [Navidrome](/integrations/navidrome) * [Pano Scrobbler (Android)](/integrations/pano-scrobbler) * [Kodi](/integrations/kodi) # Mirror from Last.fm Source: https://docs.rocksky.app/mirroring/lastfm Pull plays from a Last.fm account into Rocksky on a 30-second poll. Rocksky polls Last.fm's `user.getRecentTracks` endpoint every 30 seconds and mirrors any new scrobble into your Rocksky timeline. Your existing Last.fm setup keeps working unchanged. ## Prerequisites * A [Rocksky](https://rocksky.app) account * A Last.fm account that's actively receiving scrobbles * A Last.fm API key (free, instant — see below) ## Setup Go to [last.fm/api/account/create](https://www.last.fm/api/account/create) and fill in the form. The "callback URL" and "application homepage" fields can be anything — they aren't used for read-only access. Copy the 32-character **API key**. You can ignore the shared secret — `user.getRecentTracks` is a read-only endpoint and doesn't need signed requests. Sign in to Rocksky and open [rocksky.app/mirrors](https://rocksky.app/mirrors). Select the **Last.fm** tab. * **Username** — your Last.fm handle (the one in your profile URL, e.g. `last.fm/user/`). * **Last.fm API key** — the 32-character key from step 1. Click **Save credentials**. The API key is encrypted with XSalsa20-Poly1305 before being written to the database. Flip the **Mirror enabled** toggle on. Within \~30 seconds the worker picks up the change and starts polling. ## What gets mirrored * Completed scrobbles from `user.getRecentTracks`, newest first. * Currently-playing tracks are skipped — Rocksky only mirrors plays that have a `date` timestamp. * On first enable, a 24-hour backfill window is seeded so recent plays land too, not just future ones. ## Dedup behaviour Each candidate play is checked against your existing scrobbles within a ±120-second window. If you also scrobble to Rocksky directly (from Jellyfin, Navidrome, the browser extension, etc.), you won't get duplicates — whichever arrives first wins. ## Rotating or removing the key * **Rotate** — type a new API key into the field and save. The previous encrypted value is overwritten. * **Remove** — clear the API key and save. The mirror source becomes unauthenticated and the worker exits. # Mirror from ListenBrainz Source: https://docs.rocksky.app/mirroring/listenbrainz Pull listens from a ListenBrainz account into Rocksky on a 30-second poll. Rocksky polls ListenBrainz's `/1/user/{name}/listens` endpoint every 30 seconds and mirrors new listens into your Rocksky timeline. ## Prerequisites * A [Rocksky](https://rocksky.app) account * A ListenBrainz account that's actively receiving listens * A ListenBrainz user token ## Setup While signed in to ListenBrainz, open [listenbrainz.org/settings](https://listenbrainz.org/settings/) and copy your **user token**. Sign in to Rocksky and open [rocksky.app/mirrors](https://rocksky.app/mirrors). Select the **ListenBrainz** tab. * **Username** — your ListenBrainz handle. * **ListenBrainz user token** — the token from step 1. Click **Save credentials**. The token is encrypted with XSalsa20-Poly1305 before being written to the database. Flip the **Mirror enabled** toggle on. The worker picks up the new source within \~30 seconds and starts polling. ## What gets mirrored * Listens returned from `/1/user/{name}/listens`, scoped server-side with `min_ts` so each poll only pulls what's new since the last watermark. * On first enable, a 24-hour backfill window is seeded. ## Dedup behaviour Each listen is checked against your existing scrobbles within a ±120-second window. If you already scrobble to Rocksky from a client that also writes to ListenBrainz, you won't get duplicates. ## Rotating or removing the token * **Rotate** — paste a new token and save. * **Remove** — clear the token and save; the worker exits. ListenBrainz's listens endpoint is publicly readable for non-private accounts, but Rocksky still requires a token so polling stays under the authenticated rate limit and mirrors keep up. # Scrobble mirroring Source: https://docs.rocksky.app/mirroring/overview Keep using Last.fm, ListenBrainz, or Teal.fm — and have those plays mirror into Rocksky automatically. Mirroring is the lighter-touch alternative to fully [migrating](/migrations/from-lastfm) off another scrobbler. You keep your existing setup exactly as it is — Rocksky just pulls new plays from your account on the other service and re-publishes them as scrobbles on your account. ## How it differs from migrating | | Migrating | Mirroring | | - | - | - | | Your clients send scrobbles to | Rocksky | Last.fm / ListenBrainz / Teal.fm (unchanged) | | Plays land in the other service | No | Yes | | Plays land in Rocksky | Yes | Yes | | Setup | Repoint each client | One toggle in your Rocksky settings | Pick mirroring when you want Rocksky alongside an existing scrobbler. Pick migrating when you're ready to point your clients directly at Rocksky and stop double-writing. ## Supported sources Polls `user.getRecentTracks` every 30 seconds. Polls `/user/{name}/listens` every 30 seconds. Real-time via AT Protocol Jetstream — no polling, no credentials. ## How it works 1. You enter your username (and an API key, for Last.fm and ListenBrainz) on the [Mirrors page](https://rocksky.app/mirrors) and flip the **Mirror enabled** toggle. 2. Credentials are encrypted at rest with XSalsa20-Poly1305 before being written to the database. 3. A background worker picks up the new source within a few seconds and starts polling (or, for Teal.fm, subscribing to Jetstream). 4. Each play newer than the last-seen watermark runs through a ±120-second dedup check against your existing scrobbles. Anything genuinely new is published as `app.rocksky.scrobble.createScrobble`. 5. On first enable, the watermark is seeded 24 hours in the past — so you get a one-day backfill rather than only future plays. ## Disabling Flip the toggle off and the worker stops polling within a poll cycle (≤30s). Your stored credentials stay encrypted in the database so you can re-enable later without re-entering them. Clear them by saving an empty API key. ## FAQ **Will I get duplicate scrobbles if my client also writes directly to Rocksky?** No. The dedup check looks ±120 seconds around each candidate play and skips anything already in your scrobble history from another source. **What happens if my API key expires or is revoked?** The worker logs the auth failure and stops polling that source. Save a new key on the Mirrors page to resume. **Can I mirror more than one source at once?** Yes. Each provider runs independently — enable any combination. # Mirror from Teal.fm Source: https://docs.rocksky.app/mirroring/tealfm Subscribe to Teal.fm play events in real time over AT Protocol Jetstream. Teal.fm publishes plays as AT Protocol records, so Rocksky mirrors them through a single [Jetstream](https://atproto.com/blog/jetstream) subscription to `fm.teal.feed.play` (and the legacy `fm.teal.alpha.feed.play`). No polling, no API keys — your ATProto DID is the only identifier needed. ## Prerequisites * A [Rocksky](https://rocksky.app) account (signed in with the same ATProto identity you use on Teal.fm) * An active Teal.fm account publishing play records ## Setup Sign in to Rocksky and open [rocksky.app/mirrors](https://rocksky.app/mirrors). Select the **Teal.fm** tab. Flip the **Mirror enabled** toggle on. There are no credentials to enter — Rocksky filters the Jetstream firehose for play records whose `did` matches yours. ## How it works * One process-wide WebSocket connection subscribes to both `fm.teal.feed.play` and `fm.teal.alpha.feed.play` on Jetstream. * Enabling mirroring adds your DID to an in-memory set; the next play record from that DID gets normalised and re-published as a Rocksky scrobble. * Disabling removes your DID from the set — within seconds, no further events are processed. Because there's no polling, plays show up within a couple of seconds of Teal.fm broadcasting them to the relay. ## Dedup behaviour Each event runs through the same ±120-second dedup check as the polled sources. If you also scrobble to Rocksky from another client at the same time, only one record lands. Teal.fm mirroring relies on the AT Protocol relay being reachable. If the Jetstream connection drops, Rocksky reconnects automatically — but any plays broadcast during the gap may be missed. Use Last.fm or ListenBrainz mirroring alongside it if you need polled redundancy. # Rocksky playerd Source: https://docs.rocksky.app/players/playerd Play your music on a Raspberry Pi or another computer, and control it from Rocksky. `@rocksky/playerd` is Rocksky's official headless music player. Connect a Raspberry Pi to your speakers, start the daemon, and choose it in the Rocksky Web player. You can browse your library, change tracks, edit the queue, and adjust the volume from another device. The player needs no screen or desktop session. Rocksky Web playback controls with an Orange Pi selected in the device picker ## Install Prebuilt binaries support Linux x86\_64, Linux aarch64, and Apple Silicon Macs. Use a **64-bit operating system** on your Raspberry Pi. Other platforms need a [build from source](https://tangled.org/rocksky.app/rocksky/tree/main/playerd). ```bash Bun theme={"theme":{"light":"github-light","dark":"synthwave-84"}} bun install -g @rocksky/playerd ``` ```bash Standalone theme={"theme":{"light":"github-light","dark":"synthwave-84"}} curl -fsSL https://raw.githubusercontent.com/tsirysndr/rocksky/main/playerd/install.sh | sh ``` The standalone installer checks the release checksum and installs to `/usr/local/bin` when writable, or `~/.local/bin` otherwise. Make sure the install directory is in your `PATH`. On Debian or Ubuntu, install the ALSA runtime if it is missing: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} sudo apt-get install libasound2 ``` ## Sign in and start playing Install the [Rocksky CLI](/cli/overview), then sign in with your Atmosphere account handle on the computer running playerd: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} bun install -g @rocksky/cli rocksky login alice.bsky.social rocksky whoami playerd --name "Living Room" ``` `rocksky login` opens a browser-based authorization flow. On a headless machine, use the access-token option below if you cannot complete that flow locally. Run the CLI and playerd as the same operating-system user. By default, playerd reads the session from `~/.rocksky/token.json`. Open [Rocksky](https://rocksky.app) with the same account, choose **Living Room** in the player's device picker, and play music from your library. The audio comes from the computer running playerd. You can also start with a local file or directory: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} playerd --name "Living Room" ~/Music/albums/some-album ``` A player appears in the device list after it publishes track state. If a newly started device is missing, try starting it with a local music file. ### Other ways to authenticate Playerd checks these sources in order: 1. `--token` or the `ROCKSKY_TOKEN` environment variable. 2. `token` in its configuration file. 3. The CLI token file, whose location you can override with `token_path`. For a machine without an interactive login session, you can supply a Rocksky access token through `ROCKSKY_TOKEN`. Treat this as a secret; do not commit it to your configuration repository. ## What you can play Playerd plays local audio, your Rocksky uploads, and tracks available through your Rocksky Navidrome library. It resolves stream URLs when you enqueue tracks and provisions Navidrome credentials on first use. Those credentials are cached in `~/.rocksky/navidrome.json` and shared with the CLI. A track in someone's listening history is not necessarily available to stream. Remote queue items need an upload or library track that your account can access. See [Rocksky as a personal Navidrome server](/integrations/navidrome-server) for more about your library. ## Scrobbling and saved playback Playerd records a scrobble after you listen to half a track or four minutes, whichever comes first. It does this itself, so you can close the browser and keep listening. The primary remote device supplies your profile's now-playing status. Selecting another primary device does not disable playerd's own scrobbling. Set `scrobble = false` if you want to turn that off. By default, playerd saves the queue and playback position. After a restart, it restores them **paused**; it does not start playing automatically. ## Configure playerd Create `~/.rocksky/playerd.toml`: ```toml theme={"theme":{"light":"github-light","dark":"synthwave-84"}} name = "Living Room" output = "cpal" buffer_seconds = 10.0 scrobble = true resume = true sync_audio_settings = true ``` Settings load in this order: defaults, configuration file, environment variables, then command-line flags. Run `playerd --help` for the available flags. `cpal` uses your system's default audio output. Playerd also supports raw PCM output through `stdout`, a pre-existing `fifo:/path`, or a listening `unix:/path` or `tcp:address` socket. Socket outputs wait for a client before playback starts. With `sync_audio_settings = true`, playerd follows the audio settings saved to your Atmosphere account. You can also change supported settings remotely, including the equalizer, ReplayGain, crossfade, and Auto DJ. Restart playerd after changing startup settings such as `output`, `buffer_seconds`, `resume`, `scrobble`, or `sync_audio_settings`. ## Run in the background on Linux You can use a systemd user service to keep playerd running. First, find the executable: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} command -v playerd mkdir -p ~/.config/systemd/user ``` Create `~/.config/systemd/user/playerd.service`. Replace the `ExecStart` path below with the absolute path returned by `command -v playerd`: ```ini theme={"theme":{"light":"github-light","dark":"synthwave-84"}} [Unit] Description=Rocksky remote player After=network-online.target sound.target [Service] ExecStart=%h/.local/bin/playerd --name "Living Room" Restart=on-failure RestartSec=3 [Install] WantedBy=default.target ``` Sign in with the CLI as that user before starting the service: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} systemctl --user daemon-reload systemctl --user enable --now playerd journalctl --user -u playerd -f ``` To start the user service at boot without logging in, enable lingering for that user: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} sudo loginctl enable-linger "$USER" ``` ## Troubleshooting | Problem | What to check | | - | - | | Missing access token | Run `rocksky login` as the user running playerd, or provide `ROCKSKY_TOKEN`. | | Device missing from Rocksky | Use the same account on both devices, check connectivity, and start with a local track so the player publishes state. | | `NoOutputDevice` or no sound | Check your system's default audio output and ALSA or PipeWire setup. | | Track cannot stream | Check that it has an accessible upload or Navidrome track ID. Look for credential errors in the logs. | | Playback stutters | Check the network and increase `buffer_seconds`. | For more detailed logs, stop the background service first, then run: ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} RUST_LOG=playerd=debug,rocksky_sdk=debug playerd ``` ## Build an integration Playerd uses the [remote player protocol](/players/remote-protocol). You can use the same protocol to build a controller or connect another music player to Rocksky. [View playerd source on Tangled](https://tangled.org/rocksky.app/rocksky/tree/main/playerd). # Remote player protocol Source: https://docs.rocksky.app/players/remote-protocol Connect a music player or build a controller with Rocksky's WebSocket protocol. Rocksky uses a JSON WebSocket protocol to connect players and controllers. A **player** publishes playback state and executes commands. A **controller** lists players, shows their queues, and sends commands. [Playerd](/players/playerd) implements the player role; the Rocksky Web player implements the controller role. The WebSocket carries commands and state, not audio. Your player needs its own playback engine and must fetch audio separately. ## Endpoint and authentication Connect to `wss://api.rocksky.app/ws`. Include a Rocksky access token in every client JSON message. You can obtain one through [`rocksky login`](/cli/login) or Rocksky's access-token settings. Devices and commands are scoped to the authenticated account's DID. Both roles register a connection. Only connections that publish track state appear as players in device snapshots. Device IDs belong to a connection; capture a new ID after reconnecting. The **primary device** supplies the profile's now-playing status. Select it with `set_primary`. When no primary is available, the server can adopt a lone player. Other players remain controllable. Publishing playback state does not replace submitting scrobbles. Playerd submits its own scrobbles through the Rocksky API. If you build a player, implement scrobbling separately when you want to record listens. ## Connection lifecycle ``` client server │ (open WebSocket) ───────────▶│ │ {"type":"register",...} ─────▶│ │◀───── {"status":"registered","deviceId":"…"} │◀───── {"type":"devices", …} (snapshot of current players) │ │ │ … push state / send commands / receive broadcasts … │ │ │ "ping" ────────────────────▶│ (heartbeat, raw text) │◀─────────────────── "pong" │ ``` 1. **Open** the WebSocket to `wss://api.rocksky.app/ws`. 2. **Register**. The server replies with your `deviceId`, then a `devices` snapshot. 3. **Heartbeat.** Send the literal string `"ping"` every \~10s; the server replies `"pong"`. This keeps the socket alive — the server times out an idle socket after \~60s. 4. **Reconnect.** If the socket closes (network blip, background throttling, idle timeout), reconnect and re-`register`. The server re-sends the `devices` snapshot so you resync immediately. > **Heartbeat note:** some existing clients also send > `{"type":"heartbeat","token":"…"}`; the server ignores it (only the raw > `"ping"` yields `"pong"`). Prefer `"ping"`. *** ## Message envelope All non-heartbeat frames are JSON objects with a `type` field. Client→server frames carry `token`. There are four client→server types (`register`, `command`, `set_primary`, `message`) and several server→client types (below). *** ## Client → server messages ### `register` Announce this connection as a device. ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "register", "clientName": "My Player", "token": "" } ``` * `clientName` — the human label shown in the miniplayer's device picker (e.g. "Rocksky CLI", "Living Room"). **Reply:** `{ "status": "registered", "deviceId": "" }`, immediately followed by a `devices` snapshot below. > **Capture your `deviceId` only from this reply** (the frame with > `status: "registered"`). Do **not** read `deviceId` from other frames — the > `device_registered` broadcast below carries *another* device's id, and > capturing it will make your pushes look like they came from that device. ### `message` — push now-playing / status / queue (player devices) Wrap a state payload. `data.type` is one of `track`, `status`, `queue`. ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "message", "device_id": "", "token": "", "data": { "type": "track", "title": "Song title", "artist": "Artist", "length": 214000, "elapsed": 0, "is_playing": true } } ``` The server enriches `data` (album art, URIs, like status…), then broadcasts it to all of the user's devices as a `message` below. > The server routes/tags broadcasts by the **connection's** registered > `deviceId`, not the `device_id` in your payload — so a wrong value can't > misroute commands. Still, send your own `deviceId` for clarity. **`track`** — the current track. Push on track change, and re-push every few seconds so controllers can reconcile elapsed time. ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "track", "title": "Song title", "artist": "Artist", "album": "Album", "album_artist": "Album artist", "length": 214000, "elapsed": 42000, "duration_ms": 214000, "album_art": "https://…", "is_playing": true, "codec": "flac", "sample_rate": 44100, "shuffle": false, "repeat": "off", "volume": 0.8, "device_name": "My Player" } ``` `codec` and `sample_rate` are passed through verbatim on the broadcast; controller UIs (the web/mobile miniplayers) render them as audio-format badges. `shuffle`, `repeat` and `volume` report the player's own transport state so a controller can render the toggles in the right position. **Omit a field you have no control for** — that is how a controller tells "this player has no shuffle" from "shuffle is off", and it hides the control rather than showing it wrong. Fields the server fills in on the broadcast (you don't send them): `album_art` (canonical, from the library), `song_uri`, `album_uri`, `artist_uri`, `liked`, `sha256`, `duration_ms`. **`status`** — transport state. ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "status", "status": 1 } ``` `status`: `0` = stopped, `1` = playing, `2` = paused (`3` is also treated as paused). Send `1`/`2` on play/pause, `0` on stop. **`queue`** — the playback queue + current index. Push on queue change / track advance. ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "queue", "index": 0, "queue": [ { "uploadId": "", "trackId": "abc", "title": "…", "artist": "…", "album": "…", "album_artist": "…", "album_art": "https://…", "duration": 214000, "song_uri": "at://…", "album_uri": "at://…", "track_number": 3 } ] } ``` The server enriches each item's `album_art` from the library where possible. ### `command` — control a device (controllers) ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "command", "action": "pause", "target": "", "token": "" } ``` * `target` (optional) — send only to that device. Omit to broadcast to **all** the user's devices. * `args` (optional) — action-specific (see **Commands**). The server relays `{ "type": "command", "action": …, "args": … }` to the target(s). `args` is omitted when absent. ### `set_primary` — choose the profile now-playing source (controllers) ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "set_primary", "device_id": "", "token": "" } ``` The server records the primary, broadcasts `primary_changed`, and re-points the profile now-playing at that device's current track. *** ## Server → client messages ### `devices` — snapshot (sent to you right after you register) ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "devices", "primary_device": null, "devices": [ { "device_id": "", "name": "Rocksky CLI", "now_playing": { "type": "track", "title": "Song title", "artist": "Artist", "elapsed": 42000, "length": 214000, "is_playing": true }, "queue": { "index": 0, "queue": [] } } ] } ``` Only players that have published track state appear (controllers are excluded). `primary_device` is a device ID or JSON `null` when none is selected. ### `device_registered` — a new device joined (to the user's other devices) ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "device_registered", "deviceId": "", "clientName": "…" } ``` > Informational. **Never** capture this `deviceId` as your own (see **Register**). ### `device_unregistered` — a device left ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "device_unregistered", "device_id": "" } ``` ### `message` — a device's enriched state (broadcast to all the user's devices) ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "message", "device_id": "", "device_name": "Rocksky CLI", "data": { "type": "status", "status": 2 } } ``` This is the enriched, broadcast form of a player state push — controllers render it; a pure player can ignore it (including the echo of its own pushes). ### `primary_changed` ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "primary_changed", "device_id": "" } ``` The primary device changed (via `set_primary`, or auto-adopt). Controllers should converge their "active device" on it. ### `command` — a relayed control command (delivered to player devices) ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "command", "action": "seek", "args": { "position": 42000 } } ``` Player devices execute these (see **Commands**). *** ## Commands (what a player device must handle) | `action` | `args` | Meaning | | - | - | - | | `play` | — | Resume | | `pause` | — | Pause | | `next` | — | Next track | | `previous` | — | Previous track | | `seek` | `{ "position": }` | Seek to position | | `queue_jump` | `{ "index": }` | Jump to queue index | | `queue_remove` | `{ "index": }` | Remove queue item | | `queue_move` | `{ "from": , "to": }` | Move queue item `from` so it ends up at index `to` (arrayMove semantics) | | `enqueue` | `{ "tracks": [descriptor…], "mode": "now"\|"next"\|"last", "shuffle"?: bool, "startIndex"?: }` | Play / play-next / append tracks (an album or a single track) | | `shuffle` | `{ "enabled": bool }` | Turn queue shuffle on/off | | `repeat` | `{ "mode": "off"\|"all"\|"one" }` | Set queue repeat mode | | `volume` | `{ "volume": 0.0–1.0 }` | Set output volume | | `audio_settings` | a partial settings document — see **Audio settings** | Apply DSP settings | An `enqueue` **descriptor** is a track the controller resolved for you: ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "trackId": "abc", "uploadId": "", "title": "…", "artist": "…", "album": "…", "album_artist": "…", "album_art": "https://…", "duration": 214000, "song_uri": "at://…", "album_uri": "at://…" } ``` Stream it via `uploadId` (Rocksky uploads) or `trackId` (Navidrome/Subsonic id), whichever is present. After executing any command, push fresh `track` / `status` / `queue` state so all clients update promptly. ### `audio_settings` — DSP One command carries the whole DSP surface as a **partial document**: every section, and every field inside it, is optional. ```json theme={"theme":{"light":"github-light","dark":"synthwave-84"}} { "type": "command", "action": "audio_settings", "args": { "equalizer": { "enabled": true, "precut": -60, "bands": [{ "frequency": 32, "gain": 30, "q": 7 }] }, "tone": { "bass": 0, "treble": 0, "bassCutoff": 200, "trebleCutoff": 3500, "balance": 0, "channels": "stereo", "stereoWidth": 100 }, "crossfade": { "mode": "off", "fadeInDelay": 0, "fadeInDuration": 0, "fadeOutDelay": 0, "fadeOutDuration": 0, "fadeOutMixMode": "crossfade" }, "replayGain": { "mode": "off", "preamp": 0, "preventClipping": true }, "crossfeed": { "mode": "off", "directGain": -15, "crossGain": -60, "highFrequencyGain": -30, "cutoff": 700 }, "compressor": { "threshold": 0, "makeup": 0, "ratio": 4, "knee": 1, "attack": 5, "release": 500 }, "surround": { "delay": 0, "balance": 0, "fx1": 0, "fx2": 0 }, "pbe": { "strength": 0, "precut": 0 } } } ``` **A player applies the sections its engine implements and ignores the rest.** It must not error on a section it doesn't know — that is what lets a newer controller talk to an older player, and a settings UI send one document to every device without asking what each supports. An absent section means "leave alone", so a controller changing only the EQ sends only `equalizer`. Enumerated values: `channels` is `stereo` | `mono` | `custom` | `monoLeft` | `monoRight` | `karaoke` | `swap`; `crossfade.mode` is `off` | `enabled` | `shuffle` | `albumChange` | `trackChange` | `auto`; `fadeOutMixMode` is `crossfade` | `mix`; `replayGain.mode` is `off` | `track` | `album` | `trackIfShuffling`; `crossfeed.mode` is `off` | `meier` | `custom`. Treat an unknown value as the `off`/default member rather than rejecting the document. #### `crossfade.mode: "auto"` — Auto DJ `auto` asks the player to derive each transition from the audio itself rather than from fixed times: analyse the outgoing and incoming tracks, and place the fade so it ends where the music ends instead of running through the silence after it. `fadeOutDuration` (or `fadeInDuration`) carries the desired music-over-music overlap in ms; the delay fields are ignored, since the player computes them per transition. This is deliberately a *mode* and not a new action: a player that has never heard of Auto DJ reads an unknown enum value, falls back to `off` per the rule above, and keeps playing. `playerd` implements it; other players may not. Units are the same as the `app.rocksky.rockbox.audio.settings` record, so a settings UI can put its saved document straight on the wire: | field | unit | | - | - | | EQ `gain`, `precut` | tenths of a dB (`precut` ≤ 0) | | EQ `q` | Q × 10 | | EQ `frequency` | Hz | | `bass`, `treble` | whole dB | | `bassCutoff`, `trebleCutoff` | Hz | | crossfade fade times | milliseconds | | `balance`, `stereoWidth` | percent | | ReplayGain `preamp` | tenths of a dB | | crossfeed gains | tenths of a dB | | `cutoff` | Hz | | compressor `attack`, `release` | milliseconds | | surround `delay` | milliseconds | EQ `bands` is positional — index 0 is the lowest band. Band centre frequencies are the fixed rockbox band table keyed by index, so a player should trust the index over a `frequency` that may have been persisted from an older table. *** ## Implementation notes After a disconnect, reconnect with backoff, register again, and replace your device list with the new snapshot. Send the raw text `ping` every ten seconds and handle `pong` before attempting to parse a frame as JSON. Clear your heartbeat timer when the connection closes. For players, publish fresh state after commands and periodically while playing. Ignore commands and audio-setting sections your engine does not support. Only advertise optional controls that work in your player. For controllers, start from `devices` and update your view with `message`, `device_unregistered`, and `primary_changed`. A `device_registered` notification alone does not establish that the new connection is a player. Wait for track state. Always use an explicit `target` when you intend to control one device: omitting it broadcasts to all of your devices. Queue indexes and `startIndex` are zero-based. An enqueue descriptor needs a resolvable `uploadId` or Navidrome/Subsonic `trackId`; a title or a catalog URI alone is not an audio source. Fetch the stream through the appropriate upload or library API. Commands are relayed to players; use their subsequent state updates to reflect what actually happened in your UI. ## Use the SDK The [Rocksky SDKs](/sdks/overview) provide `RemotePlayer` and `RemoteController` wrappers. Use them when you do not need to implement the wire protocol yourself. The Rust SDK's remote support uses the `remote-player` feature. See the [TypeScript SDK](/sdks/typescript) or the [remote service source](https://tangled.org/rocksky.app/rocksky/tree/main/remote-ws) for reference implementations. The official headless player is [playerd](https://tangled.org/rocksky.app/rocksky/tree/main/playerd). # Quick start Source: https://docs.rocksky.app/quickstart Get up and running with Rocksky in under 5 minutes. Rocksky is a decentralized Last.fm alternative. It lets you automatically track your music listening ("scrobble") and publish it to your Bluesky / AT Protocol identity. Sign in with Bluesky and start scrobbling. ## Option 1: Use the hosted version No server required — sign in and start scrobbling. Go to [rocksky.app](https://rocksky.app) and click **Sign in with Bluesky**. Log in with your Bluesky account (or create one). Pick one or more sources below. | Source | How to connect | Difficulty | | - | - | - | | **Spotify** | Connect from Settings | Easy | | **Jellyfin** | [Add Rocksky as a scrobbler](/integrations/jellyfin) | Easy | | **Navidrome** | [Configure Navidrome](/integrations/navidrome) | Easy | | **Android** | [Native Android scrobbling](/integrations/android) or [Pano Scrobbler](/integrations/pano-scrobbler) | Easy | | **Browser** | Install the WebScrobbler extension | Easy | | **Kodi** | [Install the Rocksky add-on](/integrations/kodi) | Medium | | **Other players** | Any Last.fm or ListenBrainz-compatible scrobbler | Easy | Your plays appear on your profile and in the **Stories** feed within seconds. ## Option 2: Self-host Rocksky For full control and privacy. **Prerequisites** * Docker + Docker Compose * Node.js or Bun (for development) ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} git clone https://tangled.org/@rocksky.app/rocksky cd rocksky # follow the self-hosting guide in the repo README ``` A one-command setup is on the roadmap. In the meantime, the [source repo](https://tangled.org/@rocksky.app/rocksky) is the canonical starting point. ## What next? Repoint any Last.fm-compatible scrobbler at Rocksky. `rocksky` is a CLI for scrobbling, stats, and managing API keys. Plug the MCP server into Claude Desktop. SDKs for TypeScript, Python, Rust, Go, Ruby, Kotlin, Elixir, Erlang, Clojure, and Gleam. # Clojure Source: https://docs.rocksky.app/sdks/clojure Clojure SDK for Rocksky — native core over the JVM Panama FFM API. `app.rocksky/sdk` binds the shared Rocksky Rust core via the JVM **Panama FFM** API (`rocksky.core`, JDK 22+): AppView reads, AT Protocol PDS writes, and the identity hashes — the same engine behind every Rocksky SDK. ## Install deps.edn: ```clojure theme={"theme":{"light":"github-light","dark":"synthwave-84"}} app.rocksky/sdk {:mvn/version "0.6.0-SNAPSHOT"} ``` The jar is native-free; the library is fetched from the GitHub release on first use. Run with `--enable-native-access=ALL-UNNAMED` (the `:native` alias adds it). ## Quickstart ```clojure theme={"theme":{"light":"github-light","dark":"synthwave-84"}} (require '[rocksky.core :as core]) ;; Reads — unauthenticated. An optional trailing base overrides the AppView URL. (core/global-stats) (doseq [t (core/top-tracks 10 0)] (println (get t "artist") "—" (get t "title"))) ;; Writes — log in with an app password. (def agent (core/login "session.json" "alice.bsky.social" "app-password")) (core/scrobble agent {"title" "Chaser" "artist" "Calibro 35" "album" "Jazzploitation" "albumArtist" "Calibro 35" "durationMs" 182320}) (core/agent-close agent) ``` ## API Reads/writes return plain maps; write verbs throw `ex-info` on failure. **Reads — `rocksky.core`**: named reads `(profile actor)`, `(scrobbles actor limit)`, `(top-tracks limit offset)`, `(global-stats)` — each accepts a trailing `base`. **Universal escape hatch**: `(query nsid params)` reaches the whole `app.rocksky.*` read catalog and returns parsed data — e.g. `"app.rocksky.album.getAlbums"`, `"app.rocksky.album.getAlbumTracks"`, `"app.rocksky.graph.getFollows"`, `"app.rocksky.actor.getActorLovedSongs"`, `"app.rocksky.stats.getStats"`, `"app.rocksky.charts.getScrobblesChart"`. `(query nsid params base token)` sends `token` as `Authorization: Bearer` for auth-gated queries. **Typed date-window charts**: `(top-tracks-interval limit offset interval)` and `(top-artists-interval limit offset interval)` — `interval` is `:all` or `[:days n]` / `[:weeks n]` / `[:months n]` / `[:years n]` / `[:range start end]`, e.g. `(top-tracks-interval 5 0 [:days 7])`. **Match**: `(match-song title artist)` resolves a bare title + artist into full canonical metadata. **Writes — `rocksky.core`**: `(login ... :dedup-path "./dedup")`, then `(scrobble agent track)` (full metadata) or `(scrobble-match agent params)` — a map with camelCase keys, required `:title`/`:artist`, optional `:album`, `:mbId`, `:isrc` (match anchors) and `:timestamp` (scrobbled-at Unix seconds) — match-then-write, `(like agent uri cid)`, `(follow agent did)`, `(shout ...)`, `(refresh-session agent)`, `(agent-close agent)`. With `:dedup-path` set, `(sync-repo agent)` (repo backfill) and `(hydrate-from-jetstream agent)` (live stream) run deduped against the on-disk store. **Identity hashes**: `(song-hash title artist album)`. # Elixir Source: https://docs.rocksky.app/sdks/elixir Elixir SDK for Rocksky — over the shared Rustler NIF. `rocksky_ex` wraps the shared Rocksky Rust core through a Rustler **NIF**: AppView reads, AT Protocol PDS writes, and the identity hashes — the same engine behind every Rocksky SDK. The same NIF powers the [Erlang](/sdks/erlang) and [Gleam](/sdks/gleam) SDKs. ## Install ```elixir theme={"theme":{"light":"github-light","dark":"synthwave-84"}} def deps do [{:rocksky_ex, "~> 0.6"}] end ``` `rocksky_ex` 0.6.0 pulls in `rocksky_erl` 0.3.0, whose loader fetches the native library from the GitHub release on first use. ## Quickstart ```elixir theme={"theme":{"light":"github-light","dark":"synthwave-84"}} # Reads — unauthenticated. The last arg overrides https://api.rocksky.app. {:ok, stats} = Rocksky.global_stats() IO.puts(stats["scrobbles"]) {:ok, top} = Rocksky.top_tracks(10, 0) for t <- top, do: IO.puts("#{t["artist"]} — #{t["title"]}") # Writes — log in with an app password. agent = Rocksky.login("session.json", "alice.bsky.social", "app-password") {:ok, out} = Rocksky.scrobble(agent, %{ "title" => "Chaser", "artist" => "Calibro 35", "album" => "Jazzploitation", "albumArtist" => "Calibro 35", "durationMs" => 182_320 }) IO.puts(out["scrobbleUri"]) ``` Using Erlang directly? The same NIF ships as `rocksky_erl` with a friendly `rocksky` module — see the [Erlang SDK](/sdks/erlang) page. ## API Reads/writes return `{:ok, value}` | `{:error, message}` with binary-keyed maps. **Reads — `Rocksky`**: named reads `profile`, `scrobbles`, `top_tracks`, `global_stats` (each takes a trailing `base`). The universal `get(nsid, params \\ %{}, base \\ "", token \\ "")` escape hatch reaches the *whole* `app.rocksky.*` read catalog by NSID (e.g. `Rocksky.get("app.rocksky.album.getAlbums", %{"limit" => 20})`, `"app.rocksky.album.getAlbumTracks"`, `"app.rocksky.graph.getFollows"`, `"app.rocksky.stats.getStats"`); pass a bearer `token` for auth-gated queries. Typed date-window charts: `top_tracks_interval(5, 0, {:days, 7})` / `top_artists_interval(5, 0, :all)` where the interval is `:all` | `{:days, n}` | `{:weeks, n}` | `{:months, n}` | `{:years, n}` | `{:range, start, end}`. `match_song(title, artist)` resolves a bare title + artist into full canonical metadata. **Writes — `Rocksky`**: `login(session, id, pw, appview \\ "", dedup_path \\ "")`, then `scrobble` (full metadata) or `scrobble_match(agent, input)` — `input` is a map with camelCase string keys, required `"title"`/`"artist"`, optional `"album"`, `"mbId"`, `"isrc"` (match anchors) and `"timestamp"` (scrobbled-at Unix seconds), e.g. `Rocksky.scrobble_match(agent, %{"title" => "Chaser", "artist" => "Calibro 35"})` — then `like`, `follow`, `shout`, `refresh_session`. Pass a `dedup_path` at login to enable dedup + realtime, then `sync_repo(agent)` / `hydrate_from_jetstream(agent)`. **Identity hashes**: `Rocksky.song_hash(title, artist, album)`. # Erlang Source: https://docs.rocksky.app/sdks/erlang Erlang SDK for Rocksky — over the shared Rustler NIF. `rocksky_erl` wraps the shared Rocksky Rust core through a Rustler **NIF**: AppView reads, AT Protocol PDS writes, and the identity hashes — the same engine behind every Rocksky SDK. The same NIF powers the [Elixir](/sdks/elixir) and [Gleam](/sdks/gleam) SDKs. The OTP application is `rocksky_erl`; the modules are `rocksky` (the friendly API) and `rocksky_nif` (the raw NIF). Its loader fetches the native library from the GitHub release on first use. ## Install ```erlang theme={"theme":{"light":"github-light","dark":"synthwave-84"}} %% rebar.config {deps, [{rocksky_erl, "0.3.0"}]}. ``` ## Quickstart ```erlang theme={"theme":{"light":"github-light","dark":"synthwave-84"}} %% Reads — unauthenticated. A trailing Base overrides https://api.rocksky.app. {ok, Stats} = rocksky:global_stats(), io:format("~p scrobbles~n", [maps:get(<<"scrobbles">>, Stats)]), %% Universal escape hatch — reaches the whole app.rocksky.* read catalog: {ok, Albums} = rocksky:get(<<"app.rocksky.album.getAlbums">>, #{<<"limit">> => 20}), {ok, Top} = rocksky:top_tracks_interval(5, 0, {days, 7}), {ok, Song} = rocksky:match_song(<<"Chaser">>, <<"Calibro 35">>), %% Writes — log in with an app password. Agent = rocksky:agent_login(<<"session.json">>, <<"alice.bsky.social">>, <<"app-pw">>), {ok, Out} = rocksky:agent_scrobble_match(Agent, #{<<"title">> => <<"Chaser">>, <<"artist">> => <<"Calibro 35">>}). ``` Reads/writes return `{ok, Value}` | `{error, Message}` with binary-keyed maps. ## API ### Reads Named reads: `profile`, `scrobbles`, `top_tracks`, `global_stats` (each takes a trailing `Base`). **Universal `get`** — the escape hatch reaches the *whole* `app.rocksky.*` read catalog by NSID: `rocksky:get(Nsid, Params)`, `rocksky:get(Nsid, Params, Base)`, and `rocksky:get(Nsid, Params, Base, Token)` (bearer token for auth-gated queries), each → `{ok, Data}`. ```erlang theme={"theme":{"light":"github-light","dark":"synthwave-84"}} {ok, Albums} = rocksky:get(<<"app.rocksky.album.getAlbums">>, #{<<"limit">> => 20}), {ok, Tracks} = rocksky:get(<<"app.rocksky.album.getAlbumTracks">>, #{<<"uri">> => Uri}), {ok, Follows} = rocksky:get(<<"app.rocksky.graph.getFollows">>, #{<<"actor">> => Actor}), {ok, S} = rocksky:get(<<"app.rocksky.stats.getStats">>, #{}). ``` **Typed date-window charts** — `rocksky:top_tracks_interval(5, 0, {days, 7})` and `rocksky:top_artists_interval(5, 0, all)`; the interval is `all` | `{days, N}` | `{weeks, N}` | `{months, N}` | `{years, N}` | `{range, Start, End}`. Plain `top_tracks` / `top_artists` are all-time shorthands. **Match** — `rocksky:match_song(Title, Artist)` resolves a bare title + artist into full canonical metadata (album, artwork, duration, MBID, ISRC, links). ### Writes `rocksky:agent_login(Session, Id, Pw)` (also `/5` with `AppView`, `DedupPath`), then `agent_scrobble` (full metadata), `agent_like`, `agent_follow`, `agent_shout`, `agent_refresh_session`. **Match-then-scrobble** — `rocksky:agent_scrobble_match(Agent, Input)` where `Input` is a map with camelCase binary keys: required `<<"title">>`/`<<"artist">>`, optional `<<"album">>`, `<<"mbId">>`, `<<"isrc">>` (match anchors) and `<<"timestamp">>` (scrobbled-at Unix seconds). Resolves canonical metadata and scrobbles in one call. (A flat `/7` form — `agent_scrobble_match(Agent, Title, Artist, Album, MbId, Isrc, Timestamp)`, empty strings / `0` omitted — backs the Gleam SDK.) **Dedup + realtime** — pass a `DedupPath` to `agent_login/5` to enable the local dedup store, then keep it warm with `rocksky:agent_sync_repo(Agent)` and `rocksky:agent_hydrate_from_jetstream(Agent)`. ### Identity hashes `rocksky:song_hash(Title, Artist, Album)` / `album_hash` / `artist_hash` — lowercase-hex SHA-256, byte-for-byte identical across every Rocksky SDK and the server. # Gleam Source: https://docs.rocksky.app/sdks/gleam Gleam SDK for Rocksky — over the shared Rustler NIF. `rocksky` exposes the shared Rocksky Rust core via typed externals over the `rocksky_erl` Rustler NIF (`rocksky/client` module): AppView reads, AT Protocol PDS writes, and the identity hashes. Targets Erlang. ## Install ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} gleam add rocksky # rocksky = ">= 1.6.0 and < 2.0.0" ``` `rocksky` 1.6.0 depends on `rocksky_erl` 0.3.0, whose loader fetches the native library from the GitHub release on first use. ## Quickstart ```gleam theme={"theme":{"light":"github-light","dark":"synthwave-84"}} import rocksky/client pub fn main() { // Reads — use the default AppView (https://api.rocksky.app). // Envelope calls return Dynamic ({ok, value} | {error, message}). echo client.global_stats() echo client.top_tracks(10, 0) // Writes — log in with an app password. let agent = client.login("session.json", "alice.bsky.social", "app-password") echo client.follow(agent, "did:plc:rlwgbwqdknilpxxep5gvzc3y") } ``` ## API **Reads**: named reads `profile(actor)`, `scrobbles(actor, limit, offset)`, `top_tracks(limit, offset)`, `global_stats()` — each returns `Dynamic`. Use the `*_at` variants (e.g. `global_stats_at(endpoint)`) to target a custom AppView. The universal `get(nsid, params_json)` escape hatch reaches the *whole* `app.rocksky.*` read catalog by NSID (e.g. `client.get("app.rocksky.album.getAlbums", "{\"limit\":20}")`, `"app.rocksky.album.getAlbumTracks"`, `"app.rocksky.graph.getFollows"`, `"app.rocksky.stats.getStats"`); `get_authed(nsid, params_json, token)` sends a bearer token for auth-gated queries and `get_at(nsid, params_json, endpoint)` targets a custom AppView. Typed date-window charts: `top_tracks_interval(5, 0, client.LastDays(7))` / `top_artists_interval` where `Interval` is `AllTime | LastDays(Int) | LastWeeks(Int) | LastMonths(Int) | LastYears(Int) | Range(String, String)`. `match_song(title, artist)` resolves a bare title + artist into full canonical metadata. **Writes**: `login(session_path, identifier, password)`, then `scrobble` (full metadata) or `scrobble_match(agent, ScrobbleMatch(title, artist, album, mb_id, isrc, timestamp))` (match-then-write) — `title`/`artist` are `String`, the rest `Option` (`album` override, `mb_id`/`isrc` match anchors, `timestamp` scrobbled-at Unix seconds), e.g. `scrobble_match(agent, ScrobbleMatch("Chaser", "Calibro 35", None, None, None, None))` — `like`, `follow`, `shout`, `refresh_session`. With a dedup path set, `sync_repo(agent)` / `hydrate_from_jetstream(agent)` keep the dedup + realtime store warm. **Identity hashes**: `song_hash(title, artist, album)`, `artist_hash(album_artist)`. # Go Source: https://docs.rocksky.app/sdks/go Go SDK for Rocksky — built on bluesky-social/indigo. The Go SDK is built on [indigo](https://github.com/bluesky-social/indigo): `Client` does unauthenticated AppView reads, and `Agent` logs in with an app password and writes `app.rocksky.*` records to the user's PDS. It also ships a local dedup index and Jetstream real-time sync. ## Install ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} go get github.com/tsirysndr/rocksky/sdk/go ``` ## Quickstart ```go theme={"theme":{"light":"github-light","dark":"synthwave-84"}} import ( "context" "github.com/tsirysndr/rocksky/sdk/go/rocksky" "github.com/tsirysndr/rocksky/sdk/go/rocksky/gen" ) ctx := context.Background() // Reads — unauthenticated. NewClient("") uses https://api.rocksky.app. c := rocksky.NewClient("") stats, _ := c.GlobalStats(ctx) top, _ := c.TopTracks(ctx, 10, 0) month, _ := c.TopTracksInterval(ctx, rocksky.LastDays(30), 50, 0) // Writes — log in with an app password (resolves the PDS automatically). agent, _ := rocksky.Login(ctx, "alice.bsky.social", "app-password") uri, _ := agent.Scrobble(ctx, gen.ScrobbleRecord{ Title: "Chaser", Artist: "Calibro 35", Album: "Jazzploitation", AlbumArtist: "Calibro 35", Duration: 182320, }) ``` ## API **Reads — `Client`**: the full `app.rocksky.*` read surface. Basics: `Profile`, `Scrobbles`, `Songs`, `Albums`, `Artists`, `TopTracks`, `TopArtists`, `Search`, `GlobalStats`. Catalog & relations: `CatalogAlbums`, `CatalogArtists`, `CatalogSongs`, `AlbumTracks`, `ArtistAlbums`, `ArtistTracks`, `LovedSongs`, `ScrobbleFeed`, `Scrobble` (single by uri), `Follows`, `Followers`, `KnownFollowers`, plus raw `json.RawMessage` detail methods (`Album`, `Artist`, `Song`, `Playlists`, `Playlist`, `Stats`, `Wrapped`, `ScrobblesChart`, `Recommendations`, `Neighbours`, `Shouts`, and more). `Get(ctx, nsid, params)` calls any read query by nsid and returns raw `json.RawMessage` — every named method is sugar over it. `MatchSong(ctx, title, artist, mbID, isrc)` resolves a bare title + artist into full canonical metadata. Attach a bearer token for auth-gated queries with `NewClient("").WithToken(token)`. **Date-window charts**: `TopTracksInterval` / `TopArtistsInterval` take a typed `DateInterval`, built with `rocksky.AllTime()`, `rocksky.LastDays(n)`, `LastWeeks`, `LastMonths`, `LastYears`, or `rocksky.Range(start, end)`; plain `TopTracks` / `TopArtists` remain all-time shorthands. **Writes — `Agent`**: `Scrobble` (fan-out from full metadata), `ScrobbleMatch(ctx, appview, ScrobbleMatchInput{Title, Artist})` (resolves metadata via `MatchSong`, then the same fan-out; Title/Artist required, Album/MbID/ISRC/Timestamp optional pointers, `appview` "" = default), `CreateSong` / `CreateAlbum` / `CreateArtist`, `Like`, `Follow`, `Shout` / `ReplyShout`, `SetNowPlaying` / `ClearNowPlaying`, `Delete`, `RefreshSession`. Records are the generated `gen.*Record` types. **Identity hashes**: `SongHash`, `AlbumHash`, `ArtistHash`. ## Duplicate prevention & real-time sync An optional local index (embedded bbolt KV — no cgo/RocksDB) prevents duplicate writes and stays live off the firehose: ```go theme={"theme":{"light":"github-light","dark":"synthwave-84"}} idx, _ := rocksky.OpenIndex("dedup.db") defer idx.Close() agent.UseIndex(idx) agent.SyncRepo(ctx) // backfill from the repo CAR go agent.HydrateFromJetstream(ctx) // keep it live from Jetstream (all 4 servers) ``` # Kotlin Source: https://docs.rocksky.app/sdks/kotlin Kotlin SDK for Rocksky — native core via UniFFI (JNA). `app.rocksky:rocksky-kotlin` binds the shared Rocksky Rust core via UniFFI (JNA-loaded), package `app.rocksky`: AppView reads, AT Protocol PDS writes, a local dedup index, and the identity hashes — the same engine behind every Rocksky SDK. ## Install ```kotlin theme={"theme":{"light":"github-light","dark":"synthwave-84"}} dependencies { implementation("app.rocksky:rocksky-kotlin:0.7.0") } ``` The published jar bundles the native library for each platform. ## Quickstart ```kotlin theme={"theme":{"light":"github-light","dark":"synthwave-84"}} import app.rocksky.* // Reads — unauthenticated. AppView() uses https://api.rocksky.app. val av = AppView() println(av.globalStats().scrobbles) av.topTracks(10u, 0u).forEach { println("${it.artist} — ${it.title}") } // Writes — log in with an app password. val agent = login("session.json", "alice.bsky.social", "app-password") val out = agent.scrobble(ScrobbleInput( title = "Chaser", artist = "Calibro 35", album = "Jazzploitation", albumArtist = "Calibro 35", durationMs = 182320, )) println(out.scrobbleUri) ``` ## API **Reads — `AppView(base: String? = null, token: String? = null)`** (pass `token` to send `Authorization: Bearer` on auth-gated queries; counts are `UInt`). Typed views: `profile`, `scrobbles`, `songs`, `albums`, `artists`, `lovedSongs`, `catalogAlbums` / `catalogArtists` / `catalogSongs`, `albumTracks`, `artistAlbums` / `artistTracks`, `scrobbleFeed`, `scrobble` (single), `follows` / `followers` / `knownFollowers`, `topTracks`, `topArtists`, `globalStats`. Date-window charts `topTracksInterval(limit, offset, interval)` and `topArtistsInterval(...)` take a `DateInterval` (`AllTime`, `LastDays(7u)`, `LastWeeks`, `LastMonths`, `LastYears`, `Range(start, end)`). `matchSong(title, artist, mbId, isrc)` resolves a bare title+artist to canonical metadata. A raw-JSON long tail (`album`, `artist`, `song`, `playlists`, `playlist`, `stats`, `wrapped`, `scrobblesChart`, `recommendations`, `neighbours`, shouts, …) returns JSON strings, and `av.get(nsid, mapOf(...))` calls **any** read query by NSID. **Writes — `Agent`**: `login(...)` (top-level, `appview`/`dedupPath` optional), then `scrobble` (full metadata) or `scrobbleMatch(ScrobbleMatchInput(title, artist, album, mbId, isrc, timestamp))` (resolve via `matchSong`, then fan out — `title`/`artist` required, `album`/`mbId`/`isrc` are `String?` and `timestamp` is `Long?`, all default null; `ScrobbleMatchInput` is an `app.rocksky` typealias), `createSong` / `createAlbum` / `createArtist`, `like` / `unlike`, `follow` / `unfollow`, `shout` / `replyShout`, `setNowPlaying` / `clearNowPlaying`, `syncRepo` (dedup backfill, returns per-collection counts as JSON), `hydrateFromJetstream` (live dedup off the firehose). Write verbs throw `RockskyException`. **Identity hashes**: `songHash`, `albumHash`, `artistHash`. # SDKs Source: https://docs.rocksky.app/sdks/overview Official Rocksky SDKs — native AT Protocol clients across ten languages. The Rocksky SDKs are **native AT Protocol clients**: they read from the public AppView and write `app.rocksky.*` records straight to the user's PDS (scrobbles, likes, follows, shouts, now-playing). They are not thin HTTP wrappers. Two implementations share one behaviour: * **Shared Rust core** — Python, Ruby, Kotlin, Clojure, and the BEAM trio (Erlang/Elixir/Gleam) are thin bindings over the same Rust engine (`rocksky-sdk`), so auth, record writing, dedup, and the identity hashes are identical everywhere. * **Native ecosystem** — Go is built on [indigo](https://github.com/bluesky-social/indigo), TypeScript on [atcute](https://github.com/mary-ext/atcute), and Rust is the `rocksky-sdk` crate itself (on [jacquard](https://crates.io/crates/jacquard)). `@rocksky/sdk` — built on atcute `rocksky` — native core bindings `rocksky-sdk` crate — jacquard `sdk/go/rocksky` — built on indigo `rocksky` gem — native core (fiddle) `app.rocksky:rocksky-kotlin` — UniFFI `rocksky_ex` — over the `rocksky_erl` NIF `rocksky_erl` — Rustler NIF `app.rocksky/sdk` — Panama FFM `rocksky` — over the `rocksky_erl` NIF ## Common surface Every SDK exposes the same three things: * **Reads** — a client over the public AppView (`https://api.rocksky.app`, overridable) covering the full `app.rocksky.*` read catalog: `globalStats`, `topTracks`, `topArtists`, `profile`, `scrobbles`, `songs`, `albums`, `artists`, `search`, catalog/loved/follow queries, plus a universal `get(nsid, params)` escape hatch that calls any read query by nsid. Charts take a typed `DateInterval` (all-time, last N days/weeks/months/years, or a custom range), and `matchSong` resolves a bare title + artist into full canonical metadata. Each read client also accepts an optional **bearer access token** for auth-gated queries. * **Writes** — an **Agent** that logs in with an **app password**, resolves the account's PDS, and writes records: `scrobble`, `scrobble_match` (match-then-write from a title/artist input object, with optional album override, `mbId`/`isrc` match anchors, and a scrobbled-at timestamp), `createSong` / `createAlbum` / `createArtist`, `like`, `follow`, `shout`, now-playing. * **Identity hashes** — `songHash` / `albumHash` / `artistHash` (lowercase-hex SHA-256), byte-for-byte identical across every SDK and the server. ## Duplicate prevention & real-time sync The Rust, Go, and TypeScript SDKs (and the native-core bindings) ship an optional **local dedup index** keyed by the identity hashes: `syncRepo()` backfills it from the repo CAR (`com.atproto.sync.getRepo`), and `hydrateFromJetstream()` keeps it live off the Bluesky Jetstream firehose. With an index attached, write verbs skip records that already exist and never duplicate a same-second scrobble. ## Choosing an SDK | You're writing… | Use | | - | - | | A web app, Cloudflare Worker, or Node/Bun service | [TypeScript](/sdks/typescript) | | A backend job, notebook, or data pipeline | [Python](/sdks/python) | | A performance-critical service or CLI | [Rust](/sdks/rust) or [Go](/sdks/go) | | A JVM app | [Kotlin](/sdks/kotlin) or [Clojure](/sdks/clojure) | | A BEAM app | [Elixir](/sdks/elixir) or [Gleam](/sdks/gleam) | | A Ruby app or script | [Ruby](/sdks/ruby) | # Python Source: https://docs.rocksky.app/sdks/python Python SDK for Rocksky — native bindings to the shared Rust core. `rocksky` is native bindings to the shared Rocksky Rust core (via UniFFI): AppView reads, AT Protocol PDS writes, a local dedup index, and the identity hashes — the same engine behind every Rocksky SDK. ## Install ```bash uv theme={"theme":{"light":"github-light","dark":"synthwave-84"}} uv add rocksky==0.6.0 ``` ```bash pip theme={"theme":{"light":"github-light","dark":"synthwave-84"}} pip install rocksky==0.6.0 ``` The wheel is pure-Python; the native library is fetched from the GitHub release on first import and cached. ## Quickstart ```python theme={"theme":{"light":"github-light","dark":"synthwave-84"}} from rocksky import AppView, Agent, ScrobbleInput, song_hash # Reads — unauthenticated. AppView() uses https://api.rocksky.app. av = AppView() print(av.global_stats().scrobbles) for t in av.top_tracks(10, 0): print(t.artist, "—", t.title) # Writes — log in with an app password. agent = Agent.login_password("session.json", "alice.bsky.social", "app-password", None, None) out = agent.scrobble(ScrobbleInput( title="Chaser", artist="Calibro 35", album="Jazzploitation", album_artist="Calibro 35", duration_ms=182320, )) print(out.scrobble_uri) ``` ## API **Reads — `AppView(base=None, token=None)`** (pass `token` to send `Authorization: Bearer` on auth-gated queries). Typed views: `profile`, `scrobbles`, `songs`, `albums`, `artists`, `loved_songs`, `catalog_albums` / `catalog_artists` / `catalog_songs`, `album_tracks`, `artist_albums` / `artist_tracks`, `scrobble_feed`, `scrobble` (single), `follows` / `followers` / `known_followers`, `top_tracks`, `top_artists`, `global_stats`. Date-window charts `top_tracks_interval(limit, offset, interval)` and `top_artists_interval(...)` take a `DateInterval` (`ALL_TIME`, `LAST_DAYS(days=7)`, `LAST_WEEKS`, `LAST_MONTHS`, `LAST_YEARS`, `RANGE(start=..., end=...)`). `match_song(title, artist, mb_id, isrc)` resolves a bare title+artist to canonical metadata. A raw-JSON long tail (`album`, `artist`, `song`, `playlists`, `playlist`, `stats`, `wrapped`, `scrobbles_chart`, `recommendations`, `neighbours`, shouts, …) returns JSON strings, and `av.get(nsid, params)` (a `dict[str, str]`) calls **any** read query by NSID. **Writes — `Agent`**: `login_password(...)`, then `scrobble` (full metadata) or `scrobble_match(ScrobbleMatchInput(title, artist, album=None, mb_id=None, isrc=None, timestamp=None))` (resolve via `match_song`, then fan out — `title`/ `artist` required, `timestamp` is scrobbled-at Unix seconds; `ScrobbleMatchInput` imports from `rocksky`), `create_song` / `create_album` / `create_artist`, `like` / `unlike`, `follow` / `unfollow`, `shout` / `reply_shout`, `set_now_playing` / `clear_now_playing`, `sync_repo` (dedup backfill, returns per-collection counts as JSON), `hydrate_from_jetstream` (live dedup off the firehose). **Identity hashes**: `song_hash`, `album_hash`, `artist_hash`. ## Duplicate prevention Pass a `dedup_path` to `Agent.login_password` to enable the local index, then `agent.sync_repo()` to backfill it from the repo. With it, write verbs skip records that already exist. # Ruby Source: https://docs.rocksky.app/sdks/ruby Ruby SDK for Rocksky — native bindings to the shared Rust core. `rocksky` binds the shared Rocksky Rust core through Ruby's stdlib `fiddle` (no `ffi` gem): AppView reads, AT Protocol PDS writes, and the identity hashes — the same engine behind every Rocksky SDK. ## Install ```bash theme={"theme":{"light":"github-light","dark":"synthwave-84"}} gem install rocksky ``` Or in a Gemfile: `gem "rocksky", "~> 0.6"`. The gem is pure-Ruby; the native library is fetched from the GitHub release on first load and cached. ## Quickstart ```ruby theme={"theme":{"light":"github-light","dark":"synthwave-84"}} require "rocksky" # Reads — unauthenticated. base: overrides https://api.rocksky.app. stats = Rocksky.global_stats puts stats["scrobbles"] Rocksky.top_tracks(limit: 10).each { |t| puts "#{t["artist"]} — #{t["title"]}" } # Writes — log in with an app password. agent = Rocksky::Agent.login("session.json", "alice.bsky.social", "app-password") out = agent.scrobble( "title" => "Chaser", "artist" => "Calibro 35", "album" => "Jazzploitation", "albumArtist" => "Calibro 35", "durationMs" => 182_320 ) puts out["scrobbleUri"] agent.close ``` ## API Reads/writes return plain Hashes; write verbs raise `Rocksky::Error` on failure. Records are Hashes with camelCase keys. **Reads — `Rocksky`**: named reads `profile(actor, base:)`, `scrobbles(actor, limit:, offset:, base:)`, `top_tracks(limit:, offset:, base:)`, `global_stats(base:)`. **Universal escape hatch**: `Rocksky.get(nsid, params, base: nil, token: nil)` reaches the whole `app.rocksky.*` read catalog and returns a parsed Hash/Array — e.g. `"app.rocksky.album.getAlbums"`, `"app.rocksky.album.getAlbumTracks"`, `"app.rocksky.graph.getFollows"`, `"app.rocksky.actor.getActorLovedSongs"`, `"app.rocksky.stats.getStats"`, `"app.rocksky.charts.getScrobblesChart"`. Pass `token:` for an `Authorization: Bearer` header on auth-gated queries. **Typed date-window charts**: `top_tracks_interval(limit:, offset:, interval:)` and `top_artists_interval(...)` — `interval:` is `:all` or `[:days, n]` / `[:weeks, n]` / `[:months, n]` / `[:years, n]` / `[:range, start, end]`, e.g. `Rocksky.top_tracks_interval(limit: 5, interval: [:days, 7])`. **Match**: `Rocksky.match_song(title, artist, mb_id: nil, isrc: nil)` resolves a bare title + artist into full canonical metadata. **Writes — `Rocksky::Agent`**: `login(..., dedup_path:)`, then `scrobble` (full metadata) or `scrobble_match(params)` — a single Hash with camelCase string keys, required `"title"`/`"artist"`, optional `"album"`, `"mbId"`, `"isrc"`, `"timestamp"` (match-then-write), plus `like`, `follow`, `shout`, `refresh_session`, `close`. With `dedup_path:` set at login, `sync_repo` (repo backfill) and `hydrate_from_jetstream` (live stream) run deduped against the on-disk store. **Identity hashes**: `Rocksky.song_hash(title, artist, album)`. # Rust Source: https://docs.rocksky.app/sdks/rust Rust SDK for Rocksky — the rocksky-sdk crate, built on jacquard. `rocksky-sdk` is the Rust SDK and the shared engine behind every other Rocksky SDK. Built on [jacquard](https://crates.io/crates/jacquard), it mirrors Bluesky's `@atproto/api`: `RockskyAgent` wraps a session and exposes high-level write verbs; reads go through the unauthenticated `AppView`. It also ships an optional dedup index and Jetstream real-time sync. ## Install ```toml theme={"theme":{"light":"github-light","dark":"synthwave-84"}} [dependencies] rocksky-sdk = { version = "0.4", features = ["dedup", "jetstream"] } ``` The `dedup` and `jetstream` features are optional (they pull in RocksDB + the firehose client). ## Quickstart ```rust theme={"theme":{"light":"github-light","dark":"synthwave-84"}} use rocksky_sdk::{RockskyAgent, ScrobbleDraft}; let agent = RockskyAgent::builder() .session_store("~/.config/rocksky/session.json") .build()?; agent.login_password("alice.bsky.social", "app-password").await?; // Reads — via the bundled AppView client. let recent = agent.appview().scrobbles("alice.bsky.social", 25, 0).await?; // Writes — the scrobble fans out to artist/album/song then the scrobble. agent.scrobble(&ScrobbleDraft { title: "Chaser".into(), artist: "Calibro 35".into(), album: "Jazzploitation".into(), album_artist: "Calibro 35".into(), duration_ms: 182_320, ..Default::default() }).await?; ``` ## API **Reads — `AppView`**: the full `app.rocksky.*` read surface. Basics: `profile`, `scrobbles`, `songs`, `albums`, `artists`, `feed`, `search`, `top_artists`, `top_tracks`, `global_stats`. Catalog & relations: `catalog_albums`, `catalog_artists`, `catalog_songs`, `album_tracks`, `artist_albums`, `artist_tracks`, `loved_songs`, `scrobble_feed`, `scrobble` (single by uri), `follows`, `followers`, `known_followers`. Raw-JSON detail/long-tail methods: `album`, `artist`, `song`, `playlists`, `playlist`, `stats`, `wrapped`, `scrobbles_chart`, `recommendations`, `neighbours`, `shouts`, and more. `get(nsid, ¶ms)` is the universal escape hatch — calls any read query by nsid and returns raw `serde_json::Value`; every named method is sugar over it. `match_song(title, artist, mb_id, isrc)` resolves a bare title + artist into full canonical metadata. Attach a bearer token for auth-gated queries with `AppView::new(base).with_token(token)` (or `set_token`). **Date-window charts**: `top_tracks_interval` / `top_artists_interval` take a typed `DateInterval` — `AllTime`, `LastDays(n)`, `LastWeeks(n)`, `LastMonths(n)`, `LastYears(n)`, or `Range { start, end }`; `top_tracks` / `top_artists` remain all-time shorthands. ```rust theme={"theme":{"light":"github-light","dark":"synthwave-84"}} use rocksky_sdk::DateInterval; let month = av.top_tracks_interval(DateInterval::LastDays(30), 50, 0).await?; ``` **Writes — `RockskyAgent`**: `scrobble` (fan-out from full metadata), `scrobble_match(&ScrobbleMatch { .. })` (resolves metadata via `match_song`, then the same fan-out; title/artist required, album/mb\_id/isrc/timestamp optional), `create_song` / `create_album` / `create_artist`, `like` / `unlike`, `follow` / `unfollow`, `shout` / `reply_shout`, `set_now_playing` / `clear_now_playing`. App-password + loopback OAuth login. **Identity hashes**: `rocksky_sdk::dedup::{song_hash, album_hash, artist_hash}`. ## Duplicate prevention & real-time sync With the `dedup` feature, attach a RocksDB-backed index; with `jetstream`, keep it live off the firehose: ```rust theme={"theme":{"light":"github-light","dark":"synthwave-84"}} let agent = RockskyAgent::builder() .session_store("session.json") .dedup_store("dedup") // requires the `dedup` feature .build()?; agent.sync_repo().await?; // backfill from the repo CAR tokio::spawn(async move { agent.hydrate_from_jetstream().await }); ``` # TypeScript Source: https://docs.rocksky.app/sdks/typescript TypeScript SDK for Rocksky — built on atcute. `@rocksky/sdk` is built on [atcute](https://github.com/mary-ext/atcute): `RockskyClient` does unauthenticated AppView reads, and `Agent` logs in with an app password and writes `app.rocksky.*` records to the user's PDS. It also ships a local dedup index and Jetstream real-time sync. Version 0.4.0 is a **breaking** rewrite on atcute — it is a native AT Protocol client, not the old HTTP wrapper. See the package CHANGELOG. ## Install ```bash npm theme={"theme":{"light":"github-light","dark":"synthwave-84"}} npm install @rocksky/sdk ``` ```bash bun theme={"theme":{"light":"github-light","dark":"synthwave-84"}} bun add @rocksky/sdk ``` Requires Node ≥ 22 (global `WebSocket` / `fetch`) or Bun. ## Quickstart ```ts theme={"theme":{"light":"github-light","dark":"synthwave-84"}} import { RockskyClient, Agent } from "@rocksky/sdk"; // Reads — unauthenticated. new RockskyClient() uses https://api.rocksky.app. const rk = new RockskyClient(); const stats = await rk.globalStats(); const top = await rk.topTracks(10, 0); // Writes — log in with an app password (resolves the PDS automatically). const agent = await Agent.login("alice.bsky.social", "app-password"); const uri = await agent.scrobble({ title: "Chaser", artist: "Calibro 35", album: "Jazzploitation", albumArtist: "Calibro 35", duration: 182320, }); ``` ## API **Reads — `RockskyClient`**: the client now covers the whole `app.rocksky.*` read surface. Typed methods include `profile`, `scrobbles`, `songs`, `albums`, `artists`, `topTracks`, `topArtists`, `search`, `globalStats`, `lovedSongs`, `catalogAlbums`, `catalogArtists`, `catalogSongs`, `albumTracks`, `artistAlbums`, `artistTracks`, `scrobbleFeed`, `scrobble` (single by uri), `follows`, `followers`, `knownFollowers`. Raw (`unknown`-returning) detail / long-tail methods cover the rest: `album`, `artist`, `song`, `feed`, `playlists`, `playlist`, `stats`, `wrapped`, `scrobblesChart`, `recommendations`, `neighbours`, shouts, and more. Every named method is sugar over the universal escape hatch **`rk.get(nsid, params)`**, which calls ANY read query by nsid and returns `unknown`. **Typed date-window charts**: `topTracksInterval(limit, offset, interval)` and `topArtistsInterval(...)` take a `DateInterval` built with the `Interval` factories — `Interval.allTime()`, `Interval.lastDays(n)`, `Interval.lastWeeks(n)`, `Interval.lastMonths(n)`, `Interval.lastYears(n)`, `Interval.range(start, end)`. `topTracks` / `topArtists` remain all-time shorthands. ```ts theme={"theme":{"light":"github-light","dark":"synthwave-84"}} import { RockskyClient, Interval } from "@rocksky/sdk"; const rk = new RockskyClient(); const monthly = await rk.topTracksInterval(10, 0, Interval.lastMonths(1)); // Resolve a bare title + artist into full canonical metadata. const song = await rk.matchSong("Chaser", "Calibro 35"); ``` **`matchSong(title, artist, mbId?, isrc?)`**: resolves a bare title + artist into full canonical metadata (album, artwork, duration, MBID, ISRC, links). **Auth-gated reads**: pass an optional bearer access token — `new RockskyClient(appview, token)` — sent as `Authorization: Bearer `. **Writes — `Agent`**: two scrobble paths — `scrobble(rec)` writes full metadata you already have, and `scrobbleMatch(input, appview?)` takes a `ScrobbleMatchInput` object (`{ title, artist, album?, mbId?, isrc?, timestamp? }` — title/artist required; `album` overrides the resolved album, `mbId`/`isrc` are match anchors, `timestamp` is a scrobbled-at Unix-seconds time; the optional `appview` overrides the AppView used for matching) and resolves full metadata via `matchSong` first, then writes — e.g. `agent.scrobbleMatch({ title: "Chaser", artist: "Calibro 35" })`. Plus `createSong` / `createAlbum` / `createArtist`, `like`, `follow`, `shout` / `replyShout`, `setNowPlaying` / `clearNowPlaying`, `delete`. **Identity hashes**: `songHash`, `albumHash`, `artistHash`. ## Duplicate prevention & real-time sync An optional local index (embedded classic-level LevelDB) prevents duplicate writes and stays live off the firehose: ```ts theme={"theme":{"light":"github-light","dark":"synthwave-84"}} import { RockskyIndex } from "@rocksky/sdk/dedup"; const idx = new RockskyIndex("./dedup"); await idx.open(); agent.useIndex(idx); await agent.syncRepo(); // backfill from the repo CAR agent.hydrateFromJetstream(); // keep it live from Jetstream (all 4 servers) ```