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

opencode-token-board

v0.2.0

Published

Real-time token usage, cache analytics & performance dashboard plugin for OpenCode CLI

Downloads

335

Readme

opencode-token-board

OpenCode CLI 的实时 Token 统计面板,同时支持 Mimo Code。

本项目基于 opencode-token-watch 修改而来,特此鸣谢原项目作者。

全部折叠

preview1

折叠子项

preview2

全部展开

preview3

安装

npm install opencode-token-board

opencode.jsonopencode.jsonc 中添加:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-token-board"]
}

也可以在 OpenCode TUI 中按 Ctrl+P 打开命令面板,选择 Install plugin,输入 opencode-token-board 安装。

配置

在 OpenCode TUI 中输入 /usage设置,可交互式开关各显示项和切换界面语言,配置自动持久化,无需手动编辑配置文件。

用法

在 OpenCode TUI 中输入 /usage,选择:

  • HTML 报告 — 选择日期范围,生成仪表盘并在浏览器打开
  • JSON 导出 — 导出完整用量数据至 ~/.opencode/reports/
  • 文本报告 — 导出 Markdown 格式至 ~/.opencode/reports/
  • 设置 — 开关侧边栏显示项、切换语言

配置 OpenCode Go 套餐余量查询

  1. 输入 /usage,点击 Go 配置
  2. 打开用量查询页面 https://opencode.ai/workspace/wrk_xxx/go,将 wrk_xxx 填入 Workspace
  3. F12 打开开发者工具 → 应用程序Cookie,找到 auth,复制整段文本填入 Cookie
  4. 点击完成后重启 TUI

数据文件

| 文件 | 路径 | 说明 | |------|------|------| | JSONL 日志 | ~/.opencode/tokenwatch.jsonl | 原始请求日志 | | 聚合统计 | ~/.opencode/tokenwatch-stats.json | 持久化性能统计 | | 报告输出 | ~/.opencode/reports/ | HTML / JSON / Markdown 报告 |

系统要求

  • OpenCode CLI(支持 opencode db 命令)
  • Node.js 18+

构建

npm install
npm run build

相关项目

许可

MIT