← Catalog

@heohlee/pi-yt

Browse and play YouTube from Pi and Gentle Shell: your likes, history, recommendations and playlists through your browser session, played with mpv and yt-dlp.

Extension

Install

Install with PiG

pig install npm:@heohlee/pi-yt

Install with Pi

pi install npm:@heohlee/pi-yt
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.

pi-yt

Play your YouTube library from Pi through the YouTube session already open in your browser.

CI Security npm License: MIT

The /yt overlay playing a track: sources on the left, tracks on the right and the player at the bottom

How it works

pi-yt does not talk to YouTube itself; it drives yt-dlp and mpv:

  1. yt-dlp reads your library with --cookies-from-browser from the profile you picked, 50 tracks at a time.

  2. mpv plays the audio in the background. pi-yt resolves each stream with yt-dlp before handing it over, and resolves the next tracks ahead of time so they start without waiting.

  3. pi-yt controls mpv over its IPC socket, and the status line listens to the same socket, so it keeps showing what is playing after you close the overlay:

    ♪  Bôa - Duvet (Official Video) · 0:21/3:33
    

Features

  • Overlay: Recommended, History, Watch later, Liked videos, Playlists, the queue and search
  • Firefox, Zen, Chromium, Chrome, Brave and Helium profiles, or no account to only search.
  • Play all, shuffle, queue, seek and volume.
  • Full mouse support
  • Status line in Pi's status bar.
  • Guided setup: if yt-dlp or mpv is missing, /yt installs the official yt-dlp release (verified by SHA-256) and tells you how to install mpv; it also offers yt-dlp updates.

Requirements

Install

Pi

pi install npm:@heohlee/pi-yt

From GitHub

pi install git:github.com/heohlee/pi-yt

Try it without installing

pi -e npm:@heohlee/pi-yt

Gentle Shell

These commands also work in Gentle Shell: use gentle-shell <command> in place of pi <command>.

Usage

Run /yt and pick the browser where you are signed in to YouTube:

The connect screen listing browser profiles, with Continue without an account

KeyAction
tabswitch pane
enteropen, play from the selected track, play all, shuffle
aadd to the queue
spaceplay / pause
n / pnext / previous track
. / ,forward / back 5 seconds
+ / -volume
/search
rreload the list

Privacy

  • Cookies are read by yt-dlp only, never copied, logged or stored; ~/.config/pi-yt/config.json keeps only the browser and profile.
  • Search does not send your cookies.
  • /yt is a command, not an agent tool: your history never reach the model.
  • The yt-dlp update check is one anonymous request to GitHub at most once a day, only for the copy /yt installed.

Contributing

Read CONTRIBUTING.md for the issue-first workflow, development checks and pull request conventions.

License

MIT