ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 jasonzh0

claudify

在 Claude Code 中使用 Spotify。连接你的账号,在工作阶段旁保留播放器侧栏,并通过 `/spotify` 或直接询问 Claude("put on some lofi focus music")控制播放。

已翻译

关于这个 mod

claudify

在 Claude Code 中使用 Spotify。在工作阶段旁保留播放器侧栏,并通过 /spotify 或直接询问 Claude("put on some lofi focus music")控制播放。

  • 带专辑封面(彩色块状艺术;不支持图形的界面使用 ASCII)的侧栏,显示标题、艺术家、专辑、实时进度条、队列和设备
  • 控件:播放/暂停、下一首/上一首、随机播放、重复播放、音量条、静音(侧栏获得焦点时可用按键 p n b s r m)
  • 音乐开始播放时自动打开
  • 背景可匹配你的终端(会检测 Ghostty)、专辑颜色,或任意十六进制颜色

播放控制需要 Spotify Premium;封面使用 macOS 的 sips。

安装

在终端中:

claude plugin marketplace add jasonzh0/claudify
claude plugin install claudify@claudify

也可以在 Claude Code 中执行:/plugin marketplace add jasonzh0/claudify,然后执行 /plugin install claudify@claudify。重启 Claude Code 以加载插件。

登录

/spotify login

浏览器会打开 Spotify 的授权页面;批准后即可连接。

内置的 claudify Spotify 应用处于 Spotify 的开发模式,只服务其所有者添加的账号(最多 25 个)。如果 Spotify 拒绝你的账号,可以请求加入,或使用自己的应用(大约一分钟,无数量限制):

  1. 在 https://developer.spotify.com/dashboard 创建应用
  2. 添加重定向 URI http://127.0.0.1:8888/callback,并勾选 "Web API"
  3. 执行 /spotify setup <client-id>,然后执行 /spotify login

整个流程都不涉及客户端密钥(Authorization Code with PKCE);令牌会保存在你电脑上的 Claude Code 插件存储中。

开发

使用 claude --plugin-dir /path/to/claudify 加载某个检出目录,而不是已安装的副本;或者在 ~/.claude/settings.json 的 env 块中设置 CLAUDE_CODE_PLUGIN_DIRS。

命令

/spotify                        open the player sidebar
/spotify play [query]           resume, or search a track and play it
/spotify playlist <query>       search a playlist and play it
/spotify pause | toggle | next | prev
/spotify vol <0-100> | mute
/spotify shuffle on|off | repeat off|context|track
/spotify bg terminal|none|album|#rrggbb
/spotify devices | now | close | logout | help
/spotify setup <client-id> | setup default

测试

claude plugin validate .
claude plugin test .

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add jasonzh0/claudify
claude plugin install claudify
原文 / README

claudify

Spotify inside Claude Code. Connect your account, keep a player sidebar next to your session, and control playback with /spotify or by asking Claude ("put on some lofi focus music").

  • Sidebar with album cover art (colored block art; ASCII on surfaces without graphics), title, artist, album, live progress bar, queue and device
  • Controls: play/pause, next/previous, shuffle, repeat, volume bar, mute (keys p n b s r m when the sidebar has focus)
  • Opens by itself when music starts
  • Background that matches your terminal (Ghostty detected), the album's color, or any hex color

Playback control needs Spotify Premium; cover art uses macOS's sips.

Install

In a terminal:

claude plugin marketplace add jasonzh0/claudify
claude plugin install claudify@claudify

or inside Claude Code: /plugin marketplace add jasonzh0/claudify, then /plugin install claudify@claudify. Restart Claude Code to load it.

Log in

/spotify login

Your browser opens Spotify's consent page; approve it and you're connected.

The built-in claudify Spotify app is in Spotify's development mode, which only serves accounts its owner has added (up to 25). If Spotify refuses your account, ask to be added, or use your own app (about a minute, no limit):

  1. Create an app at https://developer.spotify.com/dashboard
  2. Add the Redirect URI http://127.0.0.1:8888/callback and tick "Web API"
  3. /spotify setup <client-id>, then /spotify login

No client secret is involved anywhere (Authorization Code with PKCE); tokens stay in Claude Code's plugin storage on your machine.

Develop

Load a checkout instead of the installed copy with claude --plugin-dir /path/to/claudify, or set CLAUDE_CODE_PLUGIN_DIRS in the env block of ~/.claude/settings.json.

Commands

/spotify                        open the player sidebar
/spotify play [query]           resume, or search a track and play it
/spotify playlist <query>       search a playlist and play it
/spotify pause | toggle | next | prev
/spotify vol <0-100> | mute
/spotify shuffle on|off | repeat off|context|track
/spotify bg terminal|none|album|#rrggbb
/spotify devices | now | close | logout | help
/spotify setup <client-id> | setup default

Test

claude plugin validate .
claude plugin test .

更多类似作品