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

ytdwn

v1.1.3

Published

A fast and simple CLI tool to download audio and video from YouTube

Readme

 ██╗   ██╗ ████████╗ ██████╗  ██╗    ██╗ ███╗   ██╗
 ╚██╗ ██╔╝ ╚══██╔══╝ ██╔══██╗ ██║    ██║ ████╗  ██║
  ╚████╔╝     ██║    ██║  ██║ ██║ █╗ ██║ ██╔██╗ ██║
   ╚██╔╝      ██║    ██║  ██║ ██║███╗██║ ██║╚██╗██║
    ██║       ██║    ██████╔╝ ╚███╔███╔╝ ██║ ╚████║
    ╚═╝       ╚═╝    ╚═════╝   ╚══╝╚══╝  ╚═╝  ╚═══╝

A fast and simple CLI tool to download audio and video from YouTube

npm version License: MIT

✨ Features

  • 🎵 Audio Downloads - MP3, OPUS, M4A, FLAC, and more
  • 🎥 Video Downloads - MP4, MKV, WebM with best quality (new in v1.1.0)
  • ✂️ Clip Sections - Download only specific time ranges
  • 📁 Custom Folders - Set a default download directory
  • 🚀 Fast Downloads - Parallel fragment downloading
  • 🎨 Beautiful UI - Gradient banner, spinners, progress bars
  • 📦 Auto-Setup - Downloads yt-dlp binary and uses static FFmpeg automatically

📋 Requirements

  • Node.js >= 18.0.0 or Bun >= 1.0.0
  • FFmpeg is handled automatically via static binaries

🚀 Quick Start

# Install globally
npm install -g ytdwn

# First-time setup (downloads yt-dlp)
ytdwn prepare

# Download audio (MP3)
ytdwn "https://www.youtube.com/watch?v=VIDEO_ID"

# Download video (MP4)
ytdwn "https://www.youtube.com/watch?v=VIDEO_ID" -f mp4

📖 Usage

Basic Examples

# Download as MP3 (default)
ytdwn "https://youtube.com/watch?v=VIDEO_ID"

# Download as MP4 video
ytdwn "https://youtube.com/watch?v=VIDEO_ID" -f mp4

# Clip a specific section (1:30 to 2:45)
ytdwn "https://youtube.com/watch?v=VIDEO_ID" -c 1:30-2:45

# Download video clip
ytdwn "https://youtube.com/watch?v=VIDEO_ID" -f mp4 -c 1:30-2:45

# Quiet mode (outputs only filename)
ytdwn "https://youtube.com/watch?v=VIDEO_ID" -q

Options

| Flag | Description | Example | |------|-------------|---------| | -f, --format <format> | Output format (mp3, mp4, mkv, etc.) | -f mp4 | | -c, --clip <range> | Clip time range | -c 1:30-2:45 | | -q, --quiet | Minimal output | -q | | -v, --version | Show version | -v | | -h, --help | Show help | -h |

Commands

# Download yt-dlp binary
ytdwn prepare

# Set default download folder
ytdwn setDefaultFolder ~/Downloads/YouTube

# View current folder
ytdwn setDefaultFolder

# Reset to current directory
ytdwn setDefaultFolder --reset

Supported Formats

| Type | Formats | |------|---------| | Audio | mp3, opus, m4a, flac, aac, wav | | Video | mp4, mkv, webm, avi, mov |

🛠️ Installation Options

npm / npx

# Run without installing
npx ytdwn prepare
npx ytdwn "https://youtube.com/watch?v=VIDEO_ID"

# Install globally
npm install -g ytdwn

Bun

# Run without installing
bunx ytdwn prepare
bunx ytdwn "https://youtube.com/watch?v=VIDEO_ID"

# Install globally
bun add -g ytdwn

From Source

git clone https://github.com/batikankutluer/ytdwn.git
cd ytdwn
bun install
bun run index.ts prepare
bun run index.ts "https://youtube.com/watch?v=VIDEO_ID"

⚙️ Configuration

Settings are stored in ~/.ytdwn.json:

| Key | Description | |-----|-------------| | downloadDir | Default download folder | | binaryPath | Cached path to yt-dlp |

🧪 Development

# Run tests
bun test

# Type check
bun run typecheck

# Build
bun run build

🛠️ Tech Stack

📄 License

MIT - see LICENSE for details