Maintained

    ytsearch-cli — YouTube Search Command-Line Tool

    A powerful and interactive CLI tool for searching YouTube videos, channels, and playlists directly from your terminal, built on top of ytsearch.js.

    Category
    Package
    Date
    September 20, 2025

    Technologies Used

    Node.jsnpmCLI
    ytsearch-cli — YouTube Search Command-Line Tool

    ytsearch-cli — YouTube Search Command-Line Tool

    Overview

    ytsearch-cli is the command-line version of ytsearch.js, offering developers and power users the ability to search YouTube directly from their terminal. It supports videos, channels, playlists, video details, and playlist videos, with multiple display modes and an interactive search mode for a smooth terminal experience.

    Published to the npm registry,

    ytsearch-cli
    is a globally installable package designed for speed, usability, and flexibility.

    Features

    • 🔍 Search YouTube videos, channels, and playlists directly from terminal.
    • 📜 Fetch video details & playlist videos with one command.
    • 🎛 Multiple display modes — default, compact, online, detailed.
    • 🖥️ Interactive Mode (
      --watch
      ) with arrow key navigation.
    • Lightweight & Fast — powered by
      ytsearch.js
      .
    • 🎨 Styled output with tables, colors, and banners.
    • 📦 Easy installation:
      npm install -g ytsearch-cli
      .
    • 🔔 Update notifier — informs users of new versions.

    Installation

    npm install -g ytsearch-cli
    

    Run help menu:

    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 video/channel/playlist info.
    • compact → Minimal quick view.
    • online → Clickable links in supported terminals.
    • detailed → Full metadata (title, views, published date, duration, etc.).

    Interactive Mode

    Run:

    ytsearch --watch
    

    Features:

    • 🔄 Continuous search without rerunning commands.
    • ⌨️ Arrow key navigation.
    • ⚙️ Live update of settings (limit, sort, mode).
    • 🎬 Quick preview of video/channel info.

    Example Output

    ytsearch video "Black Panther" -l 3 -m compact
    
    1. Marvel Studios Black Panther - Official Trailer | 50.5M views
    2. Wakanda Battle - I’m Not Dead Scene - Black Panther Returns | 19.9M views
    3. Hiding in the Shadows | The Real Black Panther | 4.2M views
    

    Tech Stack

    • ytsearch.js — Core YouTube scraping/search library.
    • commander — CLI framework for commands & options.
    • inquirer — Interactive prompts.
    • chalk — Colors and terminal styling.
    • figlet — ASCII banners.
    • cli-table3 — Structured tables in terminal.
    • ora — Loading spinners.
    • update-notifier — Auto version check.

    Status

    ✅ Completed (September 30, 2025) 🛠️ Maintained with regular updates for features and bug fixes.

    Links

    Related Projects

    Discover more projects with similar technologies or categories.

    PersonalCompleted

    E2EE Chat — End-to-End Encrypted Chat App

    A secure real-time MERN chat app with true end-to-end encryption using client-side RSA-OAEP, built as a personal project.

    ReactTailwind CSS+5
    View Project
    Full-StackCompleted

    Buddypair Community Platform

    A full-featured MERN-based community platform integrating multiple domains such as job portal, dating, study abroad, matrimony, and courses.

    MongoDBExpress.js+5
    View Project
    SAMPActive

    New City Roleplay — UCP & Admin Panel

    A modern, installable user control panel and admin dashboard for the New City Roleplay SA-MP server, featuring Discord OAuth, PWA/TWA support, push notifications, and Mongo→MySQL migration utilities.

    ReactTailwind CSS+6
    View Project