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

yt-spotify-dl

v1.0.1

Published

CLI music downloader from youtube / spotify

Readme

Music DL 🎵

License: MIT Platform: Windows | Linux Node.js

Music DL adalah sebuah alat baris perintah (CLI) sederhana untuk mengunduh musik dari YouTube dan Spotify (Track, Playlist, Album) langsung dari terminal Anda.

Alat ini bekerja dengan cara mengambil metadata (judul, artis) dari URL Spotify, lalu mencari dan mengunduh audio yang paling cocok dari YouTube dalam format MP3.

✨ Fitur

  • Unduh lagu dengan mencari judulnya.
  • Unduh video tunggal dari YouTube.
  • Unduh seluruh playlist dari YouTube.
  • Unduh lagu tunggal dari Spotify.
  • Unduh seluruh playlist atau album dari Spotify.
  • Menyimpan file dalam format .mp3 dengan metadata (judul, artis, album) dan thumbnail.
  • Dapat digunakan di Windows dan Linux.

⚙️ Prasyarat (Wajib Diinstal Terlebih Dahulu)

Sebelum menginstal Music DL, pastikan Anda sudah memiliki Node.js, yt-dlp, dan FFmpeg.

1. Instalasi Node.js

Pastikan Anda memiliki Node.js versi 16 atau lebih baru.

  • Windows:

    1. Unduh installer dari situs resmi Node.js.
    2. Jalankan file .msi yang telah diunduh dan ikuti petunjuk instalasinya.
    3. Buka terminal baru (Command Prompt atau PowerShell) dan verifikasi instalasi dengan node -v dan npm -v.
  • Linux (Debian/Ubuntu):

    # Menggunakan NodeSource (rekomendasi)
    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt-get install -y nodejs
        
    # Verifikasi instalasi
    node -v
    npm -v

2. Instalasi yt-dlp

Ini adalah program inti yang digunakan untuk mengunduh audio dari YouTube.

  • Windows:

    1. Unduh file yt-dlp.exe dari halaman rilis terbaru di GitHub.
    2. Buat sebuah folder baru, misalnya C:\Tools.
    3. Pindahkan file yt-dlp.exe ke dalam folder C:\Tools tersebut.
    4. Tambahkan folder tersebut ke Environment Variables PATH agar bisa diakses dari mana saja (lihat instruksi di bagian FFmpeg untuk cara menambahkan PATH).
    5. Buka terminal baru dan verifikasi dengan mengetik yt-dlp --version.
  • Linux:

    sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
    sudo chmod a+rx /usr/local/bin/yt-dlp
        
    # Verifikasi instalasi
    yt-dlp --version

3. Instalasi FFmpeg (Penting untuk Konversi MP3) 🎞️

FFmpeg diperlukan untuk mengubah audio yang diunduh menjadi format .mp3 dan menambahkan metadata.

  • Windows: Install ffmpeg menggunakan winget

    winget install ffmpeg
  • Linux (Debian/Ubuntu): FFmpeg dapat diinstal dengan mudah melalui manajer paket.

    sudo apt update
    sudo apt install ffmpeg
        
    # Verifikasi instalasi
    ffmpeg -version

🚀 Instalasi Music DL

Setelah semua prasyarat terpenuhi, Anda bisa menginstal alat ini.

  1. Clone Repositori

    git clone https://github.com/Terror-Machine/yt-spotify-dl.git
    cd yt-spotify-dl
  2. Instal Dependensi Proyek

    npm install
  3. Instal CLI Secara Global Jalankan perintah ini dari dalam direktori proyek agar perintah music-dl bisa diakses dari mana saja di terminal Anda.

    npm install -g .
  4. Install menggunakan installer (linux only) Jalankan menggunakan perintah ini jika ingin langsung menggunakan installer tanpa perlu menggunakan langkah 2 dan 3.

    bash install.sh

📚 Cara Penggunaan

Gunakan perintah music-dl diikuti dengan query pencarian atau URL.

Contoh Perintah:

1. Mencari dan Mengunduh Lagu

music-dl "imagine dragons bones"

2. Mengunduh dari URL YouTube (Video Tunggal)

music-dl "https://www.youtube.com/watch?v=yKNxeF4KMsY"

3. Mengunduh dari URL Spotify (Lagu Tunggal)

music-dl "https://open.spotify.com/track/4cOdK2wGLETOMsV3oXOltq"

## Opsi Perintah

| Opsi | Alias | Deskripsi | | --------------------- | ----- | ----------------------------------------------------------------- | | --output <dir> | -o | Menentukan direktori output untuk file unduhan. | | --quality <0-9> | -q | Mengatur kualitas audio (0 adalah terbaik). | | --search | -s | Memaksa mode pencarian, bahkan untuk URL. | | --list | -l | Menampilkan daftar lagu dari playlist/album tanpa mengunduh. | | --cookies <file> | -c | Path ke file cookies untuk video yang butuh login (misal, cookies.txt). | | --verbose | -v | Menampilkan log atau informasi proses yang lebih detail. | | --help | -h | Menampilkan pesan bantuan. |


📜 Lisensi

Proyek ini dilisensikan di bawah Lisensi MIT.