百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

baton

> 编程语言
开源

CLI 可用于管理 Spotify 播放

199 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

CLI 可用于管理 Spotify 播放

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://127.0.0.1:15298/callback.

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

Usage

CLI Commands

Command Description
auth authorize Baton to access the Spotify Web API on your behalf
devices list all available playback devices
help help about any command
me Commands related to your profile (saved tracks, albums, playlists)
next skip to next track
pause toggle Spotify pause state
play play top result for specified artist, album, playlist, track, or uri
prev skip to previous track
repeat get/set repeat mode
replay replay current track from the beginning
search search for specified artist, album, playlist, or track and select via interactive TUI
seek skip to a specific time (seconds) of the current track
share get uri and url for current track
shuffle toggle shuffle on/off
status show information about the current track
transfer transfer playback to another device by id
vol get/set volume

TUI Keybinds

Keybind Description
h go back one screen
j move the cursor down a line
k move the cursor up a line
l go into playlist, album, or artist
p play selected item
Enter play selected item and quit
m load additional pages from search query
q quit
s save 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 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:

  • Cobra
  • Gocui

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言