Export Spotify playlists to CSV directly from the terminal, inspired by pavelkomarov/exportify.
This tool can export all saved playlists of a user, including liked songs.
- Clone this repository:
$ git clone https://github.com/donmerendolo/exportify-cli.git
- Install the required packages:
$ cd exportify-cli
$ pip install -r requirements.txt
(recommended to use a virtual environment)
-
Create an app on Spotify Developer Dashboard:
- Go to Spotify Developer Dashboard.
- Set a name and description for your app.
- In the "Redirect URIs" field, use:
http://localhost:3000/callback
(for example).
-
Configure your credentials:
- Replace
CLIENT_ID
,CLIENT_SECRET
, andREDIRECT_URI
in theconfig.cfg.RENAME
file. - These values can be found in the "Settings" section of your app on the Spotify Developer Dashboard.
- Replace
-
Rename
config.cfg.RENAME
toconfig.cfg
After running python exportify.py
the first time, it should keep you authenticated so you don't have to log in each time. If you wish to log out, simply remove the .cache
file.
Tested on Windows with Python 3.11.9.
usage: exportify.py [-h] [-a] [-p PLAYLISTS [PLAYLISTS ...]] [-o OUTPUT] [-l]
Export Spotify playlists to CSV.
options:
-h, --help show this help message and exit
-a, --all Export all playlists
-p PLAYLISTS [PLAYLISTS ...], --playlists PLAYLISTS [PLAYLISTS ...]
Specify playlist names or IDs to export
-o OUTPUT, --output OUTPUT
Specify the output directory (default: ./playlists/)
-l, --list List all playlists