in_phase 1.1.5
in_phase: ^1.1.5 copied to clipboard
A music library management tool for creating and syncing playlists between Spotify and Rekordbox.
💿 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.dev (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 complete the setup steps below. If you only want to use Spotify features (like the crawl command), you can skip this entire section.
Prerequisites
-
Install Rekordbox 6.0.0+
- Download from rekordbox.com/en/download
- Make sure Rekordbox is installed and you have a library set up
-
Install SQLCipher 4.0.0+
SQLCipher is required to access the encrypted Rekordbox database. Install it for your platform:
macOS (Homebrew):
brew install sqlcipherWindows:
- Download pre-compiled binaries from zetetic.net/sqlcipher/downloads
- Extract and add to your system PATH
Linux:
# Ubuntu/Debian sudo apt install sqlcipher # Fedora sudo dnf install sqlcipherThe library will automatically detect SQLCipher in common installation locations. If you have a custom installation, you can set the path manually (see below).
Environment Variables (Optional)
InPhase uses the rekorddart package to access your Rekordbox database. Most users won't need to set these, but they're available if needed:
SQLCIPHER_DYLIB (Optional - only needed for custom SQLCipher installations):
# macOS/Linux
export SQLCIPHER_DYLIB=/path/to/your/libsqlcipher.dylib
# Windows PowerShell
[System.Environment]::SetEnvironmentVariable('SQLCIPHER_DYLIB', 'C:\path\to\libsqlcipher.dll', 'User')
REKORDBOX_DB_KEY (Optional - defaults to a standard key):
# macOS/Linux - add to your shell config file (~/.zshrc, ~/.bashrc, etc.)
export REKORDBOX_DB_KEY=your_key_here
# Windows PowerShell
[System.Environment]::SetEnvironmentVariable('REKORDBOX_DB_KEY', 'your_key_here', 'User')
Getting the Rekordbox Database Key
The database key is used to decrypt your Rekordbox database. You have three options:
-
Use the default key (Recommended for most users):
- No action needed! InPhase will automatically use a default key if
REKORDBOX_DB_KEYis not set. - This works for most standard Rekordbox installations.
- No action needed! InPhase will automatically use a default key if
-
Download using the rekorddart tool:
# Install the rekorddart executable dart pub global activate rekorddart # Download and display the encryption key download_keyThen copy the displayed key and set it as the
REKORDBOX_DB_KEYenvironment variable (see above). -
Set manually (if you already know your key):
- Set the
REKORDBOX_DB_KEYenvironment variable with your key (see above).
- Set the
Additional Resources
For more detailed information, troubleshooting, or advanced configuration options, see the rekorddart README.
⚠️ Important: Always make a backup of your Rekordbox library before using InPhase with Rekordbox features. While InPhase is designed to be safe, modifying your Rekordbox database directly can potentially cause issues if something goes wrong.
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.
Curate playlists #
# Preview tracks and add to target playlists
in_phase curate <playlist>
Preview playlist tracks one by one, add them to target playlists (key 1 = first in list, key 2 = second, etc.), or skip to the next. Requires Spotify Premium and an active device. See CURATE_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