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

@walavave/cc98-cli

v0.2.10

Published

A native TypeScript CLI and TUI client for CC98.

Downloads

1,481

Readme

CC98-CLI

CC98 的命令行客户端,有适合日常浏览的 TUI,以及面向脚本使用的 CLI 。

  • 直接运行 cc98:进入终端界面。
  • 带参数运行 cc98 <command>:执行 CLI,默认输出 JSON。
  • 当前主要面向读取场景,TUI 会尽量按需加载和缓存,减少请求。

概要

这是一个个人兴趣项目,改版自Lucent-Snow的CC98-CLI,风格和TUI布局模式参考Yazi

基于 CC98 的公开接口实现,与 CC98 官方无关。请合理使用本工具,避免违反 CC98 的用户协议。

特色

  • 支持WebVPN、RVPN:RVPN使用atrust验证;魔法VPN不开启TUN模式下也可以使用
  • 支持鼠标点击/滚动:支持鼠标左右拉动分割线
  • 支持评论:支持简短评论,引用评论,附带表情包预览弹窗
  • 支持文件下载:鼠标点击链接下载文件,支持.pdf .docs
  • 图片预览(快捷键预览大图):支持Kitty(KPG)iterm2渲染,在基于libghostty的终端上完成验证
  • 图形化登录:无需使用命令行登录、切换账号
  • Yazi风格:伪装Yazi文件管理器;q键退出,终端不留痕
  • 自定义:主题颜色、部分快捷键、回复小尾巴

预览

安装

需要 Node.js 20+。

npm install -g @walavave/cc98-cli

安装后命令是:

cc98

登录

cc98 login

多账号:

cc98 account list
cc98 account use <name>
cc98 --account <name> me

登录成功后会按账号自动执行每日签到;默认每天最多尝试一次,使用北京时间日期判断。

如需关闭:

[account]
auto_signin = false

也可以手动执行:

cc98 me signin

TUI

cc98

常用按键:

j/k 或 ↑/↓        上下移动
l 或 →            进入下一层
h 或 ←            返回上一层
Enter             确认执行
f                 跳到搜索框
r                 刷新
?                 显示帮助
n 或 Space        加载更多
a                 用户页关注 / 取消关注
a / s             对当前楼层点赞 / 点踩
c                 帖子评论 / 私聊发送输入框
Shift+c           引用当前楼层并打开评论框
d                 收藏 / 取消收藏当前帖子
z / x             进入帖子对应版面 / 复制帖子链接
Shift+Enter       评论框内换行
q                 退出

左栏导航包含:十大、收藏、最新、搜索、版面、关注、消息、我的、设置。

配置

配置文件路径按系统区分,未设置时使用默认值:

  • Linux: ~/.config/cc98-cli/config.toml
  • macOS: ~/.config/cc98-cli/config.toml
  • Windows: %APPDATA%\\cc98-cli\\config.toml

如果设置了 XDG_CONFIG_HOME,会优先使用 $XDG_CONFIG_HOME/cc98-cli/config.toml

[tui]
hide_top_chrome = false
preview_images = true
navigation_history_limit = 10
clear_cache_on_exit = true
post_signature = "[right][color=#808080]——来自终端应用[/color]「[b][url=https://github.com/walavave/CC98-CLI]CC98 CLI[/url][/b]」[/right]"

图片预览目前支持 Kitty graphics protocol 和 iTerm2 inline image。若终端不支持对应协议,会保留文本图片占位。

post_signature 只会在发送评论时追加到正文末尾,不会显示在编辑中的评论框里;支持 \n\t 等常见转义。

navigation_history_limit 控制 TUI 内“帖子 -> 用户 -> 帖子”这类右键深入导航的最大历史层数;超过后会清空这条返回链,后续左键返回会直接回到左侧栏对应主界面。

clear_cache_on_exit 控制 TUI 在按 q 退出后是否清理缓存,默认开启。

可配置快捷键

当前可配置快捷键都在对应系统配置目录下的 keymap.tomlprepend_keymap 里:

  • Linux: ~/.config/cc98-cli/keymap.toml
  • macOS: ~/.config/cc98-cli/keymap.toml
  • Windows: %APPDATA%\\cc98-cli\\keymap.toml

如果设置了 XDG_CONFIG_HOME,会优先使用 $XDG_CONFIG_HOME/cc98-cli/keymap.toml。格式参考 keymap.toml,组合键使用尖括号表示,例如:

[tui]
prepend_keymap = [
  { on = "C", run = "compose.open", desc = "打开评论框或私信输入框" },
  { on = "F", run = "search.focus-input", desc = "跳到搜索框" },
  { on = "<A-Down>", run = "topic.next-reply", desc = "下一条回复" },
  { on = "<A-Up>", run = "topic.previous-reply", desc = "上一条回复" },
  { on = "A", run = "topic.like-post", desc = "点赞当前楼层" },
  { on = "S", run = "topic.dislike-post", desc = "点踩当前楼层" },
  { on = "D", run = "topic.favorite-topic", desc = "收藏当前帖子" },
  { on = "<C-a>", run = "compose.open-emotion", desc = "在评论框中打开表情面板" },
]

prepend_keymap 当前支持的 run 动作只有这些:

  • compose.open:打开评论框或私信输入框,默认内置按键:c
  • search.focus-input:跳到搜索页输入框,默认内置按键:f
  • compose.open-emotion:在评论框或私信输入框中打开表情面板,默认内置按键:<C-a>
  • topic.next-reply:在主题页跳到下一条回复,默认内置按键:<A-Down>
  • topic.previous-reply:在主题页跳到上一条回复,默认内置按键:<A-Up>
  • topic.like-post:在主题页给当前楼层点赞,默认内置按键:a
  • topic.dislike-post:在主题页给当前楼层点踩,默认内置按键:s
  • topic.favorite-topic:在主题页收藏或取消收藏当前帖子,默认内置按键:d

prepend_keymap 中的自定义绑定会优先于内置默认值。

on 字段支持:

  • 单字符键:"a""F""/"
  • 方向键:"<Up>""<Down>""<Left>""<Right>"
  • 常用控制键:"<Enter>""<Esc>""<Tab>""<Space>""<Backspace>"
  • Alt 键:"<A-Up>""<A-Down>",也兼容 "<M-Up>""<Alt-Up>""<Option-Up>"
  • Ctrl 键:"<C-a>" 这类写法

如果要写多段按键序列,也可以把 on 写成数组,例如:

[tui]
prepend_keymap = [
  { on = ["g", "g"], run = "search.focus-input", desc = "示例:双击 g" },
]

CLI

CLI 默认输出 JSON,适合配合 jq 或脚本使用。

cc98 me
cc98 topic <topic-id>
cc98 board <board-id>
cc98 search <keyword>
cc98 message recent
cc98 update

发帖

cc98 post <board-id|board-name> <file> [tag1] [tag2] [--ubb]

--browser 时通过 API 直接发布(默认 Markdown 格式),支持 .md.mdx.txt 等纯文本文件。本地图片会自动上传。

# 无标签版面,直接发
cc98 post 编程技术 ./draft.md

# 有标签版面,在文件名后跟标签
cc98 post 日用交易 ./draft.txt 求 zjg

# 以 UBB 格式发布
cc98 post 编程技术 ./draft.md --ubb

Safari 支持自动填表(切换到 Markdown 编辑器并填入标题/正文):

cc98 post 编程技术 ./draft.md --browser safari

使用 --browser chrome 会在 Chrome 中打开编辑器页面,草稿文件保留在临时目录供手动粘贴。

查看完整命令:

cc98 --help
cc98 topic --help
cc98 user --help
cc98 update --help

本地数据

登录信息和缓存保存在:

Linux: ~/.cc98-cli/
macOS: ~/.cc98-cli/
Windows: %APPDATA%\cc98-cli\

开发

npm install
npm run check
npm run build
node dist/main.js

致谢

  • CC98-CLI:基于该项目fork,因技术路线分离而独立

License

MIT