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

ytsave

v1.0.7

Published

A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease. Works both as a **CLI tool** and as a **library**. ๐ŸŽฅ๐ŸŽถ

Readme

ytsave

A simple and powerful Node.js tool to download YouTube videos and playlists with ease.
Works both as a CLI tool and as a library. ๐ŸŽฅ๐ŸŽถ

ย 

โœจ Features

  • ๐Ÿ“ฅ Download single YouTube videos
  • ๐ŸŽต Download entire playlists in one command
  • ๐Ÿ”Š Support for both audio-only (mp3) and video (mp4) formats
  • โšก Fast & reliable (powered by yt-dlp)
  • ๐Ÿ›  Usable both as a CLI and as a library

ย 

๐Ÿš€ Installation

As CLI (global)

npm install -g ytsave

As dependency (library usage)

npm install ytsave

ย 

๐Ÿ“ฅ Install yt-dlp & ffmpeg

ytsave relies on the external tool yt-dlp to download media and (optionally) ffmpeg to merge separate video/audio streams. Install them on your system and ensure they're available on your PATH before running the CLI.

Windows

  • Using winget:
    winget install yt-dlp
  • Using pip (if Python is installed):
    pip install yt-dlp
  • Using Scoop:
    scoop install yt-dlp
  • Using Chocolatey:
    choco install yt-dlp
  • Or download the yt-dlp.exe from the releases page and add it to your PATH: https://github.com/yt-dlp/yt-dlp/releases

macOS

  • Using Homebrew:
    brew install yt-dlp

Linux

  • Using pip:
    pip3 install --user yt-dlp
  • Using your distro package manager (if available) or download the binary from the releases page.

ffmpeg (optional but recommended)

  • ffmpeg is required if yt-dlp needs to merge separate video and audio streams (this happens when selecting the best video and best audio). Install ffmpeg via your platform package manager:
    • Windows (scoop/choco) โ€” scoop install ffmpeg or choco install ffmpeg
    • macOS (Homebrew) โ€” brew install ffmpeg
    • Linux (apt/yum/pacman) โ€” sudo apt install ffmpeg or equivalent

After installing, verify both commands are available:

yt-dlp --version
ffmpeg -version

ย 

๐Ÿ’ป CLI Usage

Download a single video or playlist

No Parameters (default)

ytsave https://www.youtube.com/watch?v=dQw4w9WgXcQ
ytsave https://www.youtube.com/playlist?list=PL123456789

With Parameters

ytsave https://www.youtube.com/watch?v=dQw4w9WgXcQ --format mp4 --output ./videos 
ytsave https://www.youtube.com/playlist?list=PL123456789 --format mp3 --output ./music

CLI Options

  • --format <mp4|mp3> โ†’ Output format (default: mp4)
  • --output <path> โ†’ Output directory (default: current folder)

ย 

๐Ÿ“– Library Usage

Import in ESM

import { downloadVideo, downloadPlaylist } from "ytsave";

Download a single video

await downloadVideo("https://www.youtube.com/watch?v=dQw4w9WgXcQ", {
  format: "mp4",
  output: "./videos",
});

Download a playlist

await downloadPlaylist("https://www.youtube.com/playlist?list=PL123456789", {
  format: "mp3",
  output: "./music",
});

ย 

โš™๏ธ API

downloadVideo(url, options)

Downloads a single YouTube video.

  • url (string): YouTube video URL
  • options.format (string): "mp4" or "mp3"
  • options.output (string): Output directory path

downloadPlaylist(url, options)

Downloads an entire YouTube playlist.

  • url (string): YouTube playlist URL
  • options.format (string): "mp4" or "mp3"
  • options.output (string): Output directory path

ย 

โš ๏ธ Disclaimer

This project is for educational purposes only. Downloading videos or music from YouTube may violate YouTubeโ€™s Terms of Service. Use responsibly.