Crates.io | musicd |
lib.rs | musicd |
version | 0.1.2 |
created_at | 2025-08-30 23:25:37.932656+00 |
updated_at | 2025-08-31 11:00:00.549209+00 |
description | Portable file-based headless music player daemon for devs |
homepage | |
repository | https://github.com/itsKaynine/musicd |
max_upload_size | |
id | 1818019 |
size | 358,109 |
Portable file-based headless music player daemon for devs
You can download pre-compiled binaries from the releases page and add the binary to your PATH
environment variable.
Alternatively, you can install musicd
using Cargo, Rust's package manager.
cargo install musicd
To start the daemon and server:
musicd start
Open the Web UI at http://localhost:8371
# Get status
musicd status
# List jobs
musicd jobs
# Publish playlist
musicd publish --name="My Playlist" --downloader="yt-dlp" -- <url_1> <url 2>...
# Clean unused files and directories
musicd clean
# Play
musicd play
# Pause
musicd pause
# Previous track
musicd prev
# Next track
musicd next
# Seek to position
musicd seek <secs>
# Set volume
musicd volume <value>
# Switch to a playlist id
musicd playlist <id> [--mode=queue|skip>]
# Switch to a track index
musicd track <idx>
To specify remote URL use the host
argument:
musicd status --host="http://<remote_ip>:8371"
See help
for complete usage:
musicd help
musicd playlist --help
Create settings.json
in a working directory:
{
"environment": "local",
"data_dir": "./data",
"server": {
"host": "0.0.0.0",
"port": 8371
},
"manifest": {
"enable": false,
"url": "http://localhost:5128/manifest.json",
"check_interval_secs": 900
},
"player": {
"auto_play": true,
"default_audio_effects": true
},
"publish": {
"auto_set_playlist": false
},
"job": {
"max_late_secs": 10
},
"downloader": {
"default": "yt-dlp",
"yt_dlp": {
"path": "yt-dlp"
}
}
}
Create jobs.json
in the data directory (eg. ./data/jobs.json
).
You can schedule playlists, such as setting Christmas music to play on Christmas Eve every year.
[
{
"id": "christmas",
"run_at": "2025-12-24T00:00:00+00:00",
"repeat": "yearly",
"method": "POST",
"url": "http://localhost:8371/playlist/c679006c-c195-4934-bb5a-7948f4b56209",
"body": {"mode": "skip"}
}
]
Field | Type | Required | Description |
---|---|---|---|
id |
string |
Yes | Unique identifier for the job. Useful for tracking and updating jobs. |
run_at |
string (ISO date) |
Yes | The initial date and time when the job should first run. Must be in ISO 8601 format with timezone. |
repeat |
string | object |
No | Defines the repeat schedule. Can be a template ("daily" , "weekly" , etc.) or an object with frequency and every . |
end_repeat |
string (ISO date) |
No | The date and time after which the job stops repeating. If omitted, the job repeats indefinitely. |
method |
string |
Yes | HTTP method to use when executing the job (e.g., GET , POST , PUT , DELETE ). |
url |
string (URL) |
Yes | The target URL to send the request to. |
body |
object |
No | Optional request body. Typically used with POST or PUT . |
You can use one of the predefined repeat templates:
daily
weekdays
weekends
weekly
biweekly
monthly
yearly
If you need more control, you can define your own frequency with a repeat object.
Supported base frequencies are:
daily
weekly
monthly
yearly
For example, to repeat every 3 days:
[
{
"id": "christmas",
"run_at": "2025-12-24T00:00:00+00:00",
"repeat": {"frequency": "daily", "every": 3},
"method": "POST",
"url": "http://localhost:8371/playlist/c679006c-c195-4934-bb5a-7948f4b56209",
"body": {"mode": "skip"}
}
]
By default, a job repeats indefinitely.
To stop at a certain point, add the end_repeat
field:
[
{
"id": "christmas",
"run_at": "2025-12-24T00:00:00+00:00",
"repeat": "yearly",
"end_repeat": "2030-01-01T00:00:00+00:00",
"method": "POST",
"url": "http://localhost:8371/playlist/c679006c-c195-4934-bb5a-7948f4b56209",
"body": {"mode": "skip"}
}
]
data/
playlists/
2025-08-My_Mix_abcd1234/
001-Track.m4a
...
playlist.json
tmp/
db/
We welcome contributions from the community. To contribute to musicd
, please follow these steps:
musicd
is dual licensed under the MIT License and Apache-2.0 License. See the LICENSE-MIT and LICENSE-APACHE-2.0 files for more information.