You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-25Lines changed: 29 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,54 +1,60 @@
1
-
> [!CAUTION]
2
-
> **THIS PROJECT IS UNMAINTAINED**
3
-
>
4
-
> As of [March 9, 2026](https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security), Spotify requires an active Premium subscription to use their API. Since I don't have one, I'm unable to add features or fix bugs. If Spotify reverts this change, I'll continue maintaining it.
5
-
6
1
# exportify-cli
2
+
7
3

8
4
9
5
Export Spotify playlists to CSV or JSON directly from the terminal, inspired by [pavelkomarov/exportify](https://github.com/pavelkomarov/exportify).
10
6
11
7
This tool can export all saved playlists, including liked songs.
12
8
13
9
## Installation:
10
+
14
11
**You can also download a binary from the [releases page](https://github.com/donmerendolo/exportify-cli/releases/latest) and skip steps 1 and 2. It's recommended to place it in a dedicated folder since it will create .cache, a config file and playlists folders.**
3.**Set up Client ID, Client Secret and Redirect URI:**
24
+
3.**Set up Client ID, a Redirect URI and a refresh token:**
28
25
29
26
The first time you run exportify-cli, it will guide you through the setup:
27
+
30
28
```
31
29
File "config.cfg" not found or invalid. Let's create it.
30
+
Use a Client ID and Redirect URI that belong to the same Spotify app.
31
+
32
+
Spotify Client ID:
33
+
Redirect URI:
34
+
```
32
35
33
-
1. Go to Spotify Developer Dashboard (https://developer.spotify.com/dashboard).
34
-
2. Create a new app.
35
-
3. Set a name and description for your app.
36
-
4. Add a redirect URI (e.g. http://127.0.0.1:3000/callback).
36
+
If no valid `.cache` token is found, exportify-cli asks for a `refresh_token` once to bootstrap authentication. Spotipy then manages and refreshes tokens automatically using the `.cache` file, so you won't have to enter it again unless you log out or revoke access:
37
37
38
-
Now after creating the app, press the Settings button on the upper right corner.
39
-
Copy the Client ID, Client Secret and Redirect URI and paste them below.
38
+
```
39
+
No valid Spotify token cache found. Enter your refresh token.
40
+
Spotify refresh token:
40
41
```
41
42
42
-
After running `python exportify-cli.py` (or [one of the binaries](https://github.com/donmerendolo/exportify-cli/releases/latest)) the first time, it should keep you authenticated so you don't have to log in each time.
43
+
If you wish to log out, run:
43
44
44
-
If you wish to log out, simply remove the `.cache` file (you may also have to remove access to `exportify-cli` in https://www.spotify.com/us/account/apps/).
45
+
```bash
46
+
python exportify-cli.py --logout
47
+
```
48
+
49
+
You may also revoke access in https://www.spotify.com/us/account/apps/.
-u, --user ID|URL|URI Export all public playlists of a Spotify
61
67
user given ID, URL, or URI; repeatable.
62
68
-l, --list List available playlists.
69
+
--logout Delete cached Spotify auth token and exit.
63
70
-c, --config PATH Path to configuration file (default is
64
71
./config.cfg next to this script).
65
72
-o, --output PATH Directory to save exported files (default is
@@ -75,20 +82,15 @@ Options:
75
82
-h, --help Show this message and exit.
76
83
-v, --version Show the version and exit.
77
84
```
78
-
79
85
- Default values can be changed in `config.cfg`.
80
-
81
86
- Playlist names support partial matching, provided they uniquely identify a single playlist.
82
-
83
87
- You can also export a playlist that's not saved in your library by using its ID, URL, or URI.
84
-
85
88
- A single command can export multiple playlists by using the `-p` option multiple times. Same applies for the `-u` option.
86
-
87
89
- You can export all ***public*** playlists of any user by using the `-u` option with their user ID, URL, or URI. It won't save Liked Songs from that user, as it's private.
88
-
89
90
- The default fields are: `Position`, `Track URI`, `Track Name`, `Album Name`, `Artist Name(s)`, `Release Date`, `Duration_ms`, `Popularity`, `Added By`, `Added At`, `Record Label`. With flags, `Album URI(s)`, `Artist URI(s)`, `Track ISRC` and `Album UPC` can be included too. If you want any other field to be added, feel free to open an issue or PR.
0 commit comments