A command-line interface (CLI) tool for interacting with the Spotify Web API. Use it to search Spotify from your terminal.
To use this tool, you need a Spotify Developer account:
- Go to the Spotify Developer Dashboard.
- Log in and create a new application.
- Copy your Client ID and Client Secret.
The program will look for your config.json in several common locations.
You can place it in any of the following paths:
$XDG_CONFIG_HOME/spotify-cli/config.json$HOME/.config/spotify-cli/config.json./config.json(current directory)
Create the file with the following structure:
{
"api": {
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
}
}Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your actual credentials.
Make sure you have Go installed (1.24+ recommended):
go build -o spotify-cli
./spotify-clior
go run .