Safe CLI for comparing and merging music libraries
Project description
trackloom
trackloom is a safe CLI for comparing two music libraries and merging tracks
from library A into library B without overwriting existing files or deleting
data.
It extracts normalized artist, album, and song fields from file paths and
embedded tags, compares exact and fuzzy matches, builds a copy/add plan, lets
you review ambiguous matches, and applies the plan with dry-run and reporting
support.
Why use it
- Safe by default: no overwrite, no delete, confirmation required for writes
- Workflow-oriented:
compare,plan,review,apply - Handles fuzzy matching and duplicate preference logic
- Supports dry-run, JSON output, reports, and quarantine-based replacement flow
- Works with common music formats via
mutagen
Install
From PyPI:
python3 -m pip install trackloom
From a source checkout:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -e .
After install:
trackloom help
Quickstart
trackloom compare /path/to/A /path/to/B --json > /tmp/compare.json
trackloom plan /path/to/A /path/to/B --write-plan-json /tmp/plan.json
trackloom review /path/to/A /path/to/B --decisions-file /tmp/decisions.json \
--write-plan-json /tmp/reviewed-plan.json
trackloom apply /path/to/A /path/to/B --from-plan-json /tmp/reviewed-plan.json --dry-run
For a real run, replace the final command with --yes after checking the plan
and dry-run output.
Commands
parse: catalog parsed fields from one or two directoriescompare: find exact and fuzzy matches and recommended actionsplan: build copy/add operations to bring A into Breview: resolvemanual_reviewitems interactivelyapply: execute the plan safely, with dry-run and reportsdoctor: run environment and CLI diagnostics
Safety model
- Existing destination files are never overwritten.
- Delete operations are never performed.
- Replacement cleanup is quarantine-only and only applies to
replace_in_b_with_a. - Real writes require confirmation by default.
applycontinues past per-file I/O failures and reports them.
Docs
- CLI workflow and command details:
docs/CLI.md - Machine-readable contract surface:
docs/CONTRACTS.md - Architecture overview:
docs/ARCHITECTURE.md - Troubleshooting:
docs/TROUBLESHOOTING.md - ADR index:
adr/README.md - Release checklist:
RELEASE.md - Contribution guide:
CONTRIBUTING.md
Development
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -e .[dev]
python3 -m ruff check .
python3 -m ruff format .
python3 -m pytest -q
Dependency Lockfile
requirements.txt is the pinned runtime lockfile generated from
pyproject.toml. It exists for reproducible installs and dependency scanners
such as Aikido.
Regenerate it with:
make lock
License
This project is licensed under the GNU General Public License v3.0 or later
(GPL-3.0-or-later). See LICENSE.
Built by Dan Getz, Jr.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trackloom-0.1.0.tar.gz.
File metadata
- Download URL: trackloom-0.1.0.tar.gz
- Upload date:
- Size: 62.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb020b569fc9ffbad9002799ce74638b28dcd92ba5fbe00f8a07a12d5a785a8
|
|
| MD5 |
1331d6785867b6283245a5a68488f3ba
|
|
| BLAKE2b-256 |
501071b3beb6a3d3238620ab9327557690efcc209ea689e1f6fb20f8a5bf8f84
|
File details
Details for the file trackloom-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trackloom-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7078782a8d68d7f156533b67d128a99e099a6741dfd85ccaf3be612c17547db5
|
|
| MD5 |
2cc59c61c1a3d87323637cc7fa037f99
|
|
| BLAKE2b-256 |
ed42fc9390f1010bd4477f06f7795a1b4c0fba3c0360cad7b8f37296453cbc02
|