A command-line interface for YouTube search powered by ytsearch.js.
YTSearch CLI (ytsearch-cli) is the official command-line interface for ytsearch.js, a TypeScript and Node.js library for searching YouTube videos, channels, playlists, and retrieving video and playlist data.
Search YouTube directly from your terminal with formatted output, JSON support, detailed metadata, and an interactive search mode.
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 and data library
- 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
ytsearch.js is the core library powering YTSearch CLI. Use it directly in your Node.js or TypeScript projects when you need programmatic YouTube search and playlist data.
MIT License © 2026