27 Home
abs3nt edited this page 2023-01-30 07:50:17 -08:00

Installation

Arch (AUR)

releases: yay -S gospt

git: yay -S gospt-git

NetBSD (Official Repositories)

pkgin install gospt

From Source

To build from source a Makefile is provided:

make build && sudo make install

From Releases

Download the most recent binary from releases and copy it to somewhere inside your PATH

Completion scripts are also provided with gospt_yourshellname, download your relevant completion file and place it in your shells completion directory.

Completions

gospt completion bash/zsh/fish

then copy completions to your shells completions directory:

zsh: /usr/share/zsh/site-functions/_gospt

fish: /usr/share/fish/vendor_completions.d/gospt.fish

bash: /usr/share/bash-completions/completions/gospt

Configuration

you will need a spotify developer application. Go here to create one https://developer.spotify.com/dashboard/applications. you will need the client ID and a client secret from your application. Once your application is created set your redirect uri like this:

http://localhost:8888/callback

add your client_id and client_secret to ~/.config/gospt/client.yml like this

client_id: "idgoeshere"
client_secret: "secretgoeshere"
port: "8888"

if you dont want to store your secret in the file in plaintext you can use a command to retreive it:

client_secret_cmd: "secret spotify_secret"

you should have either client_secret or client_secret_cmd

For any configuration value you can also use environmental variables instead. client_id in the config file would be CLIENT_ID env for example.

Usage

TUI

gospt

thats it just run that

CLI

Usage:
  gospt [command]

Available Commands:
  clearradio  Wipes the radio playlist and creates an empty one
  devices     Prints out devices
  help        Help about any command
  like        Likes song
  link        Print link to currently playing song
  mute        mutes playback
  next        Skip to next song
  nowplaying  Shows song and artist of currently playing song
  pause       Pauses spotify
  play        Plays spotify
  playurl     Plays song from provided url
  previous    goes to previous song
  radio       Starts radio
  refillradio Refills the radio
  repeat      Toggles repeat
  seek        seek forward/backward or to a given second
  setdevice   Shows tui to pick active device
  shuffle     Toggles shuffle
  status      Returns player status in json
  toggleplay  Toggles the play state of spotify
  tracks      Opens saved tracks
  tui         Default command, launches the main menu
  unlike      unlikes song
  unmute      unmutes playback
  volume      sets the volume

Use "gospt [command] --help" for more information about a command.
use "gospt --help" to see this page

Examples

gospt volume up increases the volume by 10

gospt seek forward fast forwards the song 10 seconds

gospt like likes the currently playing song saving it to your library

gospt radio starts the gospt radio based on the currently playing song

gospt refillradio deletes all played songs from the radio and fills it with new ones

Add Ons

tmux plugin

FAQ

Does gospt stream music or do I need to run a Spotify client separately?

Yes you need to run a Spotify client such as spotifyd, librespot or the official Spotify client.

Do I need Spotify premium?

Yes.

Common Problems

Error trying to play

Make sure you have a device selected by pressing d while viewing the TUI or by running gospt selectdevice and choosing a device.

No devices are showing in the device menu

Make sure your client is running.

I can't stream to my chromecast or other device

If you would like to use one of these devices as your client you must first select it on your mobile phone or using the official Spotify client. After it is selected as your playback device it will be controllable via gospt and show up in your device menu.