https://github.com/rjryt/ytsearch-cli
A beautiful command-line interface for YouTube search using ytsearch.js - search videos, channels, playlists with rich terminal formatting
https://github.com/rjryt/ytsearch-cli
cli command-line search terminal youtube youtube-api ytsearch
Last synced: 6 months ago
JSON representation
A beautiful command-line interface for YouTube search using ytsearch.js - search videos, channels, playlists with rich terminal formatting
- Host: GitHub
- URL: https://github.com/rjryt/ytsearch-cli
- Owner: RJRYT
- License: mit
- Created: 2025-09-20T12:41:32.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-29T14:01:41.000Z (10 months ago)
- Last Synced: 2025-10-06T20:37:08.132Z (10 months ago)
- Topics: cli, command-line, search, terminal, youtube, youtube-api, ytsearch
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/ytsearch-cli
- Size: 85 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YTSearch CLI
A simple command-line tool for searching YouTube, powered by the [`ytsearch.js`](https://www.npmjs.com/package/ytsearch.js) library. It lets you search for videos, channels, and playlists directly from your terminal with clean formatting and multiple display modes.
---
## 🚀 Installation
```bash
npm install -g ytsearch-cli
```
Run help:
```bash
ytsearch --help
```
---
## 📖 Usage
### Video Search
```bash
ytsearch video "never gonna give you up"
```
### Channel Search
```bash
ytsearch channel "RickAstleyVEVO"
```
### Playlist Search
```bash
ytsearch playlist "Top Hits 2025"
```
### Video Details
```bash
ytsearch details
```
### Playlist Videos
```bash
ytsearch playlist-videos
```
### Search All Types
```bash
ytsearch search "lofi hip hop"
```
---
## ⚙️ Options
* `-l, --limit ` → Number of results (default: `10`)
* `-s, --sort ` → `relevance`, `upload_date`, `view_count`, `rating`
* `-m, --mode ` → `default`, `compact`, `online`, `detailed`
* `-j, --json` → Output raw JSON
* `-w, --watch` → Interactive mode
Example:
```bash
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:
```bash
ytsearch --watch
```
Features:
* Arrow key navigation
* Continuous search
* Live settings update
---
## 📦 Tech Used
* [ytsearch.js](https://www.npmjs.com/package/ytsearch.js) – Core YouTube search engine
* [commander](https://www.npmjs.com/package/commander) – CLI framework
* [inquirer](https://www.npmjs.com/package/inquirer) – Interactive prompts
* [chalk](https://www.npmjs.com/package/chalk) – Colors and styling
* [figlet](https://www.npmjs.com/package/figlet) – ASCII art banner
* [cli-table3](https://www.npmjs.com/package/cli-table3) – Pretty terminal tables
* [ora](https://www.npmjs.com/package/ora) – Loading spinners
* [update-notifier](https://www.npmjs.com/package/update-notifier) – Update notifications
---
## 📝 License
MIT License © 2025