Categorygithub.com/joshuathompson/baton
repositorypackage
0.0.0-20210908215037-e9c39842ec0e
Repository: https://github.com/joshuathompson/baton.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Baton

Baton is a CLI tool to manage Spotify playback and includes a TUI for searches

NOTE: You can't change songs, volume, etc without Spotify premium due to a limit on their web API

Install

Fetch the release for your platform from the following page. Use chmod to set permissions on your binary and move it to /usr/local/bin or equivalent.

Setup

Use the baton auth command to perform an initial setup. The command will take you through the process but you will need to login to the Spotify API dashboard, create an app, and set it up with a redirect URL of http://localhost:15298/callback.

This process will generate a long-lasting refresh token and ideally will never have to be repeated.

Usage

CLI Commands

CommandDescription
authauthorize Baton to access the Spotify Web API on your behalf
deviceslist all available playback devices
helphelp about any command
meCommands related to your profile (saved tracks, albums, playlists)
nextskip to next track
pausetoggle Spotify pause state
playplay top result for specified artist, album, playlist, track, or uri
prevskip to previous track
repeatget/set repeat mode
replayreplay current track from the beginning
searchsearch for specified artist, album, playlist, or track and select via interactive TUI
seekskip to a specific time (seconds) of the current track
shareget uri and url for current track
shuffletoggle shuffle on/off
statusshow information about the current track
transfertransfer playback to another device by id
volget/set volume

TUI Keybinds

KeybindDescription
hgo back one screen
jmove the cursor down a line
kmove the cursor up a line
lgo into playlist, album, or artist
pplay selected item
Enterplay selected item and quit
mload additional pages from search query
qquit
ssave or unsave the currently selected track or album

Building

To build the program, simply run make or make build, this will build for all 3 platforms (note: to do this on windows you'll need Make for windows). To build for one specific platform run make <platform> where platform is either "windows", "darwin" (for MacOS) or "linux". You can also run from source by running make run.

License

MIT

Credits

Baton is built using: