in_phase 1.1.5 copy "in_phase: ^1.1.5" to clipboard
in_phase: ^1.1.5 copied to clipboard

A music library management tool for creating and syncing playlists between Spotify and Rekordbox.

💿 InPhase #

pub.dev

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:

After installing, verify it works:

dart --version

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:

  1. Clone the Repository

    git clone https://github.com/jeroen-meijer/in_phase.git
    cd in_phase
    
  2. Install Dependencies

    dart pub get
    
  3. Activate the Tool

    dart pub global activate --source path .
    

    Or use the run script directly:

    ./run.sh login
    ./run.sh sync
    

    Note for Windows users: You'll need to use Git Bash or WSL (Windows Subsystem for Linux) to run .sh scripts, or use dart pub global activate instead.

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

  1. Install Rekordbox 6.0.0+

  2. Install SQLCipher 4.0.0+

    SQLCipher is required to access the encrypted Rekordbox database. Install it for your platform:

    macOS (Homebrew):

    brew install sqlcipher
    

    Windows:

    Linux:

    # Ubuntu/Debian
    sudo apt install sqlcipher
    
    # Fedora
    sudo dnf install sqlcipher
    

    The 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:

  1. Use the default key (Recommended for most users):

    • No action needed! InPhase will automatically use a default key if REKORDBOX_DB_KEY is not set.
    • This works for most standard Rekordbox installations.
  2. Download using the rekorddart tool:

    # Install the rekorddart executable
    dart pub global activate rekorddart
       
    # Download and display the encryption key
    download_key
    

    Then copy the displayed key and set it as the REKORDBOX_DB_KEY environment variable (see above).

  3. Set manually (if you already know your key):

    • Set the REKORDBOX_DB_KEY environment variable with your key (see above).

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:

  1. Go to the Spotify Developer Dashboard

  2. 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"
  3. 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!)
  4. 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 shell
    

    Windows:

    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/callback is 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
0
likes
140
points
122
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A music library management tool for creating and syncing playlists between Spotify and Rekordbox.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, collection, dart_console, dcli, doos, drift, equatable, fuzzywuzzy, glob, image, intl, io, json_annotation, oauth2, oxidized, path, pub_updater, rekorddart, spotify, sqlite3, uuid, yaml, yaml_codec, youtube_explode_dart

More

Packages that depend on in_phase