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 🙏

© 2025 – Pkg Stats / Ryan Hefner

claude-statusline-88code

v1.0.3

Published

Claude Code 状态栏 - Node.js/TypeScript 实现,支持 NoNoCode/88Code 平台

Readme

Claude Code StatusLine - 88Code Edition

🚀 基于 Node.js/TypeScript 的 Claude Code 状态栏工具,专为 NoNoCode/88Code 平台优化

Node TypeScript License: MIT

✨ 核心特性

🆕 独家功能

  • 💵 双套餐美元显示 - 同时显示包月和按量付费余额
    🪫 $125.77 💵 $193.25
  • 📊 智能多套餐累加 - 自动识别并累加所有活跃套餐
  • 🔄 实时余额补充 - 显示包月套餐的美元恢复倒计时

💎 基础能力

  • 🚀 零 Python 依赖 - 仅需 Node.js,启动速度提升 3 倍
  • 超快启动 - 冷启动 ~50ms (Python 版本 ~150ms)
  • 🔧 外部 JSON 配置 - 无需修改代码,支持项目级/全局配置
  • 📊 完整信息展示 - 目录、Git、余额、模型、消耗统计
  • 🌐 跨平台支持 - Windows/Linux/Mac 通用

📊 显示效果

🗂️  my-project ✓ 🌵 main ⤧ 3
🪫 $123.32/$127.50 💵 $193.25 🕑 66:39
💎 Sonnet 4.5 💰 0.05/15.62/953.57

| 图标 | 含义 | 说明 | |------|------|------| | 🗂️ | 当前目录 | ✓ = 可写入 | | 🌵 | Git 分支 | 或 🌾 No Repo | | ⤧ | 文件变更数 | Git 未提交的更改 | | 🔴/🟡/🟢 | PRO包月余额 | 🔴<$50 🟡$50-$100 🟢>$100 | | 💵 | PAYGO按量付费 | 一次性美元余额 | | 🕑 | 补充倒计时 | 距离下次补充到上限 | | 💎 | 当前模型 | Sonnet/Opus | | 💰 | 消耗统计 | Session/Today/Total |

📦 快速开始

方式一:npm 全局安装(推荐)+ 交互式配置 ⭐

# 1. 安装
npm install -g claude-statusline-88code

# 2. 进入项目目录并运行交互式配置
cd /path/to/your/project
statusline-setup

# 3. 按提示完成配置(会自动创建 .claude/settings.json)

# 4. 重启 Claude Code ✅

🎯 交互式配置会自动:

  • ✅ 检测并创建 .claude 目录
  • ✅ 更新 .claude/settings.json 添加 statusline 配置
  • ✅ 可选:配置 NoNoCode Token
  • ✅ 显示配置完成信息和下一步指引

方式二:从源码安装

# 1. 克隆并编译
git clone https://gitee.com/f_rogers/claude-statusline-88code.git
cd claude-statusline-88code
npm install
npm run build

# 2. 配置 Claude Code (.claude/settings.json)
{
  "statusLine": {
    "type": "command",
    "command": "node /完整路径/claude-statusline-88code/dist/index.js",
    "padding": 0
  }
}

# 3. 配置 Token(同上)

📖 完整安装指南: INSTALL.md 📦 发布到 npm: NPM_PUBLISH.md

⚙️ 配置

环境变量

# Windows
set NONOCODE_AUTH_TOKEN=your_token_here

# Linux/Mac
export NONOCODE_AUTH_TOKEN=your_token_here

配置文件

支持三层级配置(优先级从高到低):

  1. 项目级配置: .claude/statusline.config.json
  2. 全局配置: ~/.clauderc.json
  3. 环境变量: NONOCODE_AUTH_TOKEN

配置示例参考 statusline.config.example.json

🚀 使用

在 Claude Code 中配置

编辑 .claude/settings.json

{
  "statusLine": {
    "type": "command",
    "command": "node G:\\claude-lit\\claude-statusline-88code\\dist\\index.js",
    "padding": 0
  }
}

手动测试

# 准备测试数据
echo '{"workspace":{"current_dir":"C:\\test"},"model":{"display_name":"Sonnet 4.5"},"cost":{"total_cost_usd":0.05}}' | node dist/index.js

📊 显示组件

默认显示以下组件:

  • 🗂️ 当前目录 + 写入权限
  • 🌵 Git 分支 / 🌾 No Repo
  • 文件变更数
  • 🔋 账户积分余额 (动态图标)
  • 🕑 积分补充倒计时
  • 💎 当前模型 (Sonnet/Opus/其他)
  • 💰 消耗统计 (Session/Daily/Total)

🔧 配置说明

API 配置

{
  "api": {
    "baseUrl": "API基础URL",
    "token": "认证Token (支持环境变量)",
    "timeout": 1500
  }
}

显示配置

{
  "display": {
    "components": ["dirStr", "gitStr", ...],
    "separator": " ",
    "directoryFullPath": false,
    "showBalanceCap": false,
    "costDisplayFormat": "compact",
    "costComponents": ["session", "daily", "total"],
    "costSeparator": "/",
    "costPrecision": 2,
    "modelIcons": {...},
    "balanceIcons": {...}
  }
}

可用组件

  • dirStr - 目录信息
  • gitStr - Git 分支
  • gitChangesStr - Git 变更数
  • balanceStr - 积分余额
  • refillCountdownStr - 补充倒计时
  • modelStr - 模型信息
  • integratedCostStr - 整合的金额显示
  • "\n" - 换行符

金额显示格式

  • compact: 0.00/1.48/7.32
  • labeled: S:0.00 D:1.48 T:7.32

🛠️ 开发

# 安装依赖
npm install

# 开发模式(监听文件变化)
npm run dev

# 编译
npm run build

# 运行
npm start

📝 项目结构

src/
├── index.ts       # 主入口
├── types.ts       # 类型定义
├── config.ts      # 配置加载
├── git.ts         # Git 信息获取
├── api.ts         # NoNoCode API 调用
└── formatter.ts   # 格式化输出

📄 License

MIT