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

ytmp

v1.1.1

Published

A very lightweight YouTube-based music player

Readme

ytmp

A lightweight YouTube-based music player

Setup

  1. Install mpv on your OS (sudo apt-get install mpv, sudo pacman -S mpv, sudo emerge mpv). Sorry, mpv is an external dependency as of now. You can skip this step if you are into providing your own https-capable video player (like VLC or mplayer) using the -p flag
  2. Run yarn global add ytmp

CLI

A binary called ytmp is provided

Usage:
    ytmp --help
    ytmp [ options ] [ [--play] [--mix] [--radio] ] [--] [string]
    ytmp [ options ] --search [--] [string...]
    ytmp [ options ] --id=id | --id [--] [id]
    ytmp [ options ] --url=url | --url [--] [url]

Behaviour control:
    -x, --play      Play the selected playlist and/or video
                    Used in playlists to exit after playling all the songs.
    -m, --mix       After the playlist or video is over start a
                    non-personalized YouTube Mix
    -r, --radio     At the end, don't exit but start an endless radio instead

    The default behaviour is dependent on the song selection

Song selection:
    -s, --search    Use the positional argument(s) to perform a search and use
                    the first result as the video or playlist
    -i, --id id     Use the given ID or URL (either video, playlist or channel)
                    The value can also be supplied either as positional, after
                    the double-dash
    -u, --url url   And alias for --id. Behaviour may change.
    
    By default if the supplied positional argument(s) is a valid playlist or
    video ID or URL then used so, else a search is performed.

Format options:
    -a, --audio     Audio-only, never ever show video
    -v, --video     Optimize for video.
    -av             Select formats with video but optimize for audio

Developer options:
    -p, --player p Use a custom audio and video player executable. "mpv" by
                   default. A recommended alternative is mplayer or ffplay.
                   Should be able to play http streams.
    --saveinfo [f] Save latest video info, optionally to the given file
    --quiet        Don't log to stdout
    -v, --verbose  Log to stderr

API

const ytmp = require(ytmp)

let info = await ytmp(url_or_id_or_searchstring, options)
info = await ytmp.play(url_or_id_or_searchstring_or_info, options)
info = await ytmp.playMix(info || "Developers" || "KMU0tzLwhbE", {audio: true, video: false})
info = ytmp.playRadio(info || "Oxygene COMPLETE" || "PLCFC37B95C9159ACC", {player: "C:\Program Files\vlc\vlc.exe"})

The main exported function is intelligent, i.e. does not accept an info-object, but accepts a search string tries to guess what the user wants.

Every function returns an info promise and accepts an URL or an ID indicating a video, a playlist or a channel or an info object or promise returned from a previous call. Passing the unresolved promise makes content preloading possible.

Every function accepts an options objects as a second arguments which controls its behaviour. Currently undocumented, accepts the CLI arguments, look in the source code for usage.