ytsearch-cli
v1.2.0
Published
A beautiful command-line interface for YouTube search using ytsearch.js - search videos, channels, playlists with rich terminal formatting
Maintainers
Readme
YTSearch CLI
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.
🚀 Installation
npm install -g ytsearch-cliRun help:
ytsearch --help📖 Usage
Video Search
ytsearch video "never gonna give you up"Channel Search
ytsearch channel "RickAstleyVEVO"Playlist Search
ytsearch playlist "Top Hits 2025"Video Details
ytsearch details <videoId>Playlist Videos
ytsearch playlist-videos <playlistId>Search All Types
ytsearch search "lofi hip hop"⚙️ Options
-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🎛 Display Modes
- default → Rich tables with info
- compact → Minimal quick view
- online → Clickable links
- detailed → Full metadata
👨💻 Interactive Mode
Run:
ytsearch --watchFeatures:
- Arrow key navigation
- Continuous search
- Live settings update
📦 Tech Used
- 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
📝 License
MIT License © 2025
