Yet another open-source Spotify client, written in Go.
Create a config.yml
file containing:
device_name: go-librespot
credentials:
type: interactive
Then run (or grab a prebuilt binary from the releases page):
go run ./cmd/daemon
Follow the instructions on the console for completing authentication and the new device should appear in your Spotify Connect devices.
Alternatively, you can use the Zeroconf mode:
device_name: go-librespot
credentials:
type: zeroconf
The daemon offers an API to control and/or monitor playback.
To enable this features add the following to your config.yml
file:
server:
enabled: true
port: 3678
For API documentation see here.
The daemon can be easily built with:
go build -o go-librespot-daemon ./cmd/daemon
To crosscompile for different architectures the GOOS
and GOARCH
environment variables can be used.
To recompile protobuf definitions use:
protoc --go_out=proto --go_opt module=github.com/devgianlu/go-librespot/proto -I proto proto/*.proto