💿 InPhase
A music library management tool for creating and syncing playlists between Spotify and Rekordbox.
Installation
Prerequisites
Both installation methods require Dart to be installed on your system:
- macOS: Download from dart.dev/get-dart or install via Homebrew:
brew install dart - Windows: Download the installer from dart.dev/get-dart
- Linux: Follow the instructions at dart.dev/get-dart
After installing, verify it works:
dart --version
Option 1: Install from pub.flutter-io.cn (Recommended)
The easiest way to install InPhase is using Dart's package manager:
dart pub global activate in_phase
After installation, you can use the tool from any directory:
in_phase login
in_phase sync
Note: Make sure ~/.pub-cache/bin (or %LOCALAPPDATA%\Pub\Cache\bin on Windows) is in your system PATH.
Option 2: Build from Source
If you want to build from source or contribute to the project:
-
Clone the Repository
git clone https://github.com/jeroen-meijer/in_phase.git cd in_phase -
Install Dependencies
dart pub get -
Activate the Tool
dart pub global activate --source path .Or use the run script directly:
./run.sh login ./run.sh syncNote for Windows users: You'll need to use Git Bash or WSL (Windows Subsystem for Linux) to run
.shscripts, or usedart pub global activateinstead.
Set Up Rekordbox (Optional)
If you want to use the Rekordbox-specific features of InPhase (such as syncing playlists to your Rekordbox database), you need to first complete the setup steps for the rekorddart package.
Please follow the installation and setup instructions in the rekorddart README before continuing. The key requirements are:
- Install SQLCipher
- (Optional) Set the
SQLCIPHER_DYLIBenvironment variable - (Optional) Set the
REKORDBOX_DB_KEYenvironment variable or download it using the rekorddart tool
If you only want to use Spotify features (like the crawl command), you can skip this step.
Set Up Spotify API Credentials
Before you can use InPhase, you need to create a Spotify app and get API credentials. This is free and only takes a few minutes:
-
Go to the Spotify Developer Dashboard
- Visit developer.spotify.com/dashboard
- Log in with your Spotify account (or create one if you don't have one)
-
Create a New App
- Click the "Create app" button
- Fill in the app details:
- App name: Choose any name (e.g., "InPhase" or "My Music Tool")
- App description: Optional description
- Redirect URI: This is important! Use
http://localhost:8080/callback(or any URL you prefer, but you'll need to use the same one in the environment variable) - Which API/SDKs are you planning to use?: Select "Web API"
- Check the agreement box and click "Save"
-
Get Your Credentials
- After creating the app, you'll see your app's dashboard
- You'll see two important values:
- Client ID: A long string of letters and numbers
- Client Secret: Click "View client secret" to reveal it (you'll only see this once, so save it!)
-
Set Environment Variables
You need to set three environment variables with your credentials. Choose the method for your operating system:
macOS/Linux:
Add these lines to your shell configuration file (
~/.zshrc,~/.bashrc, or~/.bash_profile):export SPOTIFY_CLIENT_ID="your_client_id_here" export SPOTIFY_CLIENT_SECRET="your_client_secret_here" export SPOTIFY_REDIRECT_URI="http://localhost:8080/callback"Then reload your shell configuration:
source ~/.zshrc # or ~/.bashrc, depending on your shellWindows:
Open PowerShell as Administrator and run:
[System.Environment]::SetEnvironmentVariable('SPOTIFY_CLIENT_ID', 'your_client_id_here', 'User') [System.Environment]::SetEnvironmentVariable('SPOTIFY_CLIENT_SECRET', 'your_client_secret_here', 'User') [System.Environment]::SetEnvironmentVariable('SPOTIFY_REDIRECT_URI', 'http://localhost:8080/callback', 'User')Then restart your terminal/PowerShell window.
Verify the variables are set:
# macOS/Linux echo $SPOTIFY_CLIENT_ID # Windows PowerShell $env:SPOTIFY_CLIENT_ID
Important Notes:
- The redirect URI must match exactly what you entered in the Spotify app dashboard
- Keep your Client Secret private - don't share it or commit it to version control
- The redirect URI
http://localhost:8080/callbackis just for local development - Spotify will redirect there during authentication, but you don't need to run a web server
Usage
Login to Spotify
in_phase login
Authenticates with Spotify and caches credentials for use by other commands.
Sync playlists
# Sync all playlists from config
in_phase sync
# Sync specific playlists by ID
in_phase sync <playlist_id1> <playlist_id2>
Syncs Spotify playlists to your Rekordbox database. See SYNC_CONFIG.md for configuration details.
Crawl for new tracks
# Run all crawl jobs
in_phase crawl
Automatically discovers new tracks from configured sources (playlists, artists, labels, or YouTube channels) and creates Spotify playlists. See CRAWL_CONFIG.md for configuration details.
Open config directory
in_phase config reveal
Opens the config directory (~/.in_phase) in your file manager. This directory contains all configuration files, cache files, and other data used by InPhase. This command is especially helpful for non-technical users who want to edit configuration files or see where everything is stored.
Requirements
- Rekordbox database access
- Spotify API credentials
- Dart/Flutter development environment