Skip to content

A Rust application that plays different Spotify playlists based on the prefix of your current git branch.

Notifications You must be signed in to change notification settings

gusintheeshell/branchfy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Branchfy 🎵

A Rust application that plays different Spotify playlists based on the prefix of your current git branch.

Features

  • 🎧 Automatically plays playlists based on your branch
  • 🔄 Changes playlist when you switch branches
  • ⚡ Keeps the music playing in the background
  • 🎮 Controls Spotify via the official API

Prerequisites

  • Rust installed
  • Spotify Premium account
  • Spotify app active on some device
  • Spotify API credentials

Installation

# Clone the repository
git clone https://github.com/your-username/branchfy
cd branchfy

# Configure your Spotify credentials
cp .env.example .env
# Edit .env with your credentials

Configuration

  1. Create an application in the Spotify Developer Dashboard
  2. Add http://localhost/ as a redirect URI
  3. Copy Client ID and Client Secret to the .env file

Usage

# First run - will ask for playlist IDs
cargo run

# Playlist IDs can be found in the Spotify URL:
# spotify:playlist:37i9dQZF1DX5Ejj0EkURtP
#                   ^^^^^^^^^^^^^^^^^^^^^ This is the ID

Branch Mapping

By default:

  • feat/* -> Playlist configured for features
  • fix/* -> Playlist configured for fixes

Commands

  • Ctrl+C or branchfy stop - Stops the execution
  • The music keeps playing until you explicitly stop it

Contribution

Pull requests are welcome! For major changes, please open an issue first.

License

MIT

About

A Rust application that plays different Spotify playlists based on the prefix of your current git branch.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published