Analytics and Hooks
Analytics are local. spotuify records playback/search/action events into SQLite, then derives useful listening facts from them.
Recent events
Section titled “Recent events”spotuify analytics events --limit 50spotuify analytics events --limit 50 --format jsonlTop listens
Section titled “Top listens”spotuify analytics top --kind tracks --since 30d --limit 25spotuify analytics top --kind artists --since all --format jsonHabits
Section titled “Habits”spotuify analytics habits --window week --format jsonRediscovery
Section titled “Rediscovery”spotuify analytics rediscovery --gap 90dWhat you get: tracks you listened to before and have not heard recently.
Rebuild derived facts
Section titled “Rebuild derived facts”spotuify analytics rebuildUse --since for a smaller rebuild:
spotuify analytics rebuild --since 2026-05-01T00:00:00ZShell hooks
Section titled “Shell hooks”Set a hook command in config:
spotuify config set player.event_hook "/Users/me/bin/spotuify-listen-hook"The hook can scrobble to ListenBrainz, post a now-playing notification, or feed your own logs. Keep it fast; hooks have timeouts so playback is not held hostage.
Export and import
Section titled “Export and import”spotuify analytics export --target listenbrainz --since 2026-01-01spotuify analytics import --target lastfm