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 🙏

© 2024 – Pkg Stats / Ryan Hefner

musicn

v1.5.3-beta.0

Published

Download music in your command line

Downloads

369

Readme

Musicn

🎵 一个可播放及下载音乐的 Node.js 命令行工具

全局安装

$ npm i musicn -g
# or
$ yarn global add musicn

容器形式部署安装可以参考:musicn-container

使用

$ musicn 周杰伦
# or
$ msc 周杰伦

帮助信息:

$ msc --help
# or
$ msc -h

开启本地播放链接(手机可扫描二维码)下载及播放:

$ msc --qrcode
# or
$ msc -q
# or
$ msc -q -P 3000 # 指定端口,-P为大写

注意:使用手机扫描二维码时,电脑和手机两个设备必须连接到同一个 Wi-Fi;强烈推荐这种方式,既能听歌又能下载歌曲

也可以部署到自己的服务器,具体方法如下:

git clone https://github.com/zonemeen/musicn.git
cd musicn
npm install
npm run build
node ./bin/cli.js -q
# or
pm2 start ./bin/cli.js --name music-app -- -q

开启本地播放链接是否自动打开浏览器:

$ msc -q --open
# or
$ msc -q -o

搜索的页码数(默认是第1页):

$ msc 周杰伦 --number 2
# or
$ msc 周杰伦 -n 2
# or
$ msc -n 2 周杰伦

搜索的歌曲数量(默认是20条):

$ msc 周杰伦 --size 10 -w # wangyi的服务
# or
$ msc 周杰伦 -s 10 -w
# or
$ msc -s 10 -w 周杰伦

注意:咪咕正常搜索因为api不支持,搜索时的自定义歌曲数量是无效的

咪咕服务下载(默认是这个服务):

$ msc 周杰伦

网易云服务下载:

$ msc 周杰伦 --wangyi
# or
$ msc 周杰伦 -w
# or
$ msc -w 周杰伦

酷狗服务下载:

$ msc 周杰伦 --kugou
# or
$ msc 周杰伦 -g
# or
$ msc -g 周杰伦

根据歌单id下载:

$ msc --songListId 206140403
# or
$ msc -i 206140403
# or
$ msc -i 206140403 -n 2

自定义下载路径(默认是当前路径):

$ msc 周杰伦 --path ../music
# or
$ msc 周杰伦 -p ../music
# or
$ msc -p ../music 周杰伦

开启本地播放链接时附带此参数,可通过 web 页面下载音乐至服务器对应 path

自定义base URL(默认为空):

$ msc 周杰伦 -q --base musicn
# or
$ msc 周杰伦 -q -b musicn

注意:只应用在开启本地播放链接时且首尾不能是 /,最终呈现的 URL http://192.168.0.204:7478/musicn

附带歌词下载(默认是不附带):

$ msc 周杰伦 --lyric
# or
$ msc 周杰伦 -l
# or
$ msc -l 周杰伦

开启本地播放链接时附带此参数,可通过 web 页面下载歌词至服务器对应 path(需结合 path 使用)

版本信息:

$ msc --version
# or
$ msc -v

资源

  • 音乐来源: 咪咕、酷狗和网易云(API 是从公开的网络中获得)

说明

  1. 暂时只支持咪咕、酷狗和网易云的服务(因一些特殊原因,其余平台暂时是不支持的,所有服务暂时也只支持普通mp3格式的下载及播放,且部分服务的会员专属歌曲下载暂时也不支持,后期会继续探索其余平台可用的音乐下载)
  2. windows 桌面端的 git Bash 中不支持上下切换选歌,问题是 inquirer 不兼容,建议使用其它终端工具
  3. node version > 16
  4. 此项目仅供个人学习研究,严禁用于商业用途