PHPackages                             stevenfoncken/multitool-for-spotify-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. stevenfoncken/multitool-for-spotify-php

ActiveProject[CLI &amp; Console](/categories/cli)

stevenfoncken/multitool-for-spotify-php
=======================================

PHP command-line application that performs various tasks to enhance your Spotify experience

v2.0.2(1y ago)613MITPHPPHP &gt;=8.2

Since May 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/stevenfoncken/multitool-for-spotify-php)[ Packagist](https://packagist.org/packages/stevenfoncken/multitool-for-spotify-php)[ Docs](https://github.com/stevenfoncken/multitool-for-spotify-php)[ RSS](/packages/stevenfoncken-multitool-for-spotify-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (5)Used By (0)

Multi-Tool for Spotify
======================

[](#multi-tool-for-spotify)

[Report a Bug](https://github.com/stevenfoncken/multitool-for-spotify-php/issues/new?labels=bug&projects=&template=01_BUG-REPORT.yml&title=%5BBUG%5D+%3Ctitle%3E)· [Request a Feature](https://github.com/stevenfoncken/multitool-for-spotify-php/discussions/new?category=ideas)· [Ask a Question](https://github.com/stevenfoncken/multitool-for-spotify-php/discussions/new/choose)

[![version: 2.0.2](https://camo.githubusercontent.com/1f970dafa06e41d9866a0ba312dc4af79222b3bcadcb8ad3c82b418de068e39f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e302e322d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/1f970dafa06e41d9866a0ba312dc4af79222b3bcadcb8ad3c82b418de068e39f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e302e322d677265656e2e7376673f7374796c653d666f722d7468652d6261646765)[![Minimum PHP Version: 8.2](https://camo.githubusercontent.com/d8d898836f73cc4046102b6b820ad88f2625c7d119c756259f82448999884343/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e322d3838393242462e7376673f7374796c653d666f722d7468652d6261646765)](https://php.net)[![PHP-FIG](https://camo.githubusercontent.com/a6c12eeeecc688ce929195e388bc666ed0278e8c762b8b95fa234a1b5775ddd5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2d4649472d5053522d2d31322d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://www.php-fig.org/psr/psr-12)[![license: MIT](https://camo.githubusercontent.com/9563e53a51cde5c43fb7ea4744e69ee0eb8d6a77a412b9c3c4032e17cd5989c9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/stevenfoncken/multitool-for-spotify-php/blob/master/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/40c436223cec8b8b49d2abb29c7be7f620cf08f3ea75b75a508a857f91dba578/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746576656e666f6e636b656e2f6d756c7469746f6f6c2d666f722d73706f746966792d7068702e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/stevenfoncken/multitool-for-spotify-php)

A handy command-line application for archiving playlists, searching your library for tracks, or creating playlists with complete artist catalogs.

### [🤔 Why?](https://www.youtube.com/watch?v=zTDeEJyCmNA&t=39s)

[](#-why)

Initially, it was an automatic (CronJob) playlist archiving tool for "New Music Friday" playlists from popular EDM labels. It allowed me to compensate for FOMO when I didn't have time to discover new music right away.

Over time, I developed the desire to rewrite the otherwise lifelong beta (never touch a running system) and sprinkle some structured overhead on top ;-)

📖 Table of Contents
-------------------

[](#-table-of-contents)

Click to expand- [📖 Table of Contents](#-table-of-contents)
- [⛓ Features](#-features)
- [🚀 Getting Started](#-getting-started)
    - [Requirements](#requirements)
    - [Installation](#installation)
        - [Download or Clone the Project](#download-or-clone-the-project)
        - [Install Dependencies via Composer](#install-dependencies-via-composer)
    - [Config](#config)
        - [.env](#env)
        - [Connecting to Spotify's Web API](#connecting-to-spotifys-web-api)
    - [Usage](#usage)
        - [Playlist Archiving](#playlist-archiving)
        - [List Archived Playlists](#list-archived-playlists)
        - [Delete Archived Playlists](#delete-archived-playlists)
        - [Create Artist Catalog Playlist](#create-artist-catalog-playlist)
        - [Search Library Playlists for a Given Track](#search-library-playlists-for-a-given-track)
- [🔨 Development](#-development)
    - [Tech Stack](#tech-stack)
- [☑️ TODOs](#%EF%B8%8F-todos)
- [✨ Future Features](#-future-features)
- [Changelog](#changelog)
- [Help &amp; Questions](#help--questions)
- [Contributing](#contributing)
- [👤 Author](#-author)
- [🤝 Credits](#-credits)
- [💛 Support](#-support)
- [⚖️ Disclaimer](#%EF%B8%8F-disclaimer)
- [📃 License](#-license)

⛓ Features
----------

[](#-features)

- Archive playlists from CSV or argument input with special naming syntax and mailing.
- Search library playlists for a given track.
- Create playlists with complete artist catalogs.
- see: [✨ Future Features](#-future-features).

🚀 Getting Started
-----------------

[](#-getting-started)

### Requirements

[](#requirements)

- php &gt;= 8.2
- Composer

### Installation

[](#installation)

#### Download or Clone the Project

[](#download-or-clone-the-project)

```
composer create-project stevenfoncken/multitool-for-spotify-php
```

or

```
git clone --depth 1 https://github.com/stevenfoncken/multitool-for-spotify-php.git
```

Now `cd` into the project directory.

---

#### Install Dependencies via Composer

[](#install-dependencies-via-composer)

Skip when create-project was used.

```
composer install
```

---

### Config

[](#config)

#### .env

[](#env)

```
cp config/.env.dist config/.env
```

Set your timezone in `APP_TIMEZONE` - [List of Supported Timezones](https://www.php.net/manual/en/timezones.php).

---

#### Connecting to Spotify's Web API

[](#connecting-to-spotifys-web-api)

`multitool-for-spotify-php` needs to connect to Spotify's Web API in order to function.

1. Log in to the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard).
2. Click [Create app](https://developer.spotify.com/dashboard/create).
    - Choose name, description, website
    - Redirect URI: `http://localhost:10276/mtfsp-auth-callback`
    - Check `Web API`
3. Click `Save`
4. Click `Settings`
5. Copy `Client ID` to [.env](config/.env) `SPOTIFY_API_CLIENT_ID`
6. Copy `Client Secret` to [.env](config/.env) `SPOTIFY_API_CLIENT_SECRET`

It should look like this (but with your own values):

```
SPOTIFY_API_CLIENT_ID="2c914ba76f18385qu4b57qr82o5p1e64"
SPOTIFY_API_CLIENT_SECRET="15g2fh52qg1631j1hex4sg167164c1a6"

```

7. Open your terminal.
8. Run: `php bin/console mtfsp:auth`
9. Follow the displayed instructions.

Now you are ready to use `multitool-for-spotify-php` 🎉

---

### Usage

[](#usage)

#### Playlist Archiving

[](#playlist-archiving)

```
php bin/console mtfsp:archive [--mail]
```

Each playlist has a snapshot ID that is written to the description of the archived playlist to check whether the playlist has already been archived.

A new archive playlist is only created if the content (so the snapshot ID) has been changed.

Example of the name of an generated archive playlist: SFY-2024-06-Top 50 Global (PREFIX-YYYY-WW-SUFFIX or PLAYLIST\_NAME)

You can choose between single playlist IDs or a path to a CSV file as an argument:

**Argument playlist ID:**

Single or comma-separated spotify playlist ID(s).

**Argument CSV file path:**

CSV headerDescriptionRequiredPlaylist\_Name\_PrefixCustom abbreviation e.g. SFY for spotify playlists. Uses ARCHIVE when not set.NoPlaylist\_Name\_SuffixCustom playlist name. Uses the playlist name when not set.NoPlaylist\_Sort\_Orderdesc =&gt; recent added tracks at top, asc =&gt; oldest added tracks at top. Uses playlist default oder when not set.NoPlaylist\_IdThe ID of the spotify playlist.YesTagsFor personal use.NoThe CSV must be separated by semicolons. Example: [playlists-to-archive.dist.csv](config/playlists-to-archive.dist.csv)

**Option for mailing:**

If you set the mail env vars in your [.env](config/.env) file, you can use `--mail` to receive notifications when the archiving process is complete.

This is particularly useful when using a CronJob.

---

#### List Archived Playlists

[](#list-archived-playlists)

```
php bin/console mtfsp:archive:list-playlists
```

---

#### Delete Archived Playlists

[](#delete-archived-playlists)

```
php bin/console mtfsp:archive:delete-playlists
```

Currently all archived playlists will be deleted. But multiple "are you sure" checks will protect you from hasty mistakes ;-)

---

#### Create Artist Catalog Playlist

[](#create-artist-catalog-playlist)

```
php bin/console mtfsp:artist:catalog-to-playlist  []
```

If you specify a playlist ID, the catalog will be added to this playlist, otherwise a new playlist will be created.

---

#### Search Library Playlists for a Given Track

[](#search-library-playlists-for-a-given-track)

```
php bin/console mtfsp:search:track-in-library [--withArchived]
```

Set `--withArchived` if you want to include archived playlists in the search.

🔨 Development
-------------

[](#-development)

### Tech Stack

[](#tech-stack)

The project is built using the [Symfony Console](https://github.com/symfony/console) component.

☑️ TODOs
--------

[](#️-todos)

- Add unit tests

✨ Future Features
-----------------

[](#-future-features)

- Archiving: retrieve source playlists from dedicated Spotify playlist folder.
- MyWeeklySelection: command that creates a public profile playlist with the last 30 liked songs with custom playlist image.
- Archiving: add Spotify agnostic storage, see [feature/add-database](https://github.com/stevenfoncken/multitool-for-spotify-php/tree/feature/add-database).
- Everything that comes to my mind while I'm showering ;-)

Changelog
---------

[](#changelog)

Please see [CHANGELOG.md](./CHANGELOG.md) for more information on what has changed recently.

Help &amp; Questions
--------------------

[](#help--questions)

Start a new discussion in the [Discussions Tab](https://github.com/stevenfoncken/multitool-for-spotify-php/discussions).

Contributing
------------

[](#contributing)

... is welcome.

Just [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).

For major changes, please first start a discussion in the [Discussions Tab](https://github.com/stevenfoncken/multitool-for-spotify-php/discussions) to discuss what you would like to change.

**IMPORTANT:** By submitting a patch, you agree to allow the project owner(s) to license your work under the terms of the [`MIT License`](./LICENSE).

**Thank you!**

👤 Author
--------

[](#-author)

`multitool-for-spotify-php` is primarily written and maintained by:

> 🦜 Steven Foncken
>
> - Website: [stevenfoncken.de](https://www.stevenfoncken.de)
> - GitHub: [@stevenfoncken](https://www.github.com/stevenfoncken)
> - LinkedIn: [Steven Foncken (@stevenfoncken)](https://www.linkedin.com/in/stevenfoncken)

🤝 Credits
---------

[](#-credits)

Like most software, `multitool-for-spotify-php` is build upon third-party code/libraries which was/were written by others.

I would therefore like to thank the people below for open-sourcing their work:

> Project: [jwilsson/spotify-web-api-php](https://github.com/jwilsson/spotify-web-api-php)
>
> Author: [@jwilsson (Jonathan Wilsson)](https://github.com/jwilsson)
>
> Copyright (c) Jonathan Wilsson
>
> License: [MIT](https://github.com/jwilsson/spotify-web-api-php/blob/main/LICENSE.md)

> Project: [symfony/console](https://github.com/symfony/console)
>
> Author: [@fabpot (Fabien Potencier)](https://github.com/fabpot)
>
> Copyright (c) 2004-present Fabien Potencier
>
> License: [MIT](https://github.com/symfony/console/blob/6.3/LICENSE)

... and more, see [composer.json](./composer.json).

💛 Support
---------

[](#-support)

If this project was helpful for you or your organization, please consider supporting my work directly:

- ⭐️ [Star this project on GitHub](https://github.com/stevenfoncken/multitool-for-spotify-php)
- 🐙 [Follow me on GitHub](https://github.com/stevenfoncken)

Everything helps, thanks! 🙏

⚖️ Disclaimer
-------------

[](#️-disclaimer)

"Spotify" is a registered trademark of "Spotify AB" and/or its (worldwide) subsidiaries.

This project or its author is in **no way** officially connected to, affiliated with, associated with, authorized by, built by, endorsed by, licensed by, maintained by, promoted by, or sponsored by "Spotify AB" or any of its affiliates, licensors, (worldwide) subsidiaries, or other entities under its control.

All trademarks are the property of their respective owners.

This is an independent project that utilizes "Spotify"s Web API to perform various tasks in the personal account.

Before taking legal action, please contact this address: dev\[at\]stevenfoncken\[dot\]de

Use at your own risk.

📃 License
---------

[](#-license)

[multitool-for-spotify-php](https://github.com/stevenfoncken/multitool-for-spotify-php) is licensed under the `MIT License`.

See [LICENSE](./LICENSE) for details.

Copyright (c) 2020-present [Steven Foncken](https://github.com/stevenfoncken) &lt;dev\[at\]stevenfoncken\[dot\]de&gt;

^ [back to top](#multi-tool-for-spotify) ^

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

3

Last Release

703d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/641007ef87b0a2bef4a0c354e402a3c691dbff5f1bfa3e511804a9d1e199784c?d=identicon)[stevenfoncken](/maintainers/stevenfoncken)

---

Top Contributors

[![stevenfoncken](https://avatars.githubusercontent.com/u/18899863?v=4)](https://github.com/stevenfoncken "stevenfoncken (124 commits)")

---

Tags

commandcommand-linecommand-line-appcommand-line-toolcommandlinephpspotifyspotify-apispotify-playlistspotify-web-apiphpspotifycommandline

### Embed Badge

![Health badge](/badges/stevenfoncken-multitool-for-spotify-php/health.svg)

```
[![Health](https://phpackages.com/badges/stevenfoncken-multitool-for-spotify-php/health.svg)](https://phpackages.com/packages/stevenfoncken-multitool-for-spotify-php)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M16.9k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[mahocommerce/maho

Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+

1322.1k12](/packages/mahocommerce-maho)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
