Skip to content

devgianlu/go-librespot

Repository files navigation

go-librespot

Yet another open-source Spotify client, written in Go.

Trying it out

Create a config.yml file containing:

device_name: go-librespot
credentials:
  type: user_pass
  user_pass:
    username: "<username>"
    password: "<password>"

Then, run:

go run ./cmd/daemon

The new device should appear in your Spotify Connect devices.

API

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.

Building

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.

Development

To recompile protobuf definitions use:

protoc --go_out=proto --go_opt module=go-librespot/proto -I proto proto/*.proto