spotipy-cli

raw JSON →
0.3.0 verified Sat May 09 auth: no python

A command-line interface for Spotify Web API built on top of Spotipy. Version 0.3.0 is the latest. Development appears to be intermittent.

pip install spotipy-cli
error ModuleNotFoundError: No module named 'spotipy_cli'
cause The package is installed as 'spotipy-cli' but imported as 'spotipy_cli' (underscore).
fix
Use 'from spotipy_cli import cli' after installing via 'pip install spotipy-cli'.
error spotipy.oauth2.SpotifyOAuthError: Invalid client secret
cause Missing or incorrect SPOTIPY_CLIENT_SECRET environment variable.
fix
Set SPOTIPY_CLIENT_SECRET to your Spotify app's client secret.
breaking spotipy-cli relies on the Spotipy library; changes in Spotipy's API may break spotipy-cli. Ensure spotipy version compatibility.
fix Pin spotipy version or test with your spotipy version.
gotcha The CLI requires interactive auth (OAuth) and will open a browser. It may not work in headless environments without manual token caching.
fix Pre-authenticate using Spotipy utilities and set environment variables for token.

Run the CLI. It expects SPOTIPY_CLIENT_ID, SPOTIPY_CLIENT_SECRET, and SPOTIPY_REDIRECT_URI environment variables to be set.

from spotipy_cli import cli
cli()