skaldi

module
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2026 License: AGPL-3.0

README

Skaldi

CI Release Go Report Card

Self-hosting network jukebox. Single Go binary, web UI, auto-provisions dependencies.

Install

# macOS
brew install mpv ffmpeg

# Arch
sudo pacman -S mpv ffmpeg avahi

# Debian/Ubuntu
sudo apt install mpv ffmpeg avahi-utils

Build & Run

Requires Go 1.26 or later.

Primary CI and release builds track the latest stable Go automatically.

go build -o skaldi ./cmd/skaldi
./skaldi

First run auto-installs uv, bun, yt-dlp to ~/.cache/skaldi/.

macOS Compatibility

Mainline builds use the latest stable Go toolchain and support macOS 12 Monterey or newer.

Release builds also publish separate legacy assets for macOS 11 Big Sur:

  • skaldi-darwin-amd64-macos11
  • skaldi-darwin-arm64-macos11

Those legacy darwin assets are built with Go 1.24.13 only during the release build path, so day-to-day development and CI stay on the latest Go.

Features

  • Queue: YouTube URLs, direct file uploads (drag-drop or paste)
  • Search: YouTube + YouTube Music with autocomplete
  • External Library: OpenSubsonic personal library integration
  • Sync: Real-time SSE state updates
  • Discovery: Auto-registers as skaldi.local via mDNS
  • Audio: Dynamic range compression via dynaudnorm

Config File (OpenSubsonic)

Create config.json at:

  • Linux/macOS default: ~/.config/skaldi/config.json
  • Or ${XDG_CONFIG_HOME}/skaldi/config.json

Example:

{
  "opensubsonic": {
    "enabled": true,
    "library_id": "personal",
    "base_url": "https://navidrome.example.com",
    "username": "alice",
    "token": "server_token_secret",
    "timeout_ms": 2500
  }
}

Notes:

  • Missing/empty config disables external search silently.
  • Invalid enabled config fails fast on startup.
  • External cover art is deferred in v1; placeholder thumbnails are shown.

API

Method Path Description
GET / Web UI
GET /events SSE stream
GET /suggest?q={query} Autocomplete suggestions
GET /search?q={query}&mode=typeahead Text suggestions + external track hits
GET /search?q={query}&mode=full Merged track search (OpenSubsonic + YT Music + YouTube)
POST /queue Add URL {"url":"..."}
DELETE /queue/{index} Remove item
POST /playback Control {"action":"pause\|resume\|skip\|previous\|play"}
POST /upload File upload (multipart/form-data)

/search response shape:

{
  "suggestions": ["query text", "another"],
  "tracks": []
}

Security

No authentication. Exposing to the internet allows arbitrary uploads and RCE via media parsers. Run only on trusted networks.

Development

just all    # lint, test, build
just lint   # gofmt, golangci-lint, go vet
just test   # go test -v -race ./internal/...
just vuln   # govulncheck
just release-build  # latest artifacts + legacy macOS 11 darwin artifacts

See AGENTS.md for architecture guidelines.

License

AGPL-3.0 - See LICENSE

Directories

Path Synopsis
cmd
skaldi command
internal
bootstrap
Package bootstrap handles dependency provisioning and configuration management.
Package bootstrap handles dependency provisioning and configuration management.
discovery
Package discovery handles mDNS service registration for local network discovery.
Package discovery handles mDNS service registration for local network discovery.
player
Package player manages the mpv media player process and IPC communication.
Package player manages the mpv media player process and IPC communication.
resolver
Package resolver extracts media metadata using yt-dlp.
Package resolver extracts media metadata using yt-dlp.
server
Package server provides HTTP handlers and SSE broadcasting for the jukebox API.
Package server provides HTTP handlers and SSE broadcasting for the jukebox API.
Package web embeds the frontend UI assets.
Package web embeds the frontend UI assets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL