Control Spotify directly from your terminal like a civilized engineer.
- Play/Pause music
- Skip to next/previous track
- View currently playing song
- Control playback from terminal
- Colored terminal output (because we have standards)
- The choice between a simple terminal commands or a simple terminal UI
- The queue is shown
spotify> now
🎧 Ordinary Life - The Weeknd
spotify> pause
⏸ Paused
spotify> next
⏭ Skipped
spotify> previous
⏮ Previous track- Python 3.10+
- Spotify Premium account (required for playback control)
- Spotify app running on a device
Clone the repo:
git clone https://github.com/yourusername/podify.git
cd podifyCreate virtual environment:
python3 -m venv .venv
source .venv/bin/activateInstall dependencies:
pip install -r requirements.txtUse these exact commands from the repo root:
cd /Users/trangnguyen/dev/podify
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txtCreate .env in the repo root:
SPOTIPY_CLIENT_ID=your_client_id
SPOTIPY_CLIENT_SECRET=your_client_secret
SPOTIPY_REDIRECT_URI=http://127.0.0.1:8888/callbackThen run one of these:
# Text CLI
python3 -m podify
# iPod-style UI
python3 -m podify.uiOn first run, a browser window opens for Spotify auth. Approve access and return to terminal.
If you get Insufficient client scope errors, clear cached token and log in again:
rm -f .cache
python3 -m podify.ui- Go to: https://developer.spotify.com/dashboard
- Create a new app
- Add redirect URI:
http://127.0.0.1:8888/callback
- Create a
.envfile:
SPOTIPY_CLIENT_ID=your_client_id
SPOTIPY_CLIENT_SECRET=your_client_secret
SPOTIPY_REDIRECT_URI=http://127.0.0.1:8888/callbackRun the text CLI (from the repo root so imports resolve):
python3 -m podifyRun the iPod-style TUI:
python3 -m podify.uiAvailable commands:
now -> show current track
play -> resume playback
pause -> pause playback
next -> skip track
previous -> go to previous track
volume -> control mac volume or spotify volume
playlist -> show playlist
quit -> exit
- Spotify must be open and actively playing music
- Some commands (like
previous) may be restricted depending on playback context - First run will open a browser for authentication
- Python
- Spotipy (Spotify Web API)
- Colorama (terminal styling)
- python-dotenv (loading env variables)
- subprocess (control mac volume)
- Real-time now-playing updates
- Keyboard shortcuts
MIT