A dynamic and extensible music library organizer

Updated 2017-09-03


Demlo organizes your music library automatically and dynamically. It runs a chain of user-defined Lua scripts using variables such as tags and file properties. This way it yields virtually unlimited customization power to the user.


Here follows a sample output showing the ‘before-after’ differences.

$ demlo fantasie_impromptu.flac
:: Load config: /home/johndoe/.config/demlo/demlorc
:: Load script: /usr/share/demlo/scripts/tag.lua
:: Load script: /usr/share/demlo/scripts/sub.lua
:: Load script: /usr/share/demlo/scripts/case.lua
:: Load script: /usr/share/demlo/scripts/punctuation.lua
:: Load script: /usr/share/demlo/scripts/encoding.lua
:: Load script: /usr/share/demlo/scripts/path.lua
:: Load script: /usr/share/demlo/scripts/cover.lua
:: Load script: /home/johndoe/.config/demlo/scripts/lossy.lua
==> fantasie_impromptu.flac

                                               === FILE         ===
         [/home/johndoe/fantasie_impromptu.flac] | path         | [/home/johndoe/music/Chopin/The Best Ever Piano ]
                                                 |              | [Classics (John Doe, 2014)/Fantasie-Impromptu in]
                                                 |              | [ C Sharp Minor, Op. 66.ogg]
                                          [flac] | format       | [ogg]
                                [bitrate=320000] | parameters   | [[-c:a libvorbis -q:a 10]]
                                               === TAGS         ===
            [john doe's classical collection II] | album        | [John Doe's Classical Collection II]
                                              [] | album_artist | [Chopin]
                                              [] | artist       | [Chopin]
                                        [chopin] | composer     | []
                                    [02/13/2014] | date         | [2014]
                                      [Classics] | genre        | [Classical]
                                     [John_Doe ] | performer    | [John Doe]
   [Fantasie-Impromptu in c sharp MInor , Op.66] | title        | [Fantasie-Impromptu in C Sharp Minor, Op. 66]
                                               === COVERS       ===
                  ['cover.jpg' [500x500] <jpeg>] | external     | [/home/johndoe/music/Chopin/The Best Ever Piano ]
                                                 |              | [Classics (John Doe, 2014)/Cover.jpg]


Demlo can address any of these recurring music library issues (and much more):


A few scripts are provided by default. They give a good example of the possibilities offered by Demlo. Pick which one to load by default, rewrite some of them, or write new ones from scratch. You can preview changes to make sure everything looks satisfactory.

Call Demlo over a complete music library and it will process everything in one single run.

Scripts can be chained: this feature makes Demlo extremely flexible and powerful.


See the development page.


See demlo -h and the manual.


See the LICENSE file in the source code.

The Go rewrite

Demlo used to be written in pure Lua. This has led to numerous issues, such as poor parallelism, slow processing, unreliable dependencies, race conditions, clunky network support and broken unicode support.

Starting from version 2 onward, the core has been rewritten in Go to address all these issues. Many changes have been undertaken in the process:

Compatibility notice

User scripts still rely on input and output only. These structures have remained identical but for a few elements:

The Lua patterns of the string library have been replaced by Go regexps.