A simple command-line tool for searching YouTube, powered by the ytsearch.js library. It lets you search for videos, channels, and playlists directly from your terminal with clean formatting and multiple display modes.
npm install -g ytsearch-cliRun help:
ytsearch --helpytsearch video "never gonna give you up"ytsearch channel "RickAstleyVEVO"ytsearch playlist "Top Hits 2025"ytsearch details <videoId>ytsearch playlist-videos <playlistId>ytsearch search "lofi hip hop"-l, --limit <n>→ Number of results (default:10)-s, --sort <type>→relevance,upload_date,view_count,rating-m, --mode <type>→default,compact,online,detailed-j, --json→ Output raw JSON-w, --watch→ Interactive mode
Example:
ytsearch video "javascript tutorial" -l 5 -m compact- default → Rich tables with info
- compact → Minimal quick view
- online → Clickable links
- detailed → Full metadata
Run:
ytsearch --watchFeatures:
- Arrow key navigation
- Continuous search
- Live settings update
- ytsearch.js – Core YouTube search engine
- commander – CLI framework
- inquirer – Interactive prompts
- chalk – Colors and styling
- figlet – ASCII art banner
- cli-table3 – Pretty terminal tables
- ora – Loading spinners
- update-notifier – Update notifications
MIT License © 2025