tagshelf
Sorts a music library by its tags, sets identical copies aside instead of deleting them, and can undo every run.
A command-line tool and terminal UI, written in Go, for Windows and Linux.
The terminal UI
Files that need a person get a terminal UI: fixing tags, MusicBrainz lookups, choosing which duplicate to keep. This is its Duplicates tab, with one track that exists twice, as a FLAC and an MP3. It's text, not a screenshot, and on a small screen it scrolls sideways.
tagshelf T:\Music library 345d9616
1 Home 2 Untagged 2 3 Duplicates 1 4 Library 5 Runs 6 Settings 7 Files
────────────────────────────────────────────────────────────────────────────────────────────────────
Duplicates (1 group to review)
Song Kind Copies Keeps
› Fixture Artist - Silence Café release-track 2 …bum (2001)\1-03 - Silence Café.flac
Fixture Artist - Silence Café release-track, 2 copies
★ library Fixture Album Artist\Fixture Album (2001)\1-03 - Silence Café.flac
FLAC lossless 8 kHz/16 0:01 Fixture Artist / Fixture Album / Silence Café
library Fixture Album Artist\Fixture Album (2001)\1-03 - Silence Café.mp3
MP3 8 kbps 8 kHz 0:01 Fixture Artist / Fixture Album / Silence Café
↑↓/n select k keeper enter resolve b keep both c confirm A all exact 1-7 tabs R reload ? h…
What it does
tagshelf sorts audio files into a music library by their tags. It moves each file to Artist\Album (Year)\NN - Title.ext.
Identical copies are set aside instead of deleted, and every move is recorded, so a run can be undone.
The command line is for running it. The terminal UI is for the files that need a person. It can also identify tracks by sound, handle cover art and build playlists.
Under the hood
- Static builds for Windows (amd64) and Linux (amd64 and arm64), with no C library needed.
- Never deletes an audio file. That is by design.
- Dry run first. See what a run would do before it moves anything.
- A database that migrates itself on upgrade, and keeps a backup of the old one.
- Filename collisions that differ only in letter case are handled.
- Characters Windows won't allow in names are replaced.
- CI on GitHub and checksummed releases.
Why I built it
I always want my music collection organized so that any music player can show me the info I want.
I listen to too much music to not care about how I keep my music collection. Plus it felt natural with all the music players I have built over the years to help me learn programming.
Those were player-api in Go, go-player, a PHP player, and a Rails/TypeScript version, built between 2018 and 2023. tagshelf is where that thread led.
Get it
The releases page has downloads for Windows and Linux, and every release is checksummed. The source is on GitHub.
tagshelf is MIT licensed, still in active development, and at version 0.x.