Musictl
Music control CLI for MPD + beets. Manage your library, playlists, and playback from the terminal.
Prerequisites
- Python ≥ 3.13
- MPD — running and configured
- beets — with library database and custom fields (
folder,playlists,comments) - YAD — for interactive dialogs (
update,delete-current) - FFmpeg — for
cue-split
Beets Setup
Musictl expects these beets flexible attributes:
folder— organizes tracks into directories (also synced togenre)playlists— comma-separated playlist namescomments— synced toplaylists:$playlistsfor external readers
Beets path config should include:
paths:
"folder::.+": $folder/$artist - $album - $track - $title
default: inbox/$genre/$artist - $album - $track - $title
Installation
# From PyPI
uv tool install musictl
# Or from source
git clone https://github.com/A/musictl
cd musictl
uv tool install -e .
Commands
| Command | Description |
|---|---|
musictl search <query> |
Search beets library, print relative paths |
musictl play <playlist> |
Load and play a playlist |
musictl play --random [--count N] |
Play N random tracks |
musictl update |
Set folder/playlists on current track via YAD dialog, remove from queue |
musictl delete-current |
Delete current track from library and disk, remove from queue |
musictl clean-current |
Remove current track from MPD queue |
musictl import [args] |
Import tracks via beet import |
musictl cue-split <file> --cue <cue> |
Split audio file by CUE sheet |
musictl generate-playlists |
Regenerate all .m3u playlist files |
musictl rename-playlist <old> <new> |
Rename a playlist across all tracks |
musictl rename-folder <old> <new> |
Rename a folder, move files, update tags |
musictl waybar |
JSON output for waybar custom module |
Piping
# Search and play results
musictl search 'artist:Beatles' | musictl play
# Search and play from a specific folder
musictl search 'folder:rock' | musictl play
Waybar Integration
Add to your waybar config:
"custom/music": {
"exec": "musictl waybar",
"interval": 5,
"return-type": "json"
}
Hyprland Keybindings
bind = $mainMod, M, exec, musictl play --random --count 20
bind = $mainMod SHIFT, M, exec, musictl update
bind = $mainMod CTRL, M, exec, musictl delete-current
Development
just check # ruff check + basedpyright
just fmt # ruff fix + ruff format
just test # run tests
just sync # uv sync dependencies
Metadata
Release files for musictl 0.2.2
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 |
|---|---|---|---|---|
| musictl-0.2.2.tar.gz | 64.7 kB | Without provenance | Details for musictl-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| musictl-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for musictl-0.2.2-py3-none-any.whl |
Total release size: 86.0 kB
Release files / musictl-0.2.2.tar.gz
| Download URL | musictl-0.2.2.tar.gz |
|---|---|
| Size | 64.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a1b8e941bdcb81bbafaaf2b3038839fad58e856ff0a1f4d15ed6676e4c4d874
|
|
BLAKE2b-256 checksum How to use checksums |
8dba34b3c86807e45a03b645b615ccbb7c60fa69cbcf964a4897e52101c22b40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / musictl-0.2.2-py3-none-any.whl
| Download URL | musictl-0.2.2-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28afeabc0ce74df0bbb82917af792e2ba85bbe0ad88bff502295d7c9d8557e3a
|
|
BLAKE2b-256 checksum How to use checksums |
18d9dd27dec69f8555e90311fdea0043c28dcd01eb6e735c832ebca006c10b78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for musictl 0.2.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.