openaudio
v0.1.0
Published
Terminal listening app for streaming audio from YouTube, Twitch, X, and other yt-dlp-supported sites.
Maintainers
Readme
openaudio
Stream listening-first audio in the terminal from YouTube, Twitch, X, and other yt-dlp-supported sites.
It uses:
yt-dlpfor media extractionmpvfor the best playback experience when availableffplayas a fallback player
Features
- audio-first playback
- quiet, low-latency defaults
- clean interactive terminal UI
- YouTube search with a metadata-aware picker
- direct URL playback for Twitch, X, and other supported sites
- TypeScript codebase with explicit module boundaries
- live now-playing metadata from
mpvIPC - in-app seek, pause, and volume control
Requirements
Install yt-dlp and one player:
brew install yt-dlp mpv ffmpegmpv is strongly recommended. ffplay comes from ffmpeg.
Install
Local development:
npm install
npm run build
npm run startThis app's TUI runtime uses Bun through OpenTUI. node dist/index.js is not the correct launch command.
After publishing:
npm install -g openaudioUsage
Open the interactive prompt:
npm run startPlay a direct YouTube URL:
openaudio "https://www.youtube.com/watch?v=dQw4w9WgXcQ"Search YouTube from the CLI:
openaudio "boards of canada"Play a Twitch or X URL:
openaudio "https://www.twitch.tv/videos/123456789"
openaudio "https://x.com/i/status/123456789"Force a player:
openaudio --player mpv "burial archangel"Choose the search site explicitly:
openaudio --site youtube "four tet"Change result count:
openaudio --limit 15 "aphextwin"Doctor check:
openaudio --doctorNotes
- Search is YouTube-first in this version.
- Twitch and X are supported via direct URLs.
- You do not need to keep a browser tab open.
- Audio-only playback usually uses less bandwidth than full video playback.
Repo Layout
src/
cli/ argument parsing and help text
commands/ top-level commands like doctor
media/ yt-dlp search and media metadata normalization
opentui/ terminal UI, formatting, and theme
player/ mpv integration and playback state
utils/ process and terminal helpersThe intent is strict separation:
index.tsxboots the runtimemediaknows remote content shapeplayerknows local player behavioropentuionly handles terminal interaction and presentationutilsstays generic
TUI Controls
enter: run search or play selected itemtab: switch focusup/down: move resultsspace: pause/resumeleft/right: seek+/-: volumeq/x/ctrl+c: stop or quit
Publish
Before publishing, update the package metadata in package.json:
nameversionauthor
Then publish:
npm login
npm publishIf the package name is taken, rename it before publishing.
ytaudio is still exposed as a compatibility alias for local installs.
