Muco is simple command line tool I made to make my life easy with copying music around. Plug in the external flash drive(s), and ask muco nicely, it will synchronize your local library with the external storage, while automatically converting to any specific audio format if configured accordingly.

Why Muco

Lets say you an audio system in your car that takes a USB drive, another Bluetooth speaker which, again, takes a USB drive. You also have two Android phones lying around. Copying music to all of them manually is a waste of time. Muco will do that for you.

I do not use any music streaming services, as I prefer to keep my audio sources at hightest quality. So my local library has some lossless audio files as well. But my car audio accepts only mp3. Before muco, I would first copy all the mp3 files, and then convert the flacs and copy them to the USB storage manually. Not any more!

I'm sure this can be done with some simple shell scripts, but I took the opportunity to improve my skills in Rust. So here we are.

Installation

Muco currently works only on a Linux based OS. I have no intention of adding windows support, but feel free to do so, I'll take it in.

First, install Rust:

curl https://sh.rustup.rs -sSf | sh

Now clone the repository and get inside:

https://gitlab.com/aurabindo-public/muco.git
cd muco

Now its time to compile it:

cargo build --release

It will take a while when you run this first. So give it a short while. Once done, install it with:

cargo install

Usage

Its pretty straight forward to use, albeit some unpolished areas do exist.
A big limitaion at the moment is that Muco only supports one central library on your computer. All the audio files must be in this directory.

First, navigate to the location where your music is stored, and initialize muco there.

cd ~/Where/you/music/is
muco library init

Now its time to tell muco about your devices.

muco device add --name TheName --format mp3 --location /media/username/mountpoint/music

For format, you can specify more if your player will support, like --format mp3 flac aac wma. location is where your device will be mounted on your system. You might optionally want to have your stuff go in to a subdirectory in there. There are no additional prefix options at the moment, so give it here.

Now you just need to do

muco device sync

Now when more songs are added to your library, you need to tell muco

muco library update

Do the device sync again, and all your files shall be copied, after conversion, if necessary. If you have mutliple device initialized and only need to update specific ones, pass in the name like --name TheName to muco device sync

In case any files are missing in your external storage, muco will automatically sync them.