YTSearch CLI is a Node.js command-line tool for searching YouTube directly from your terminal. Search YouTube videos, channels, playlists, video details, and playlist videos with formatted output, JSON support, and an interactive mode.
Built with ytsearch.js.
Install the YouTube search CLI globally with npm:
npm install -g ytsearch-cliRun help:
ytsearch --help- Search YouTube videos, channels, and playlists from the command line
- Retrieve YouTube video details and playlist videos by ID
- Choose rich table, compact, detailed, or link-friendly output
- Export search results as JSON for scripts and automation
- Use interactive watch mode for repeated searches
- Works with Node.js 14 and later
ytsearch video "never gonna give you up"ytsearch channel "RickAstleyVEVO"ytsearch playlist "Top Hits 2026"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 © 2026