Create a Spotify playlist from an artist's live setlist.
Spotify Setlist is a command-line tool that helps you create Spotify playlists based on live setlists from setlist.fm. The created playlist allow you to easily explore an artist's live repertoire, or relive the experience of a specific concert.
- Go 1.25.3+
- Spotify account
- Setlist.fm account
go install github.com/michaelheyman/spotify-setlist@latestThe binary will be installed to $GOPATH/bin/spotify-setlist (usually ~/go/bin/spotify-setlist).
Make sure $GOPATH/bin is in your $PATH:
export PATH=$PATH:$(go env GOPATH)/binThe CLI tool requires authorized access to both Spotify and setlist.fm APIs. Follow the steps below to obtain the necessary credentials and configure the application.
- Go to Spotify Developer Dashboard
- Log in with your Spotify account (create one if needed)
- Create a new application
- Copy your Client ID and Client Secret
- In your app settings, add
http://127.0.0.1:8080/callbackas a Redirect URI
Note: Spotify requires loopback redirect URIs to use an explicit IP address (
127.0.0.1) rather thanlocalhost. Apps created after April 9, 2025 enforce this — usinghttp://localhostwill result in a "redirect_uri: Insecure" error.
- Go to Setlist.fm
- Create an account or log in
- Visit Setlist.fm API
- Copy your API key
You will have to request an API rate limit upgrade to use the API key with this application, since the default rate limit is too low. You need the second rate tier, which allows for 16 request per second and max 50000 a day.
Create a .env file in your project directory or set the following environment variables:
export SPOTIFY_CLIENT_ID="your_spotify_client_id"
export SPOTIFY_CLIENT_SECRET="your_spotify_client_secret"
export SPOTIFY_REDIRECT_URI="http://127.0.0.1:8080/callback"
export SETLIST_FM_API_KEY="your_setlist_fm_api_key"Alternatively, create a ~/.spotify-setlist.yaml file in your home directory:
spotify_client_id: "your_spotify_client_id"
spotify_client_secret: "your_spotify_client_secret"
spotify_redirect_uri: "http://127.0.0.1:8080/callback"
setlist_fm_api_key: "your_setlist_fm_api_key"You can also specify a custom config file location:
spotify-setlist --config /path/to/config.yaml create-playlistspotify-setlist create-playlist --artist 'The Beatles'The command will prompt you to authenticate with Spotify to grant it permission to create playlists on your behalf. It will then create the playlist based on the setlist it retrieves from setlist.fm.
Subsequent executions reuse the saved refresh token, so you won't need to authenticate again. Spotify expires refresh tokens after six months; when that happens the command automatically discards the stale token and prompts you to sign in again, then continues with the run.
--config- Path to a config file-v, --verbose- Enable verbose output for debugging-h, --help- Show help message
task testFormat code:
task fmtRun linter:
task lint