Skip to content

mhborthwick/mergify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mergify

Intro

A CLI to merge your Spotify playlists.

Example Playlists

Name User Description Link
Mike's Monthly Playlists Mike H. Borthwick A compilation of Mike's 100+ Monthly Playlists (Last Updated: Feb 2025). Open on Spotify

Requirements

  • Docker (recommended for running the auth proxy server)

Install

export ARCH="darwin-arm64" # macOS (Apple Silicon)

# export ARCH="darwin-amd64" # macOS (Intel)

# export ARCH="linux-amd64" # Linux (x86_64)

curl -o mergify -L "https://github.com/mhborthwick/mergify/releases/latest/download/mergify-${ARCH}"

chmod +x mergify

sudo mv mergify /usr/local/bin/

Usage

Usage: mergify <command> [flags]

Flags:
  -h, --help    Show context-sensitive help.

Commands:
  create [flags]
    Combines the tracks from the playlists in your CLI config into a new playlist

Run "mergify <command> --help" for more information on a command.

Flow Chart

flowchart TD
    A["πŸ“„ ~/.mergify/config.json"] -->|Reads Config| B["πŸ’» Mergify CLI"]
    B -->|Requests Token| C["πŸ”’ Auth Proxy Server"]
    C -->|Creates Playlist| D["🎡 Spotify Web API"]
Loading

Setup

Step 1: Authenticate with Spotify

1.1 Create a Spotify App

You will need to create a Spotify app to obtain your client ID and secret for authentication.

1.2 Start the Auth Proxy Server

Clone this repo:

git clone git@github.com:mhborthwick/mergify.git

Go to the auth directory and create a .env file:

cd mergify/auth

touch .env

Add your client ID and secret to .env:

CLIENT_ID=<replace_with_your_client_id>
CLIENT_SECRET=<replace_with_your_client_secret>

Now, start the auth proxy server using Docker Compose:

make auth-up

Alternatively, run the following commands:

cd mergify/auth

docker compose up

1.3 Generate an Access Token

The auth server runs at http://localhost:3000.

  1. Open http://localhost:3000 in your browser.

  2. Click Login with Spotify.

  3. Log in to your Spotify account and grant access, if prompted.

Step 2: Set Up Your Mergify Config File

2.1 Create Your Config File

Add a ~/.mergify/config.json file:

touch ~/.mergify/config.json

2.2 Define Your Playlists

Define the playlists that you want to merge as an array:

{
  "playlists": [
    "Playlist 1",
    "Playlist 2",
    "Playlist 3",
    "Playlist 4",
    "Playlist 5"
    // ...
  ]
}

About

🎧 A CLI to merge your Spotify playlists

Topics

Resources

Stars

Watchers

Forks