music-rename
Rename katakana artist names of non-Japanese artists in the macOS Music app
(e.g. マドンナ → Madonna, エルトン・ジョン & キキ・ディー → Elton John & Kiki Dee)
while leaving Japanese artists (スピッツ, ヨルシカ, ...) untouched.
Japanese song and album titles of non-Japanese artists are put back to the catalog's
English titles as well (e.g. Tom Waits 地獄に落ちた男の歌 → Down, Down, Down).
- Works without any account: English names come from the public iTunes Search API.
- Optional Apple Music API (MusicKit) support if you are in the Apple Developer Program.
- You review every change in a CSV first (can be turned off).
- Every write is recorded first, and
undoputs everything back.
Requirements
- macOS with the Music app (tested on macOS 26)
- Python 3.11+
- On first run macOS asks whether your terminal may control Music. Allow it (System Settings → Privacy & Security → Automation).
Install
uv tool install music-rename # or: pipx install music-rename
uv tool install 'music-rename[musickit]' # with Apple Music API support
Usage
Keep the Music app open.
music-rename scan # list katakana names (no network)
music-rename plan -o plan.csv # look up English names, write a CSV
# edit plan.csv: set action to apply/skip, fix "proposed" if needed
music-rename apply plan.csv --dry-run # show what would change
music-rename apply plan.csv # rename
music-rename undo ~/Library/Application\ Support/music-rename/backups/<file>.jsonl
Review on / off
| review on (default) | review off | |
|---|---|---|
| Command | plan → edit CSV → apply |
run --no-review (or review = false) |
| Foreign, high confidence | apply | apply |
| Foreign, medium / low confidence | skip (decide in the CSV) | apply |
| Looks Japanese | skip | skip |
Even with review off a CSV record and a backup are written, so undo always works.
Try review on first: the Japanese/foreign guess is only a guess.
CSV columns
| column | meaning |
|---|---|
action |
apply or skip — edit this |
original |
current value in the library (do not edit) |
proposed |
new value — edit if you prefer another spelling |
confidence |
high / medium / low / none: how well the catalog artist's albums and songs match your library. A medium name is raised to high when one of your songs is credited to exactly the proposed English name in the catalog (iTunes source only; adds about 6 seconds per song checked) |
origin |
jp / foreign / unknown and origin_reason: why |
fields |
artist;album_artist for artist rows, name (song title) or album for title rows |
artist |
title rows only: the artist (after this apply) whose tracks are changed |
track_count, sample_albums, catalog_url, note |
context for your review |
How it decides
- Candidates: the katakana name is searched in the Japanese storefront with English
localization (
lang=en_us). Collaborations (A & B,A feat. B) are tried as a whole first (soサイモン&ガーファンクル→Simon & Garfunkel), then part by part. - Confidence: album and song titles of the candidate are compared with what is in
your library.
high= at least 1 album or 2 songs match. - Japanese or not: names with kanji/hiragana are Japanese. Otherwise MusicBrainz
(country
JP) and Japanese genres (J-Pop, Anime, ...) are used. Apple's catalog has no "country" field, so MusicKit does not improve this part. - Song and album titles: only for artists that MusicBrainz places outside Japan
(no Japanese genre, not in
[exclude]), so English-named Japanese acts keep their Japanese titles. The album is looked up in the Japanese and the English (verify_country) storefronts and each track is matched by its catalog ID, so translated titles that look nothing alike still match. Nothing is guessed: albums missing from the English store are left as they are. Needs the iTunes source; about 9 seconds per album the first time.
Configuration
See config.example.toml. Copy it to
~/.config/music-rename/config.toml. Useful settings:
[exclude] artists: names you never want renamed[overrides]: your own"カタカナ" = "English"dictionary (used before the APIs)
Apple Music API (optional)
- Create a MusicKit key in your Apple Developer account and download the
.p8file. - Set
[musickit] key_path,key_id,team_id(or theMUSIC_RENAME_MUSICKIT_*environment variables) and run with--source musickit.
The key stays on your machine; the developer token is generated in memory.
Notes and limits
- Speed: the iTunes Search API allows about 20 calls per minute, so the first run takes about 6 seconds per name. Results are cached for 30 days.
- iCloud Music Library: renamed Apple Music tracks kept their new names on the Mac and synced to iPhone in our tests, but Apple may change this behaviour.
- Smart playlists that filter on an artist name will need to be updated by hand.
- Sent to the APIs: artist names; album names of non-Japanese artists whose titles are Japanese (drop
nameandalbumfromfieldsto turn that off); up to two song titles permediumname when confirming it by song (verify_titles = 0turns that off). Nothing else from your library leaves your Mac.
Development
uv sync
uv run ruff check && uv run ruff format --check && uv run mypy && uv run pytest
MUSIC_RENAME_TEST_PID=<persistent id> uv run pytest -m music # touches one real track
uv run python scripts/smoke_live.py # checks the live APIs
Releasing
Bump version in pyproject.toml, commit, then push a matching tag (git tag v0.1.0 && git push origin v0.1.0). The Release workflow tests, builds and publishes to PyPI via Trusted Publishing.
License
MIT
Metadata
Release files for music-rename 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| music_rename-0.2.0.tar.gz | 37.3 kB | With provenance | Details for music_rename-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| music_rename-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for music_rename-0.2.0-py3-none-any.whl |
Total release size: 82.7 kB
Release files / music_rename-0.2.0.tar.gz
| Download URL | music_rename-0.2.0.tar.gz |
|---|---|
| Size | 37.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58ed8a8c11d8bdb4bc0a174bd555c13b9590cdaa67adc74b2bfee82663277a10
|
|
BLAKE2b-256 checksum How to use checksums |
eca608a46bf17a8f2e4f6aaf9b74efa34cdc999f2dd9551f681e68970ab558fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logRelease files / music_rename-0.2.0-py3-none-any.whl
| Download URL | music_rename-0.2.0-py3-none-any.whl |
|---|---|
| Size | 45.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1835acedd6a9d4d6a3a36aa7cfb2376b75cd1969b1ad1271ac78a33872c9f2c1
|
|
BLAKE2b-256 checksum How to use checksums |
842b891add225c59b611619620e1399f9775f748245837040a22a249192b3268
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logSecurity for music-rename 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for music_rename-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.