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

@tomxv/ydl-cli

v0.1.10

Published

Simple Bun CLI for yt-dlp-api

Readme

ydl-cli (Bun)

Tiny Bun-based CLI for your yt-dlp-api.

What this is

  • ydl-cli: thin client for the API
  • yt-dlp-api: backend that does actual download processing

You can use either:

  • CLI (ydl ...) for convenience
  • direct API (curl ...) with no CLI dependency

Requirements

  • Bun is required to run this CLI.
  • This package is currently Bun-first (Node-only runtime is not supported yet).

Install

Global install (recommended)

npm i -g @tomxv/ydl-cli

or

bun add -g @tomxv/ydl-cli

Local dev install

cd ydl-cli
bun link

Then ydl is available globally in your shell.

Quick Start

CLI usage

ydl "https://youtu.be/<VIDEO_ID>"
ydl "https://www.youtube.com/watch?v=<VIDEO_ID>" mp3
ydl "https://youtu.be/<VIDEO_ID>" mp4 -o myvideo.mp4
ydl "https://youtu.be/<VIDEO_ID>" source --api "https://yt-dlp-api.lugiaxetomxv.net"

Direct API usage (curl)

curl "https://yt-dlp-api.lugiaxetomxv.net/"
curl -OJ "https://yt-dlp-api.lugiaxetomxv.net/dl?url=https%3A%2F%2Fyoutu.be%2F<VIDEO_ID>"
curl -OJ "https://yt-dlp-api.lugiaxetomxv.net/dl?url=https%3A%2F%2Fyoutu.be%2F<VIDEO_ID>&format=mp3"

CLI Command Reference

ydl <url> [format] [options]
ydl help
ydl man
  • url: required
  • format: optional (default: source)
  • --api <base>: API base URL
  • -o, --output <file>: save to specific file name
  • -h, --help: show help

Allowed formats:

  • source, mp4, mp3, webm, m4a, flac, wav

Input Validation Behavior

The CLI validates inputs before sending any request to the API:

  • Only http:// and https:// URLs are accepted.
  • Unknown commands / invalid URL-like input are rejected locally.
  • Unsupported format values are rejected locally.

Typical validation failures exit with code 2.

man ydl integration

  • On install: man page is auto-installed (postinstall)
  • On uninstall: man page is auto-removed (preuninstall)

Manual commands:

bun run install:man
bun run uninstall:man

If man ydl is not found, add this to your shell profile:

export MANPATH="$HOME/.local/share/man:${MANPATH:-}"

Support

If ydl-cli is useful to you and you want to support development:

Environment Variable

  • YDL_API: default API base URL

Troubleshooting

  • Error: Invalid URL. Only http/https URLs are supported.
    → Check URL format and scheme.

  • Error: Unsupported format '...'
    → Use one of the allowed formats.

  • Error: HTTP 500 {"error":"Server runtime missing JavaScript engine required by extractor."}
    → This is an API server runtime issue (not a CLI parse issue). Check server environment.

Legal / Responsibility

  • Use this tool only for content you are authorized to access/download.
  • Do not use it for unauthorized copyrighted content.
  • Operator/user is responsible for complying with applicable laws and platform terms.