@ipv9/tokentracker-cli 0.39.48 → 0.39.49

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 CHANGED
@@ -78,7 +78,7 @@ Both bundle their own Node runtime, so there is nothing else to install. They sh
78
78
 
79
79
  ## ✨ What you get
80
80
 
81
- - 🔒 **Your usage data never leaves your machine.** Token counts and timestamps only never prompts, responses, or file contents. No account, no telemetry, no analytics, no phone-home. TokenTracker does make a few outbound calls *on your behalf* (model prices, your own plan quotas); every one is named in [Privacy](#-privacy) below, and none of them carry your usage.
81
+ - 🔒 **Your usage data never leaves your machine.** Usage metadata only — source, model, token and conversation counts, timestamps, and derived cost; never prompts, responses, message bodies, or private user-code paths. No account, no telemetry, no analytics, no phone-home. TokenTracker does make documented outbound calls *on your behalf* (for example model prices, provider authentication/quotas, and opt-in tools); none upload token-usage metadata.
82
82
  - 📊 **One calm web dashboard.** Your whole picture in the browser at a local URL, no login — light or dark, auto-refreshing while the tab is open. [What's on it ↓](#-the-dashboard)
83
83
  - 📈 **Quota at a glance, on every card.** Live plan-quota usage (e.g. 5h + weekly) as color-coded chips right on each provider's card — see how close you are to your limits without leaving the overview. Where the provider reports countable units you get the actual number rather than a percentage to convert in your head: GitHub Copilot reads `158/300` premium requests. Full windows + reset countdowns on the Limits page. Covers Claude, Codex, Cursor, Gemini, Kimi, Z.AI, Kiro, Copilot, and Antigravity.
84
84
  - 💰 **Cost you can trust — and a price tag when it can't.** 2,200+ models priced from [LiteLLM](https://github.com/BerriAI/litellm) (refreshed daily) with a bundled offline snapshot, so USD totals are right even without a network. A model too new to have a price is badged **pricing missing** rather than quietly counted as $0, and prices refresh in the background instead of waiting for a restart. Cross-provider records are de-duplicated to match each provider's own billing.
@@ -122,14 +122,14 @@ Rate-limit providers are auto-detected where possible. For Z.AI / GLM Coding Pla
122
122
  ## 🧩 How it works
123
123
 
124
124
  ```
125
- AI CLI tools → hooks / passive readers → local queue file → dashboard
126
- (logs) (token counts only) (30-min buckets) (your browser)
125
+ AI CLI tools → hooks / passive readers → local queue files → dashboard
126
+ (logs) (usage metadata) (30-min buckets) (your browser)
127
127
  ```
128
128
 
129
129
  1. Your AI tools write logs during normal use.
130
- 2. Lightweight hooks (or passive file readers) pick up token counts locally — never prompt or response content. Some tools keep their logs in SQLite (Cursor, Kiro, Zed and friends); TokenTracker only ever *reads* those.
131
- 3. Counts are aggregated into 30-minute UTC buckets and appended to one plain-text file: `~/.tokentracker/tracker/queue.jsonl`.
132
- 4. The dashboard reads that file and renders it in your browser's timezone.
130
+ 2. Lightweight hooks and passive readers parse tool logs locally, then retain only approved usage metadata — never prompts or response content. Some tools keep their logs in SQLite (Cursor, Kiro, Zed and friends); TokenTracker reads those databases without modifying them.
131
+ 3. Counts are aggregated into 30-minute UTC buckets and appended to `~/.tokentracker/tracker/queue.jsonl`; per-project counts and local project identifiers are also written to `~/.tokentracker/tracker/project.queue.jsonl`.
132
+ 4. The dashboard reads those local queues, derives cost, renders in your browser's timezone, and may cache usage summaries and daily rows in browser localStorage.
133
133
 
134
134
  No account, no upload of your usage, and no server to sign in to.
135
135
 
@@ -139,11 +139,13 @@ No account, no upload of your usage, and no server to sign in to.
139
139
 
140
140
  | Protection | What it means |
141
141
  |---|---|
142
- | **No content** | Only token counts and timestamps. Never prompts, responses, or files. |
143
- | **Your usage stays local** | Every count TokenTracker collects is written to one file on your disk and read back by a server on your own machine. There is no endpoint it uploads usage to. |
144
- | **Auditable in one command** | You don't have to take our word for it the store is an append-only text file you can open yourself: `cat ~/.tokentracker/tracker/queue.jsonl`. It's numbers and timestamps. |
142
+ | **Usage metadata only** | Source, model, token and conversation counts, timestamps, and derived cost. Never prompts, responses, message bodies, or private user-code paths. |
143
+ | **Your usage stays local** | Usage rows stay in `queue.jsonl` and `project.queue.jsonl`; derived summaries may also be cached in browser localStorage. No TokenTracker endpoint uploads usage. |
144
+ | **Auditable locally** | Inspect both queue files with `cat ~/.tokentracker/tracker/{queue.jsonl,project.queue.jsonl}` and inspect optional browser localStorage caches in your browser's developer tools. The project queue includes local project identifiers. |
145
145
  | **No telemetry** | No analytics, no crash reporting, no phone-home, no account. |
146
146
 
147
+ Credentials are used only for declared provider authentication or quota flows and their credential files; never place them in TokenTracker queues, logs, fixtures, diagnostics, API responses, or unrelated outbound payloads.
148
+
147
149
  **Outbound calls.** TokenTracker is local-first, not network-free. It reaches these hosts and no others. None of them carry your usage data — but some do reveal that *you* are asking, so they are listed with who makes the call.
148
150
 
149
151
  This table is checked in CI against [`outbound-hosts.json`](outbound-hosts.json): a host the code can reach but the file does not declare fails the build, and so does a declared host missing from this table. It is not maintained by memory.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ipv9/tokentracker-cli",
3
- "version": "0.39.48",
3
+ "version": "0.39.49",
4
4
  "description": "Local-first token and cost dashboard for 22 AI coding tools, including Claude Code, Codex, Cursor, Gemini, Kiro, OpenCode, OpenClaw, Copilot, Antigravity, Zed, and Goose.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -75,7 +75,7 @@ function printHelp() {
75
75
  " - Every Code notify installs when ~/.code/config.toml exists.",
76
76
  " - OpenClaw hook auto-links when OpenClaw is installed (requires gateway restart).",
77
77
  " - serve prints the local dashboard URL; pass --open to ask the OS to open a browser.",
78
- " - sync parses ~/.codex/sessions/**/rollout-*.jsonl and ~/.code/sessions/**/rollout-*.jsonl into the local queue. Nothing is uploaded.",
78
+ " - sync parses ~/.codex/sessions/**/rollout-*.jsonl and ~/.code/sessions/**/rollout-*.jsonl into local queues; sync does not upload token-usage metadata.",
79
79
  " - --from-openclaw marks sync runs triggered by OpenClaw hooks.",
80
80
  " - --debug shows original backend errors.",
81
81
  "",
@@ -218,7 +218,7 @@ function renderWelcome() {
218
218
  "",
219
219
  `${BOLD}Token Tracker${RESET} ${color("Local-first usage across " + providerCount + " AI CLIs", DIM)}`,
220
220
  DIVIDER,
221
- `${CYAN}Nothing leaves your machinetoken counts only, never prompts or responses.${RESET}`,
221
+ `${CYAN}Usage metadata stays local — never prompts or responses; optional outbound calls are documented.${RESET}`,
222
222
  DIVIDER,
223
223
  "",
224
224
  ` Tracks: ${providerLine}`,
@@ -304,7 +304,7 @@ async function runSetup({
304
304
  // Scrub cloud credentials and endpoints on upgrade. Spreading the previous
305
305
  // config forward kept a live InsForge bearer token in config.json, and this
306
306
  // branch also removed the `status` / `diagnostics` lines that used to reveal
307
- // it — so the user is told "local-only, nothing is uploaded" while a valid
307
+ // it — making the user-facing local-usage privacy claim false while a valid
308
308
  // credential sits on disk with nothing left to report or rotate it.
309
309
  const {
310
310
  deviceToken: _removedDeviceToken,
@@ -932,11 +932,9 @@ if (debugEnabled) {
932
932
  }
933
933
 
934
934
  // Throttle spawn: at most once per 20 seconds.
935
- // Parsing local logs and uploading to the cloud are two separate decisions.
936
- // This hook makes only the first one. It runs whether or not a device token
937
- // exists, because a local-only install still needs its queue refreshed when a
938
- // session ends. Upload stays gated on a device token inside sync itself, so
939
- // no credential here means local parse happens and nothing is transmitted.
935
+ // This hook only starts local parsing and queue refresh. Provider quota/auth
936
+ // requests are separate, declared server flows; this generated hook does not
937
+ // upload token-usage metadata or carry provider credentials.
940
938
  try {
941
939
  const throttlePath = path.join(trackerDir, 'sync.throttle');
942
940
  const now = Date.now();