MusRen is a Python CLI tool to organize your local music library by:
- Renaming files using metadata (artist/title/album/track, etc.)
- Optionally recognizing tracks (AcoustID + Chromaprint
fpcalc, or Shazam) - Optionally fetching and embedding album artwork
- Optionally fetching and embedding synchronized lyrics (LRC)
It is designed to be used on folders of audio files (MP3, FLAC, M4A).
- Scans a directory (optionally recursively) for audio files.
- Reads existing metadata.
- Optionally recognizes the track and enriches metadata.
- Optionally embeds lyrics and/or cover art.
- Renames files based on the resulting metadata.
- Python 3.9+ (recommended)
- Optional for AcoustID recognition: Chromaprint
fpcalc
AcoustID recognition requires the fpcalc binary.
- Windows: download
fpcalc.exefrom Chromaprint releases and add it toPATH.- MusRen also checks common local locations (project root and
utils/) if needed.
- MusRen also checks common local locations (project root and
- macOS:
brew install chromaprint - Linux (Debian/Ubuntu):
sudo apt-get install libchromaprint-tools
MusRen can be used directly from source or installed as an editable package.
Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1Install dependencies:
python -m pip install -r requirements.txtInstall the project (so the music-renamer command is available):
python -m pip install -e .Create and activate an environment (uv manages the venv for you):
Install dependencies:
uv syncInstall the project (editable):
uv pip install -e .Some features may require optional dependencies. You can install them via extras:
# AcoustID recognition
python -m pip install -e ".[recognition]"
# Synchronized lyrics
python -m pip install -e ".[lyrics]"
# MusicBrainz support (improved lookup)
python -m pip install -e ".[musicbrainz]"With uv:
uv pip install -e ".[recognition]"
uv pip install -e ".[lyrics]"
uv pip install -e ".[musicbrainz]"You can pass an API key with --api-key/-k or set it via environment variable:
$env:ACOUSTID_API_KEY="your_key_here"MusRen uses a Typer-based CLI.
Show help:
python app.py --helpIf installed, you can also use:
music-renamer --helpProcess the current folder (interactive prompts):
python app.pyPick a directory:
python app.py -d "D:\Music"Scan subfolders:
python app.py -d "D:\Music" -RFetch and embed synchronized lyrics:
python app.py -d "D:\Music" -lAdd album covers:
python app.py -d "D:\Music" -cUse recognition with AcoustID (requires fpcalc):
python app.py -d "D:\Music" -r -k "YOUR_ACOUSTID_KEY"Use Shazam instead of AcoustID (Recommended):
python app.py -d "D:\Music" -sRun without confirmations:
python app.py -d "D:\Music" -yKey files and folders:
app.py # main entrypoint (Typer)
core/ # processing logic
audio_processor.py # rename/metadata/lyrics/covers orchestration
artwork.py # cover art fetch + embed
install_covers.py # cover-install helper
shazam_processor.py # optional Shazam integration
utils/ # helpers (dependency checks, filesystem tools)
tests/ # lightweight tests
- Recognition fails /
fpcalcmissing: install Chromaprint and ensurefpcalcis inPATH. - Optional-feature import errors (lyrics/recognition/musicbrainz): install the matching extras.
With pip:
python -m pytest -qWith uv:
uv run pytest -qThis repo includes a Pyright configuration in pyproject.toml. To run it:
python -m pip install pyright
pyright