@kitsunekode/kunai
v0.2.5
Published
Terminal-first media streaming CLI that resolves provider streams and launches mpv.
Downloads
695
Maintainers
Readme
@kitsunekode/kunai
@kitsunekode/kunai is the published CLI package for Kunai.
Kunai is a terminal-first media tool that resolves provider streams and launches playback in mpv.
Requirements
mpvon yourPATH(required)yt-dlpon yourPATHwhen offline downloads are enabled (optional feature)ffprobefor optional verification of finished downloads only—not the downloaderchafafor poster previews (Sixel/ANSI fallback in non-Kitty terminals)- Kitty/Ghostty terminal for native Kitty poster previews (optional)
- ImageMagick (
magick) for Kitty/Ghostty non-PNG poster conversion (optional) - Discord desktop app for Rich Presence (optional; Kunai talks to local Discord IPC from Bun)
Poster subsystem and testing: repo root .docs/poster-image-rendering.md.
Install core tools:
# Linux (Arch)
sudo pacman -S mpv yt-dlp chafa imagemagick
# Linux (Debian/Ubuntu)
sudo apt install mpv yt-dlp chafa imagemagick
# macOS (Homebrew)
brew install mpv yt-dlp chafa imagemagickWindows options:
winget(recommended): installmpv,yt-dlp,chafa(winget install hpjansson.Chafa), and ImageMagick (winget install ImageMagick.ImageMagick); addffprobeseparately if you want post-download validation- Chocolatey:
choco install mpv yt-dlp chafa imagemagick - Scoop:
scoop install mpv yt-dlp chafa imagemagick
Install
npm install -g @kitsunekode/kunaiRun:
kunaiUseful Commands
kunai
kunai -a
kunai -S "Dune"
kunai -i 438631 -t movie
kunai --debug
kunai --setup
kunai --offlineDefault download path (when downloads are enabled):
- Linux:
~/.local/share/kunai/downloads(orXDG_DATA_HOME/kunai/downloads) - macOS:
~/Library/Application Support/kunai/downloads - Windows:
%LOCALAPPDATA%\kunai\downloads
Recommendation shortcuts:
# inside Kunai command palette
/recommendation
/downloadsDownload workflow shortcuts:
- From browse results, use
Ctrl+D//downloadto queue the selected result. - During playback or post-playback, use
d//downloadto queue the current stream. - Use
/downloadsto inspect active/failed/completed jobs and retry or cancel entries.
Playback recovery shortcuts:
- Use
r//recoverto refresh the current stream and resume. - Use
/recomputewhen provider/source inventory looks stale and cached provider memory should be bypassed. - Use
f//fallbackto try the next compatible provider. - Use
k//tracksto review source, quality, audio, hardsub, and subtitle options.
Diagnostics
- Use
--debugfor verbose logs - Use
--debug-jsonto write scoped JSONL diagnostics traces - Use
--debug-sessionfor a developer repro session with trace path and breakpoint guidance - Use
/ export-diagnosticsinside Kunai for a redacted report snapshot - Use
/ report-issueto export a redacted bundle and open a prefilled GitHub issue draft
Caveats
- Provider availability can drift over time
- Subtitle/source inventories vary by provider and title
- Kunai prioritizes deterministic recovery and diagnostics over opaque retries
Project
- Repository: https://github.com/kitsunekode/kunai
- Issues: https://github.com/kitsunekode/kunai/issues
