Beets is an incredible tool for organizing a local music library. It’s a little geeky, but does such a stellar job integrating metadata from MusicBrainz with auto-matching, album art, lyrics, etc. It supports deduplication, transcoding, and much more with plugins.

Anyone with an appreciation of local music and infra-as-code would be in paradise. I just hit over 10k songs, which is managed like a dream:

❯ beet stats
Tracks: 10008
Total time: 3.9 weeks
Approximate total size: 63.9 GiB
Artists: 2754
Albums: 2016
Album artists: 1280

Beets imports music, adding embedded lyrics/artwork and correct tags all automatically. But it also has a few useful commands I use variations of all the time:

  1. List entire library sorted by ascending bitrate:
    • beet ls -f '$bitrate $artist - $title' bitrate+
  2. Scan the library filesystem for additions/removals, update tags from MB:
    • beet update
  3. Using the plugin oldestdate, update the year field of Andrews Sisters tracks to the original recording year (~1940s rather than the remastered album date in the ~2000s):
    • beet oldestdate Andrews Sisters
  4. Set the genre of any track with field containing “celtic” to “Celtic”:
    • beet modify celtic genre="Celtic"
  5. Using the plugin smartplaylist, automatically update and export m3u playlists based on my config.
    • beet splupdate

Here is my entire beets config, including dynamic playlists:

directory: ~/Music/songs
library: ~/Music/beets.db
import:
  move: yes
  detail: yes
  write: yes
  # quiet_fallback: asis
  # duplicate_action: skip

paths:
  singleton: $artist/$title

plugins:
  - badfiles
  # - chroma
  # - convert
  - duplicates
  - embedart
  - fetchart
  - fish
  - info
  - inline
  - lastgenre
  - lyrics
  - mbsync
  - missing
  # - oldestdate
  - playlist
  - smartplaylist
  - thumbnails
  - random
  - describe

lastgenre:
  source: track
  force: no

item_fields:
  decade: str(year)[0:3]+"0s"

fetchart:
  maxwidth: 900

embedart:
  quality: 75

oldestdate:
  auto: no
  ignore_track_id: yes
  filter_on_import: yes
  prompt_missing_work_id: yes
  force: yes
  overwrite_year: yes
  filter_recordings: yes
  approach: "releases"

musicbrainz:
  searchlimit: 20
  genres: yes

# convert:
#   auto: no

lyrics:
  google_API_key: 'AIzaSyD_H92ZLd6syQ17JEBoiFQxXPgMM7TNLDA'
  sources: 'google genius tekstowo musixmatch'
  force: yes
  fallback: ''

acoustid:
  apikey: 5Mow8bcd6a

smartplaylist:
  auto: no
  relative_to: ~/Music/lists
  playlist_dir: ~/Music/lists

  playlists:
    - name: "1900s.m3u"
      query: 'added- year::(19[0-4][0-9]) ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba|Bluegrass|Cuban|Monk|Calypso|Baroque|Neofolk|Comedy|Koto|Chillout|Downtempo)", Louis Armstrong , Tony Benett , Bobby Darin , Carlos Antonio Jobim'

    # 1900 - 1970, includes Jazz
    # 1980-2010, does not include Jazz
    - name: "$decade.m3u"
      query: ['added- year::(19[5-7][0-9]) ^"genre::(Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba|Bluegrass|Cuban|Monk|Calypso|Baroque|Neofolk|Comedy|Koto|Chillout|Downtempo)"', 'added- year::(19[8-9][0-9]|20[0-9][0-9]) ^"genre::(Jazz|Classical|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Soundtrack|Tango|Italian|World|Tropical|Cuban|Reggae|Samba|Bluegrass|Cuban|Monk|Calypso|Baroque|Neofolk|Comedy|Koto|Chillout|Downtempo)"']

    - name: "Party like its 2012.m3u"
      query: year:2006..2012 ^"genre::(Jazz|Classical|Blues|Lo-Fi|Ambient|Opera|Salsa|Early Music|World Music|Bossa Nova|Celtic|Flamenco|Bitpop|Disco|Chillout|Downtempo|Soundtrack|Tango|Bluegrass|Italian|Oldies|World|Tropical|Cuban|Reggae|Samba|Classic\ Rock)"

    - name: "Adore Alliteration.m3u"
      query: ['genre::Hard\ Rock added-', 'Rock|Classic\ Rock', Jack White, Def Leppard, AC/DC, Rage Against the Machine , paris texas , well wasted, trails shake]

    - name: "Books & Tea.m3u"
      album_query: "Bach, Debussy, Mozart , Vivaldi"

    - name: "By The Pond.m3u"
      album_query: "Pomplamoose , The Avener , Dansu , HONNE , Anne Murray , The Doobie Brothers , Weezer island , slightly stoopid , george harrison , billy joel , hard day night , louis armstrong hello , Fleetwood Mac Dreams , chasing pirates , Parcels , john mayer new light , shura touch , vitor kley , that life unknown mortal, Forrest , arlo parks , disco yes , around the sun poolside , unknown mortal orchestra , Gorillaz, 'genre::Soft\ Rock', 'genre::Dream\ Pop'"

    - name: "Two Feets.m3u"
      query: "Two Feet, Adam Jensen, Arctic Monkeys, Gorillaz, Emmit Fenn, Ellise, Stellar, Dennis Lloyd , Sub Urban , Chloe Adams , one hope ghost , peach pit , elderbrook , the people thieves , joywave , UPSAHL , yeek"

    - name: "Bad Bunnies.m3u"
      query: "Bad Bunny, J Balvin willy william , lele pons , drinkee , matadora tukker , tukker swing  , mon cheri , kakee tukker, Arcángel"

    - name: "Piano.m3u"
      album_query:
        [
          'piano ^"genere::(Pop|Classic\ Rock)" ^"artist::(Billy Joel)"',
          "chopin, In the Mood for Debussy, the ultimate most relaxing new age music in the universe",
        ]

    - name: "Otherworldly.m3u"
      query: "relax with nature, symphonies of the planets"

    - name: "Swingtown.m3u"
      album_query: 'Parov Stelar , Nekta, Caravan Palace , Jamie Berry , Caro Emerald , Alice Francis , Paloma Faith , Sim Gretina , Waldeck , Soul Square , "genre::(Electro-Swing|Cabaret)" , Belleruche , Mr. Scruff , Tape Five , Jojo , Kormac , free the robots , ProleteR , Electric Swing Circus'

    - name: "Guitar and Tapas.m3u"
      album_query: ['guitar "genre::(Classical|Flamenco)"', "genre::(Flamenco)", "Gábor Szabó", Armik , Concha Buika , David De Alva , Gipsy Kings , Jesse Cook , Lhasa de Sela , Nicolas Hernandez , One Day Deep , Strunz & Farah , Maria Rita , Gotan Project, Gábor Szabó]

    #- name: "Christmas.m3u"
    #  query: "christmas , chimpmunk , smooth carols , reindeer , santa , happy holiday "

    - name: "Chill Dope.m3u"
      query: "'artist::(Men I Trust)' , nombe , title:Sadnecessary , waves probz ,  post malone - circles slowed , YAS empty crown, slenderbodies, Shura , BENEE , Magdalena Bay"

    - name: "Chill Hop.m3u"
      query: 'artist::(Jungle|Monsune|Cannons), Glass Animals, anderson .paak , duckwrth , easy life have a great day , softcore neighbourhood , christian kuria , b-ahwe, king mala , sad night dynamite , tanglewood , equation , nombe , paper idol hey you , griz keep, audrey nuna' # don't include Denzel curry with GA

    - name: "Calm Spirit.m3u"
      query: "Israel Kamakawiwoʻole, alturas, Yo-Yo Ma , Melody Gardot"

    - name: "Too Many Beaches.m3u"
      query: "bob marley , calvin harris 18 , Kauai , Edward maya , Jason Mraz , kala paper planes , stolen dance , artist:'will smith' , summertime ^'artist::(Billie Holiday)' , skizzy mars , miller the joker , miller airliner , artist::(^UB40$) , P.I.M.P , TaKillya , jimmy buffet , poolside , sun is shining , beach boys , American boy kanye , Martin Solveig , tieduprightnow , kid Francescoli , Dennis Lloyd , bad boy yung bae , girl like me black eyed peas , around the sun poolside , a good night john legend, like sugar chaka , castles paper idol , benee soaked , benee island , disfruto carla morrison , vallis alps , parra for cuva , silver linings easy life"

    - name: "Chortling Organs.m3u"
      query: "organ works"

    - name: "Spanish Succulents.m3u"
      query: "Lifescapes cancun , Lifescapes mexico , Lifescapes spanish , Lifescapes latin , Suzana Salles , just relax mexico"

    - name: "Bossa Nova.m3u"
      query: "Bossa nova"

    - name: "DXM Dumb.m3u"
      query: "yung gravy , womp womp , bbno$ , drugs tai , tyga , anaconda , joey purp , Aminé , Post Malone wow, faucet failure , saweetie , ceo@business.net"

    - name: "LSD & XTC.m3u"
      query: "Basshunter , deadmau5, Benny Benassi , AronChupa , The Chainsmokers , The Glitch Mob , Jamrock , Keys N Krates , I took a pill in ibiza , ODESZA , Redlight X Colour , GlitchHop , artist:'tove lo' , Tropkillaz , How to Be a Human Being life itself , SAINt JHN , Overmono , Bonobo , Romare gone ,  Caribou home , tones dance monkey , GOMF , Tiesto , ZHU , Music Sounds Better With You , The Glitch Mob , Galwaro , Fatboy Slim , The Prodigy , Calvin Harris , Daft Punk , The Blaze territory , kid Francescoli , nightswimX , Adam Jensen grudge , Lemaitre , Crypto faded , Airmow, big wild when I get there , mirror masa , moonlight Gaullin , daredevil 'artist::stellar' , 'artist::crypto' , going insane heuse , infinity ink , dancin aaron smith, rouge airmow , pon de replay ed marquis , ghosts jacob , little more love aj tracey , duke dumont , elderbrook , regard , sofi tukker , twocolors , good ones xcx , REZZ , frozen madonna , wolfe skeletons , zeds dead , carla morrison , emma peters , ya nina , astrality , SLH, volb3x, Camel Milk , mbnn, AREZRA , Night Club, Nicolar Jaar, Barış Çakır, party favor"

    - name: "Cyberpunk.m3u"
      query: "Gesaffelstein , DJ Hyper, REZZ spiral"

    - name: "Bear St.m3u"
      query: "Kygo , Tove Lo , K.Flay , All my friends , Tate McRae, Snakehips , Two Feet , 'artist::Stellar', Tokyo Project , moonlight Gaullin , james bond paper idol , Badunkadunk , Diana Goldberg , 2 man embassy , MORTEN beautiful heartbeat , surf mesa , taska black , mazde , coconuts kim petras, Lewis Ofman, mbnn , lucas estrada , charlie xcx , MIA GLADSTONE"

    - name: "Dance Mabye.m3u"
      query: "added- Doja Cat , Taylor Swift shake it off , Taylor Swift blank space , Badunkadunk , Drake hotline bling , why mona oops , rihanna music , bunny is a rider , rihanna , psycho mia"
      
    - name: "Reign.m3u"
      query: "Jack Johnson , Gordon Lightfoot , John Mayer battle studies , Sam Smith , norah jones sinkin soon , David Gray , Ed Sheeran lego , Wayne how to love , Michael Franti , probz waves , artist::(Passenger) , Melody Gardot , Milky Chance , sweater weather , Grape Soda, billie eilish bury a friend, billie eilish lost cause,  billie eilish happier than ever, biig piig , dodie"

    - name: "Autumn: Red Leaves and Streetlamps.m3u"
      query: "Vince Guaraldi, louis armstrong"

    - name: "Just Fine.m3u"
      query: "Norah Jones come away , willie nelson stardust , simon garfunkel , 'artist::(Carpenters)' , Anne Murray , Melody Gardot , bread diary , ella fitzgerald louis armstrong , james taylor , emily watts"

    - name: "Slut Pop.m3u"
      query: "added- Britney Spears , artist:DNCE , Carly Rae Jepsen, Justin Timberlake , Jennifer Lopez , Gwen Stefani , Fifth Harmony , Kat Dahlia , Katy Perry , Kesha , Meghan Trainor , Kylie Minogue , Madonna , Selena Gomez , Kim Petras , qveen herby , tove lo , poppy fashion , mistress violet , EMELINE , Cobrah"

    - name: "Rapsmiths.m3u"
      query: "Aesop Rock impossible , Eminem curtian call , j cole born sinner , Kanye West all falls , Kanye West my beautiful , Kendrick Lamar damn , The Notorious B.I.G , tierra wack"

    - name: "Ketamine Dreams.m3u"
      query: "Iron & Wine , John Mayer battle studies , Norah jones day breaks , Fleetwood Mac future , Melody Gardot , U2 Joshua Tree , massive attack , post malone - circles slowed , two feet bitch, two feet her life, palm reader dreamers"

    - name: "Happy in Havana.m3u"
      query: "Buena Vista Social Club , Cubanismo , Putumayo , Afro-Cuban , genre::(Cuban)"

    - name: "Time for Dessert.m3u"
      query: "Rabih Abou-Khalil , Uncharted , Niyaz , Azam Ali , Lebanese Blonde , Feast of Silence , Trio Globo"

    - name: "Jazz Minus People.m3u"
      query: "Contemporary Smooth Jazz , VooDooBop"

    - name: "Boîte de nuit.m3u"
      query: "L’Impératrice , Angèle , artist::(Paradis) , Claire Laffut , ELI ROSE , Dimie Cat , pomplamoose jean-marie , Stromae, mon cheri"

    - name: "French.m3u"
      query: "pomplamoose impossible , Édith Piaf , peyroux , Françoise Hardy"

    - name: "Golden 2000s.m3u"
      query: 'year:1998..2008 "genre::(Rap|Hip\ Hop)" ^"genre::(Classical)" ^"artist::(Aesop Rock)"'

    - name: "Headspace.m3u"
      query: "Alina Baraz , The Beatles tripper , The Beatles strawberry , Built On Glass , The Cure Lullaby , Dim Sum , Flock of Seagulls , K.Flay , Kendrick Lamar PRIDE , Lost Frequencies , Steve Baker , Mari Ferrari , 'artist:The Neighbourhood' , NoMBe , MGMT pretend , Rudimental , Snakehips , Snoop Dogg peaches , SoySauce , St. South , Kiiara , Prayer In C , Kygo , Faul, Wad Ad & Pnau , Tom Tom Club genius of love , Kali Uchis , kid Francescoli , La clé des champs, AViVA , Emeline , big wild when I get there , so high doja cat , she said big jet plane , brasstracks , emmit fenn , shura touch , two feet fire in my head , emmit fenn hollow , of the trees , my space robes , astrality"

    - name: "Evenings.m3u"
      query: "Chopin , yo-yo ma , James Galway "

    - name: "Folk.m3u"
      query: "'artist::(Bread|Carole King|^Chicago$|Jim Croce|John Denver|Patsy Cline|Simon & Garfunkel|James Taylor)'"

    - name: "Daffodils in my Dandruff.m3u"
      query: "The Supremes , Elvis Prestley ,  Forrest Gump , Everly Brothers , Lynyrd Skynyrd , The Mamas & The Papas , Mama Cass"

    - name: "Chalk.m3u"
      query: "OneRepublic , Paramore , Sublime , Hot Chelle Rae , Blink-182 , The Offspring , weezer , Radiohead , ZZ Top grange , 3 Doors Down , Heroic , keyframe , Gorillaz , Slightly Stoopid , Max Armfield , Smashing Pumpkins , March to the Grave , Banjax , Courtney Barnett, radiohead"

    - name: "Firmly Grasp It.m3u"
      query: "Allie X , good ones xcx , talk about me justin , enchanted waterfall , CloZee, roudeep , shallou , never dull , palms trax , tanglewood , equation , KastomariN , artist::Alef, Ozen Arslantas , Crisologo , PLÜM , Roudeep , grimes, forty cats, Nicolar Jaar"