tokentracker-cli 0.5.99 → 0.5.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/README.zh-CN.md +7 -5
- package/dashboard/dist/assets/{main-BhjD_pKB.js → main-Cqn4mbzU.js} +169 -168
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +2 -2
- package/src/commands/init.js +22 -0
- package/src/commands/status.js +73 -15
- package/src/commands/sync.js +52 -0
- package/src/lib/pricing/curated-overrides.json +4 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +595 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
### Know exactly what you're spending on AI — across every CLI
|
|
8
8
|
|
|
9
|
-
Auto-collect token counts from **
|
|
9
|
+
Auto-collect token counts from **13 AI coding tools**, aggregate them locally, see real cost trends in a beautiful dashboard, **and install the same Skills across every agent in one click**. No cloud account, no API keys, no setup — just one command.
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
12
12
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
@@ -78,7 +78,7 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
78
78
|
|
|
79
79
|
## ✨ Features
|
|
80
80
|
|
|
81
|
-
- 🔌 **
|
|
81
|
+
- 🔌 **13 AI tools out of the box** — Claude Code, Codex CLI, Cursor, Gemini CLI, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, oh-my-pi
|
|
82
82
|
- 🧩 **Skills manager** — browse 250+ public skills from `anthropics/skills`, `ComposioHQ/awesome-claude-skills`, `skills.sh` and any GitHub repo you add; install once and sync to Claude / Codex / Gemini / OpenCode / Hermes with per-target toggles; one-click Undo
|
|
83
83
|
- 🏠 **100% local** — Token data never leaves your machine. No account, no API keys.
|
|
84
84
|
- 🚀 **Zero config** — Hooks auto-install on first run. From zero to dashboard in 30 seconds.
|
|
@@ -155,12 +155,13 @@ Upgrade with `brew upgrade --cask mm7894215/tokentracker/tokentracker`. The tap
|
|
|
155
155
|
| **Hermes Agent** | ✅ Auto | SQLite sessions table (`~/.hermes/state.db`) |
|
|
156
156
|
| **GitHub Copilot** | ✅ Auto | OpenTelemetry file exporter (`COPILOT_OTEL_FILE_EXPORTER_PATH`) |
|
|
157
157
|
| **Kimi Code** | ✅ Auto | Passive `wire.jsonl` reader (`~/.kimi/sessions/**/wire.jsonl`) |
|
|
158
|
+
| **oh-my-pi (Pi Coding Agent)** | ✅ Auto | Passive reader (`~/.omp/agent/sessions/**/*.jsonl`) |
|
|
158
159
|
| **CodeBuddy** (Tencent) | ✅ Auto | SessionEnd hook in `~/.codebuddy/settings.json` (Claude-Code fork) |
|
|
159
160
|
|
|
160
161
|
> **Do I need to install any plugin or hook manually?** No. `tokentracker` (or `tokentracker init`) handles everything on first run:
|
|
161
162
|
> - **Hook-based** tools (Claude Code, Codex, Gemini, Every Code, **CodeBuddy**) — we write a SessionEnd hook or TOML notify entry into the tool's own config.
|
|
162
163
|
> - **Plugin-based** tools (OpenCode, **OpenClaw**) — the plugin ships inside the npm package (`~/.tokentracker/app/openclaw-plugin/`). We link it via the tool's own CLI (`openclaw plugins install --link …` + `enable`). No download, no drag-and-drop.
|
|
163
|
-
> - **Passive readers** (Cursor, Kiro, Hermes, Kimi Code, Copilot) — nothing is installed into those tools. We only read files they already produce (SQLite DB, JSONL, OTEL export).
|
|
164
|
+
> - **Passive readers** (Cursor, Kiro, Hermes, Kimi Code, Copilot, **oh-my-pi**) — nothing is installed into those tools. We only read files they already produce (SQLite DB, JSONL, OTEL export).
|
|
164
165
|
>
|
|
165
166
|
> Run `tokentracker status` anytime to verify every integration's state. If something shows `skipped`, the `detail` column explains why (e.g. tool CLI not on `PATH`, config unreadable).
|
|
166
167
|
>
|
|
@@ -174,7 +175,7 @@ Missing your tool? [Open an issue](https://github.com/mm7894215/TokenTracker/iss
|
|
|
174
175
|
|
|
175
176
|
| | **TokenTracker** | ccusage | Cursor stats |
|
|
176
177
|
|--------------------------|:---:|:---:|:---:|
|
|
177
|
-
| **AI tools supported** | **
|
|
178
|
+
| **AI tools supported** | **13** | 1 (Claude) | 1 (Cursor) |
|
|
178
179
|
| **Local-first, no account** | ✅ | ✅ | ❌ |
|
|
179
180
|
| **Native menu bar app** | ✅ | ❌ | ❌ |
|
|
180
181
|
| **Desktop widgets** | ✅ 4 widgets | ❌ | ❌ |
|
|
@@ -186,7 +187,7 @@ Missing your tool? [Open an issue](https://github.com/mm7894215/TokenTracker/iss
|
|
|
186
187
|
|
|
187
188
|
```mermaid
|
|
188
189
|
flowchart LR
|
|
189
|
-
A["AI CLI Tools<br/>Claude · Codex · Cursor · Gemini · Kiro<br/>OpenCode · OpenClaw · Every Code · Hermes · Copilot · Kimi Code · CodeBuddy"]
|
|
190
|
+
A["AI CLI Tools<br/>Claude · Codex · Cursor · Gemini · Kiro<br/>OpenCode · OpenClaw · Every Code · Hermes · Copilot · Kimi Code · CodeBuddy · oh-my-pi"]
|
|
190
191
|
A -->|hooks trigger| B[Token Tracker]
|
|
191
192
|
B -->|parse logs<br/>30-min UTC buckets| C[(Local SQLite)]
|
|
192
193
|
C --> D[Web Dashboard]
|
package/README.zh-CN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
### 跨所有 CLI,看清你到底在 AI 上花了多少钱
|
|
8
8
|
|
|
9
|
-
自动采集 **
|
|
9
|
+
自动采集 **13 款 AI 编码工具** 的 token 用量,全程本地聚合,用一套漂亮的 Dashboard 看真实成本与趋势,**还能一键把 Skills 同步到你所有 Agent**。不需要云账号、不需要 API Key、不需要任何配置 —— 一条命令搞定。
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
12
12
|
[](https://www.npmjs.com/package/tokentracker-cli)
|
|
@@ -78,7 +78,7 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
78
78
|
|
|
79
79
|
## ✨ 特性
|
|
80
80
|
|
|
81
|
-
- 🔌 **开箱即用支持
|
|
81
|
+
- 🔌 **开箱即用支持 13 款 AI 工具** —— Claude Code、Codex CLI、Cursor、Gemini CLI、Kiro、OpenCode、OpenClaw、Every Code、Hermes Agent、GitHub Copilot、Kimi Code、CodeBuddy、oh-my-pi
|
|
82
82
|
- 🧩 **Skills 管理器** —— 浏览 250+ 公开 skill(来自 `anthropics/skills`、`ComposioHQ/awesome-claude-skills`、`skills.sh` 以及你自己添加的任何 GitHub 仓库),一次安装,同步到 Claude / Codex / Gemini / OpenCode / Hermes,每个 Agent 单独开关,一键撤销
|
|
83
83
|
- 🏠 **100% 本地** —— Token 数据绝不离开你的机器。无账号、无 API Key
|
|
84
84
|
- 🚀 **零配置** —— 首次运行自动安装所有 hook。30 秒从零到 Dashboard
|
|
@@ -155,11 +155,13 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
155
155
|
| **Hermes Agent** | ✅ 自动 | SQLite sessions 表(`~/.hermes/state.db`) |
|
|
156
156
|
| **GitHub Copilot** | ✅ 自动 | OpenTelemetry 文件导出(`COPILOT_OTEL_FILE_EXPORTER_PATH`) |
|
|
157
157
|
| **Kimi Code** | ✅ 自动 | 被动读取 `wire.jsonl`(`~/.kimi/sessions/**/wire.jsonl`) |
|
|
158
|
+
| **oh-my-pi (Pi Coding Agent)** | ✅ 自动 | 被动读取(`~/.omp/agent/sessions/**/*.jsonl`) |
|
|
159
|
+
| **CodeBuddy** (腾讯) | ✅ 自动 | 写入 `~/.codebuddy/settings.json` 的 SessionEnd hook(Claude-Code fork) |
|
|
158
160
|
|
|
159
161
|
> **需要手动装什么插件 / hook 吗?** 不需要。`tokentracker`(或 `tokentracker init`)第一次跑的时候会全部搞定:
|
|
160
162
|
> - **基于 hook 的工具**(Claude Code、Codex、Gemini、Every Code)—— 我们把 SessionEnd hook 或 TOML notify 条目写入它们自己的配置文件
|
|
161
163
|
> - **基于插件的工具**(OpenCode、**OpenClaw**)—— 插件随 npm 包一起分发(`~/.tokentracker/app/openclaw-plugin/`),通过对应工具自己的 CLI 挂接(`openclaw plugins install --link …` + `enable`)。无需下载、无需拖拽
|
|
162
|
-
> - **被动读取类**(Cursor、Kiro、Hermes、Kimi Code、Copilot
|
|
164
|
+
> - **被动读取类**(Cursor、Kiro、Hermes、Kimi Code、Copilot、**oh-my-pi**)—— 完全不往它们里面塞东西,只读取它们自己产生的文件(SQLite DB、JSONL、OTEL 导出)
|
|
163
165
|
>
|
|
164
166
|
> 任何时候都可以用 `tokentracker status` 查看每个集成的状态。如果显示 `skipped`,`detail` 列会解释原因(例如某工具 CLI 不在 `PATH` 上、config 不可读等)。
|
|
165
167
|
>
|
|
@@ -173,7 +175,7 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
173
175
|
|
|
174
176
|
| | **TokenTracker** | ccusage | Cursor 自带统计 |
|
|
175
177
|
|--------------------------|:---:|:---:|:---:|
|
|
176
|
-
| **支持的 AI 工具数** | **
|
|
178
|
+
| **支持的 AI 工具数** | **13** | 1(Claude) | 1(Cursor) |
|
|
177
179
|
| **本地优先,无需账号** | ✅ | ✅ | ❌ |
|
|
178
180
|
| **原生菜单栏 App** | ✅ | ❌ | ❌ |
|
|
179
181
|
| **桌面小组件** | ✅ 4 个小组件 | ❌ | ❌ |
|
|
@@ -185,7 +187,7 @@ brew install mm7894215/tokentracker/tokentracker
|
|
|
185
187
|
|
|
186
188
|
```mermaid
|
|
187
189
|
flowchart LR
|
|
188
|
-
A["AI CLI 工具<br/>Claude · Codex · Cursor · Gemini · Kiro<br/>OpenCode · OpenClaw · Every Code · Hermes · Copilot · Kimi Code"]
|
|
190
|
+
A["AI CLI 工具<br/>Claude · Codex · Cursor · Gemini · Kiro<br/>OpenCode · OpenClaw · Every Code · Hermes · Copilot · Kimi Code · CodeBuddy · oh-my-pi"]
|
|
189
191
|
A -->|hook 触发| B[Token Tracker]
|
|
190
192
|
B -->|解析日志<br/>30 分钟 UTC 桶| C[(本地 SQLite)]
|
|
191
193
|
C --> D[Web Dashboard]
|