GitHub 星标
1
月装机量
93
近 7 天 7
综合评分SCORE
33.6
生态多维模型
最近提交
23 天前
2026-07-27
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@taraksh011/oc-usage@1.0.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@taraksh011/oc-usage@1.0.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @taraksh011/oc-usageopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
README.md
查看原始文件→OpenCode TUI plugin — displays per-session token usage, cost, and TPS in the prompt bar.
↑1.2K [450] ↓3.5K [2.1K] $0.0214 ⚡45 ∅38
↑ total [current]— input tokens (cumulative / last message)↻ total [current]— cache read tokens (cumulative / last message)↓ total [current]— output tokens including reasoning (cumulative / last message)$cost— total session cost⚡tps— instant tokens/sec (1s rolling window)∅ tps— average tokens/sec (across streaming duration)
Data persists across restarts via TuiKV.
Install
// ~/.config/opencode/tui.jsonc
{
"plugins": ["@taraksh011/oc-usage"]
}
Then restart OpenCode.