ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 Unayung

yt-control

cliamp를 기반으로 한 YouTube 플레이어를 Claude Code 안에 넣습니다. 재생 제어, 현재 재생 정보, 썸네일과 재생 목록을 제공합니다.

Unayung@Unayung

Unayung/cc-mods-youtube/tree/main/plugins/yt-control

원본 게시물 이미지1
번역 완료

이 mod 소개

yt-control은 cliamp를 기반으로 터미널에 YouTube 플레이어를 내장하는 Claude Code 플러그인입니다. /yt playlist <URL>로 재생 목록을 불러오고 /yt, /yt prev, /yt next, /yt show로 재생을 제어합니다. Now playing 패널에 제목, 아티스트, 진행률, 터미널로 그린 썸네일, 클릭 가능한 대기열을 표시하며 /config에서 배치 4종과 아이콘 스타일 3종을 설정할 수 있습니다. Claude Code 2.1.288+, cliamp v2.2+, yt-dlp가 필요하고 cc-mods-youtube 마켓플레이스에서 설치할 수 있습니다. MIT 라이선스입니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add Unayung/cc-mods-youtube
claude plugin install yt-control
원문 / README

yt-control

A YouTube player inside Claude Code, built as a Claude Code mod and backed by cliamp.

Load a YouTube playlist with one command and control it without leaving the terminal. cliamp plays the audio, so no browser tab is needed.

yt-control: the Now playing pane with thumbnail, controls and queue beside a Claude Code session

  • Previous / play-pause / next controls
  • Now playing: title, artist, progress
  • The video thumbnail, drawn in the terminal (kitty graphics terminals)
  • The whole playlist in a pane; click a track to play it
  • Four placements and three icon styles, picked in /config

Requirements

| What | Why | Install | |---|---|---| | Claude Code 2.1.288 or newer | runs the mod (function hooks) | claude update | | macOS or Linux | the mod shells out to sh, curl and an image converter | | | cliamp v2.2 or newer | plays the audio; the mod drives it over cliamp remote | see cliamp's README; cliamp upgrade if you already have it | | yt-dlp | cliamp uses it to resolve YouTube URLs | brew install yt-dlp, pacman -S yt-dlp, pipx install yt-dlp | | curl | downloads the thumbnail | usually preinstalled | | sips (macOS, built in) or ImageMagick (Linux) | converts the thumbnail to PNG | pacman -S imagemagick, apt install imagemagick | | A terminal with the kitty graphics protocol (kitty, Ghostty, WezTerm) | draws the thumbnail | optional; other terminals show the title instead |

When cliamp or yt-dlp is missing or cliamp is too old, the pane and /yt say what to install. Install it and run /yt again; no restart needed.

Install

claude plugin marketplace add Unayung/cc-mods-youtube
claude plugin install yt-control@cc-mods-youtube

Then start a new Claude Code session. The install may say that some options are not set yet; all have defaults, so this is safe to ignore.

Use

/yt playlist <YouTube URL>   load a playlist (or a single video) into cliamp and play it
/yt                          play / pause
/yt prev   /yt next          previous / next track
/yt show                     open the Now playing pane

If the cliamp daemon is not running, /yt playlist starts it in the background. You can also run cliamp's own TUI in another terminal; the mod talks to the same socket.

YouTube Mix links (watch?v=...&list=RD...) work as well as regular playlists.

The pane

[thumbnail]
Title
Artist · 1:05 / 3:34
⏮️ ⏸️ ⏭️

🎵 Queue · 20
1. A track            ← click to play
▶️ 2. Playing now
3. Next track

The thumbnail follows the pane's width. Focus the pane with ctrl+x tab; then b / p / n press previous / play-pause / next, and the arrow keys scroll the queue.

Settings

Open /config and look for yt-control:

| Option | Values | Default | |---|---|---| | Player position | above-prompt: a band with buttons above the prompt<br>pane: the Now playing pane with thumbnail and queue<br>prompt-hint: text after the hint line under the prompt<br>status: a status line | above-prompt | | Icon style | emoji, nerd (needs a Nerd Font), unicode | emoji | | Stop music on exit | stop cliamp when you leave Claude Code (/exit, ctrl+c, closing the terminal); /clear and switching sessions keep it playing. Turn it off if you run cliamp on its own | on |

/yt show opens the pane whatever the position is.

Troubleshooting

The thumbnail shows as the video title in grey text. Claude Code did not detect kitty graphics support. Inside a terminal multiplexer (tmux, zellij, herdr) this is expected even when the outer terminal supports it. If your multiplexer passes kitty graphics through, force it on in ~/.claude/settings.json:

{ "env": { "CLAUDE_CODE_FORCE_TERMINAL_IMAGES": "1" } }

/yt playlist briefly plays something else first. A freshly started cliamp daemon resumes the last track it played; the mod replaces the queue right after.

cliamp is not installed although it is. The mod looks in your PATH plus ~/.local/bin, /opt/homebrew/bin and /usr/local/bin. If cliamp lives elsewhere, add its directory to PATH for the process that starts Claude Code.

The pane does not appear on its own. A pane opened at startup only shows when the terminal is at least 144 columns wide. Run /yt show.

Uninstall

claude plugin uninstall yt-control@cc-mods-youtube
claude plugin marketplace remove cc-mods-youtube

Thumbnails are cached in /tmp/yt-control-art/.

How it works

The mod polls cliamp remote state every 2 seconds and reads the queue with cliamp remote call queue.list when the playlist changes. Controls call cliamp prev|toggle|next; clicking a track calls queue.play with its index. Loading runs queue.clear then url.load. Thumbnails come from i.ytimg.com by video id.

The band, pane and status line are drawn in the terminal only; the mod adds nothing to the system prompt and registers no tool for the model. The one-line reply of a /yt command (for example ▶️ Artist - Title) is an ordinary command output line in the transcript.

Development

claude --plugin-dir plugins/yt-control     # load from this checkout
claude plugin validate plugins/yt-control
claude plugin test plugins/yt-control

License

MIT

비슷한 프로젝트