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

@sad678/sad-tui-player

v0.3.13

Published

Rich/Textual TUI player with built-in pygame playback for gggmusic.com

Readme

sad-tui-player

基于 Rich/Textual 的咕咕咕音乐 TUI 播放器:浏览 https://www.gggmusic.com/ 分类、日榜/周榜/月榜、音乐列表,解析歌曲播放链接并调用本地播放器播放。

npm 安装

全局安装:

npm install -g @sad678/sad-tui-player
sad-tui-player

临时运行:

npx @sad678/sad-tui-player

解析单首歌:

sad-ggg-link https://www.gggmusic.com/thread-491.htm

npm 包会在首次运行时创建自己的 Python 虚拟环境并安装依赖。机器上需要提前安装 Python 3.11+。

一键启动

cd C:\AI\Music\sad-tui-player
.\run.ps1

常用参数:

  • .\run.ps1 -NoInstall:跳过依赖安装,直接启动
  • .\run.ps1 -Test:安装依赖后运行测试
  • .\run.ps1 -NoInstall -Test:跳过安装,直接运行测试

安装

cd C:\AI\Music\sad-tui-player
.\.venv\Scripts\python.exe -m pip install -e .[dev]

如果 .venv 不存在:

cd C:\AI\Music\sad-tui-player
py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .[dev]

启动 TUI

cd C:\AI\Music\sad-tui-player
.\.venv\Scripts\python.exe -m sad_tui_player

也可以用安装后的命令:

.\.venv\Scripts\sad-tui-player.exe

快捷键:

  • Enter:选择分类或播放选中的歌曲
  • r:重新加载当前分类
  • s:停止当前播放
  • q:退出

播放器使用 pygame 内置播放,会先把歌曲缓存到本地临时目录,不再需要安装 mpvffplayvlc

网络请求默认 trust_env=False,避免本机代理环境变量影响固定站点的 HTTPS 请求。

播放控制

  • Enter:播放选中歌曲并进入播放页
  • Space:暂停 / 继续
  • n:下一曲
  • p:上一曲
  • m:切换列表循环 / 单曲循环
  • PageUp / PageDown:歌曲列表上下翻页
  • Home / End:跳到列表顶部 / 底部
  • Escb:从播放页返回列表页,歌曲继续播放
  • s:停止播放
  • q:退出

解析单首歌播放链接

.\.venv\Scripts\python.exe -m sad_tui_player.cli https://www.gggmusic.com/thread-36951.htm

安装后的命令:

.\.venv\Scripts\sad-ggg-link.exe https://www.gggmusic.com/thread-36951.htm

测试

.\.venv\Scripts\python.exe -m pytest

????

  • ???????????????????????????????????????????
  • ?????????????????????????????????????????????

?????

????????????????????????????????????????????????????????