Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Shell Scripting Examples

Bash Alias for Now Playing

alias now="spotiline status --json | jq -r '.track + \" - \" + .artist'"

Auto-tweet Now Playing

#!/bin/bash
TRACK=$(spotiline status --json | jq -r '.track')
ARTIST=$(spotiline status --json | jq -r '.artist')
twitter tweet "🎵 Now listening: $TRACK by $ARTIST"

Check if Daemon is Running

if spotiline status &>/dev/null; then
    echo "Daemon is running"
else
    spotiline daemon start
fi

Play Random Search Result

spotiline search "chill vibes" --json | jq -r '.[0].uri' | xargs spotiline queue
spotiline next

Loop Through Search Results

spotiline search "synthwave" --json | jq -r '.[] | .name + " by " + .artist'