Skip to content

tyhallcsu/spotify-multi-account-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spotify Multi-Account Switcher for macOS

Spotify Multi-Account Switcher

🎡 Seamlessly switch between multiple Spotify accounts on macOS without re-entering credentials

Why This Tool?

Spotify doesn't natively support multiple account switching on desktop. This tool solves that by maintaining separate profile folders for each account, preserving login tokens, preferences, and history.

✨ Features

  • Zero Password Storage - Uses Spotify's existing login tokens
  • Instant Switching - One command switches accounts and launches Spotify
  • Preserved State - Keeps playlists, preferences, and history separate
  • Cache Management - Automatically clears volatile caches during switches
  • Backup Safe - Non-destructive profile management

πŸš€ Quick Start

Installation

# Download the script
curl -O https://raw.githubusercontent.com/tyhallcsu/spotify-multi-account-switcher/main/spotify-switcher.sh

# Make it executable
chmod +x spotify-switcher.sh

# Optional: Move to your PATH for global access
mv spotify-switcher.sh /usr/local/bin/spotify-switcher

First-Time Setup

  1. Log into your first Spotify account and quit Spotify

  2. Save it as a profile:

    ./spotify-switcher.sh init work
  3. Log into your second account and quit Spotify

  4. Save that profile:

    ./spotify-switcher.sh init personal

Daily Usage

# Switch to work account
./spotify-switcher.sh switch work

# Switch to personal account  
./spotify-switcher.sh switch personal

# See all your profiles
./spotify-switcher.sh list

πŸ“– Complete Usage

spotify-switcher.sh <command> [options]

Commands:
  list                    Show all saved profiles
  init <name>            Save current Spotify state as new profile
  switch <name>          Switch to profile and launch Spotify
  remove <name>          Delete a profile (with confirmation)
  open                   Open profiles folder in Finder
  help                   Show this usage information

πŸ›  Advanced Usage

Create Desktop Launchers

For one-click switching from Finder or Dock:

# Create launcher scripts
echo './spotify-switcher.sh switch work' > ~/Desktop/Spotify-Work.command
echo './spotify-switcher.sh switch personal' > ~/Desktop/Spotify-Personal.command

# Make them executable
chmod +x ~/Desktop/Spotify-*.command

Double-click to switch accounts instantly.

Add to Shell Profile

Add to your ~/.zshrc or ~/.bash_profile:

alias spotify-work='spotify-switcher.sh switch work'
alias spotify-personal='spotify-switcher.sh switch personal'
alias spotify-list='spotify-switcher.sh list'

βš™οΈ How It Works

The switcher maintains separate copies of your Spotify application support folder for each account:

~/Library/Application Support/
β”œβ”€β”€ Spotify/                    # Active profile
└── Spotify-Profiles/
    β”œβ”€β”€ work/                   # Work account data
    β”œβ”€β”€ personal/               # Personal account data  
    └── family/                 # Family account data

On each switch:

  1. Kills any running Spotify processes
  2. Swaps the active profile using rsync (fast, preserves permissions)
  3. Clears volatile caches (GPU cache, browser cache, etc.)
  4. Launches Spotify with the selected profile

Preserved per profile:

  • Login tokens (no re-authentication needed)
  • Downloaded music and cache
  • Playlists and library
  • Audio quality settings
  • UI preferences and window state

πŸ”§ Troubleshooting

"Spotify support folder not found"

Launch Spotify once, log in completely, then quit and retry the init command.

UI crashes or graphics issues

Uncomment this line in the script to disable GPU acceleration:

# open -a "$SPOTIFY_APP" --args --disable-gpu && exit 0
Profiles not switching properly
  • Ensure Spotify is completely quit before switching
  • Check that profile exists: ./spotify-switcher.sh list
  • Manually clear caches: rm -rf ~/Library/Caches/com.spotify.client
Permission errors

Make sure the script is executable and you have write access to ~/Library/Application Support/

πŸ–₯ Tested Environment

  • MacBook Pro 16-inch, 2023
  • Chip Apple M2 Max
  • Memory 96 GB
  • macOS Sequoia 15.6

Should work on all modern macOS versions with Intel or Apple Silicon.

🀝 Contributing

Issues and pull requests welcome! Please:

  1. Test on your system first
  2. Include your macOS version and hardware in bug reports
  3. Check existing issues before creating new ones

πŸ“ License

MIT License - see LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Created by @sharmanhall


Like this tool? Give it a ⭐ and share with other multi-account Spotify users!

About

🎡 Seamlessly switch between multiple Spotify accounts on macOS without re-entering credentials

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages