npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

subrato-ytmusic

v1.0.0

Published

A beautiful cross-platform CLI YouTube music player

Readme

🎵 YTMusic CLI

A beautiful cross-platform CLI YouTube music player with interactive controls.

✨ Features

  • 🔍 Search YouTube - Search and play any song
  • 📋 Queue Management - Add, remove, shuffle tracks
  • 💾 Playlists - Save and load custom playlists
  • 🎮 Interactive Controls - Beautiful CMD interface
  • ⌨️ Keyboard Support - Full keyboard control
  • 🎛️ Volume Control - Adjust playback volume
  • 📜 Playback History - Track recently played songs

🎮 Controls

╔══════════════════════════════════════╗
║            🎮 Controls              ║
╚══════════════════════════════════════╝

  ▶ Play / Resume   - Start or resume playback
  ⏸ Pause          - Pause current track
  ⏭ Next Track     - Skip to next track
  ⏮ Previous Track - Go to previous track
  🔊 Volume         - Adjust volume (0-100)
  ➕ Add to Queue   - Add new track
  📋 Show Queue     - View all queued tracks
  🔀 Shuffle Queue  - Randomize queue order
  🗑 Clear Queue    - Remove all tracks
  ❌ Quit           - Exit player

🚀 Installation

Prerequisites

  1. Node.js 18+ - Download
  2. yt-dlp - YouTube downloader
  3. FFmpeg - Audio processing

Install Dependencies

Windows (using Chocolatey):

choco install nodejs yt-dlp ffmpeg

macOS:

brew install node yt-dlp ffmpeg

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install nodejs npm yt-dlp ffmpeg

Install the App

# Clone or download the project
cd ytmusic-cli

# Install dependencies
npm install

# Link globally (optional)
npm link

📖 Usage

Basic Commands

# Search and play a song
npm start -- play "Never Gonna Give You Up"

# Just search without playing
npm start -- search "Beatles"

# Show current queue
npm start -- queue

# Create a playlist
npm start -- playlist create Favorites

# View settings
npm start -- config

Interactive Mode

# Start interactive player
npm start

# With keyboard controls
npm start -- play -k

🌐 Deployment for Others

Option 1: Publish to npm (Recommended)

  1. Update package.json with your details:
{
  "name": "ytmusic-cli",
  "version": "1.0.0",
  "description": "A beautiful CLI YouTube music player",
  "main": "src/cli.js",
  "bin": {
    "ytmusic": "./src/cli.js"
  }
}
  1. Publish to npm:
npm login
npm publish
  1. Others install via:
npm install -g ytmusic-cli
ytmusic play "song name"

Option 2: Git Repository

  1. Push to GitHub:
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/username/ytmusic-cli.git
git push -u origin main
  1. Others clone and use:
git clone https://github.com/username/ytmusic-cli.git
cd ytmusic-cli
npm install
npm start -- play "song"

Option 3: Create Windows Executable

  1. Install pkg:
npm install -g pkg
  1. Build executable:
npm install
pkg -t win32-x64 src/cli.js -o ytmusic.exe
  1. Distribute ytmusic.exe with these files:
ytmusic.exe
package.json (for reference)
README.md

Option 4: Batch File Runner

Create start.bat:

@echo off
echo Installing YTMusic CLI...
npm install
echo.
echo Starting YTMusic CLI...
npm start -- play "%~1"

📁 Project Structure

ytmusic-cli/
├── src/
│   ├── cli.js           # Main CLI entry
│   ├── player/
│   │   └── Player.js    # Audio playback engine
│   └── utils/
│       ├── youtube.js    # YouTube API
│       ├── queue.js      # Queue management
│       ├── playlist.js   # Playlist management
│       ├── config.js     # Settings
│       ├── ui.js         # Beautiful UI
│       └── keyboard.js   # Keyboard controls
├── data/                # Queue & playlist storage
├── package.json
└── README.md

⚙️ Configuration

Config file: ~/.ytmusic-cli/config.json

{
  "downloadPath": "~/Music/ytmusic-cli",
  "audioQuality": "high",
  "volume": 80,
  "loop": false,
  "shuffle": false
}

🔧 Troubleshooting

"yt-dlp not found"

choco install yt-dlp

"ffmpeg not found"

choco install ffmpeg

Audio not playing

  • Check system volume
  • Make sure speakers are connected
  • Try running as administrator

📝 License

MIT License

🤝 Contributing

Pull requests welcome!


Made with ❤️ for music lovers