@aiusage/cli 1.7.3 → 1.7.4

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.
Files changed (3) hide show
  1. package/README.md +25 -6
  2. package/dist/cli.js +1295 -618
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,12 +9,31 @@
9
9
  - scheduling automatic sync to an AIUsage Worker
10
10
  - diagnosing configuration and connectivity issues
11
11
 
12
- Kimi scanning supports both legacy Kimi CLI data in `~/.kimi/sessions/` and
13
- new Kimi Code data in `$KIMI_CODE_HOME/sessions/` (default:
14
- `~/.kimi-code/sessions/`). It reads only token counters and session metadata
15
- from `wire.jsonl`; conversation content is not uploaded. The new wire-format
16
- parser references the MIT-licensed [tokscale](https://github.com/junhoyeo/tokscale)
17
- implementation.
12
+ The local scanners have been compatibility-audited against the overlapping
13
+ parsers in the MIT-licensed [tokscale](https://github.com/junhoyeo/tokscale)
14
+ project. AIUsage keeps tool-specific safeguards where the source semantics
15
+ differ, rather than treating every local record as billable token usage.
16
+
17
+ ## Local scanner coverage
18
+
19
+ | Tool | Sources and compatibility behavior |
20
+ |------|------------------------------------|
21
+ | Claude Code | `~/.config/claude/projects/` and `~/.claude/projects/` JSONL; deduplicates parent/sidechain replays, merges streaming snapshots per token field, and honors wrapper providers. Aggregate `stats-cache.json` is intentionally not converted into guessed per-message usage. |
22
+ | Codex CLI | Active and archived `~/.codex` sessions; fork-aware replay boundaries, inherited baselines, `last_token_usage`, and total-delta fallback. |
23
+ | Cursor | Reads the local `state.vscdb` credential and requests Cursor's token-strategy usage CSV; the database is snapshotted when locked. |
24
+ | Copilot CLI | OpenTelemetry JSONL under `~/.copilot/otel/` plus `session-state` shutdown totals; granular inference spans supersede same-trace aggregates. |
25
+ | Copilot for VS Code | Chat logs, legacy session JSON, and modern CRDT `workspaceStorage/**/chatSessions/*.jsonl`; modern sessions contribute real token fields, while legacy records remain interaction-only. |
26
+ | Gemini CLI | Session JSON/JSONL, headless stats, and `$set.messages` updates under `~/.gemini/tmp/`, with last-write-wins request deduplication. |
27
+ | Antigravity | `~/.gemini/antigravity/brain` and browser-recording metadata; currently reports interaction counts because those artifacts do not expose reliable token counters. |
28
+ | Amp | `~/.local/share/amp/threads/`; reconciles the usage ledger with message usage so partial ledgers are completed without double-counting. |
29
+ | Kimi CLI / Kimi Code | Legacy `~/.kimi/sessions/` and `$KIMI_CODE_HOME/sessions/` (default `~/.kimi-code/sessions/`) `wire.jsonl`; handles progressive status snapshots and nested agent sessions. |
30
+ | Qwen Code | Current `~/.qwen/projects/` and legacy `~/.qwen/tmp/` chat JSONL, with session/position deduplication and cache-aware input accounting. |
31
+ | Droid | `~/.factory/sessions/*.settings.json`; uses persisted token totals first and the transcript only as a model fallback. |
32
+ | OpenCode | OpenCode 1.2+ `opencode.db` through read-only `sqlite3`, plus legacy `storage/message/*.json`. |
33
+ | Pi / Oh My Pi | `~/.pi/agent/sessions/` and `~/.omp/agent/sessions/` JSONL, including provider, cache-write, and session metadata. |
34
+
35
+ Only token counters and session metadata are aggregated or uploaded. Conversation
36
+ content and local credentials are never uploaded.
18
37
 
19
38
  ## Install
20
39