Skip to content

Releases

v0.3.1 — Bundled Agent Skills (toklens-audit & toklens-budget) + H3 TTL/Switch Attribution

Choose a tag to compare

@darialan darialan released this 03 Dec 10:56

What's New

  • Two decoupled bundled Agent Skills shipped inside the repo and npm package:
    • skills/toklens-audit/: periodic AI usage audits, longitudinal KPI board (~/.config/toklens/audit-ledger.md), hypothesis verification/falsification, and usage hygiene rule iteration.
    • skills/toklens-budget/: monthly AI coding budget & plan advisor comparing pay-as-you-go official APIs, flat-rate Coding Plans / Token Plans, and hybrid peak/off-peak splits using real toklens cache hit rates and 5h burst percentiles.
  • Auto-install on global npm install: npm install -g toklens automatically installs both skills to ~/.agents/skills/ (and updates existing ~/.claude/skills, ~/.gemini/config/skills, ~/.codex/skills; opt out with TOKLENS_SKIP_SKILL_INSTALL=1). Also added toklens install-skill for manual/npx installation.
  • Improved toklens audit Rule 4 (high-uncached-spike): Measures >= 30K uncached spikes on high-cost models by same-session model alternation (e.g. Plan Mode), idle >= 4.5 min TTL expiry, other cache eviction/callbacks, vs genuine large net-new pastes.

Install / Upgrade

npm install -g toklens
# or install skills via npx
npx toklens install-skill

v0.3.0 — Local Waste Attribution (toklens audit), --for-ai Export & Configurable --budget

Choose a tag to compare

@darialan darialan released this 03 Dec 06:59

What's New

  • toklens audit (100% local deterministic rules engine, zero API keys):
    • Automatically flags mid-session model switching that busts Prompt Cache (cache-bust), >= 200K context snowballing (context-bloat, configurable via --context-limit), high-cost models fed raw bulk inputs with short outputs (expensive-raw-input), legacy model overpayment (legacy-model), weekday peak-hour surcharges (peak-mismatch), and channel sprawl (channel-sprawl).
    • Outputs masked offending session tables (8-char session ID prefixes, zero prompt text) and concrete recommendations in table, md, or json.
  • toklens audit --for-ai: Exports a privacy-safe, ready-to-paste diagnostic prompt + structured JSON bundle (zero chat text, zero local paths) for your own AI assistant (Claude Code / Codex / ChatGPT).
  • Configurable budget (--budget <cny> & defaultBudgetCny in pricing.json): Replaces the previous hardcoded ¥100 budget in --simulate.

Install / Upgrade

npx toklens@latest --last 7d
npx toklens@latest audit --last 30d

v0.2.1 — WorkBuddy / WorkBuddy AI Adapter

Choose a tag to compare

@darialan darialan released this 03 Dec 06:17

What's New

  • Added dedicated workbuddy adapter (14 adapters total) for Tencent WorkBuddy / WorkBuddy AI (~/.workbuddy-ai/projects/**/*.jsonl & ~/.workbuddy/projects/**/*.jsonl, $WORKBUDDY_CONFIG_DIR).
  • Parses per-call token usage (providerData.rawUsage, providerData.usage, message.usage) on both function_call and assistant message records, accurately separating cache hits/misses and deduplicating by messageId.
  • Added built-in WorkBuddy-Auto rule for WorkBuddy's auto / fast-model routing while keeping concrete model IDs matched to official CNY/USD pricing.

Install / Upgrade

npx toklens@latest --last 7d

v0.2.0 — 13 Mainstream Domestic & Overseas Adapters + Windows CI

Choose a tag to compare

@darialan darialan released this 03 Dec 05:36

What's new in v0.2.0

Expanded local adapter coverage from 5 to 13 mainstream AI coding tools:

  • VS Code / Cursor / Windsurf: Cline, Roo Code, Kilo Code (vscode-cline)
  • Domestic Chinese CLIs & Agents: Tencent CodeBuddy (codebuddy), DeepSeek Harness (deepseek-harness / dsh, multi-frame .jsonl.zstd), Kimi Code CLI (kimi-code), Alibaba Qwen Code (qwen-code), OpenClaw (openclaw)
  • Overseas CLIs: Pi Coding Agent (pi), Google Gemini CLI (gemini-cli)
  • New toklens adapters command to inspect detected local tools
  • Added windows-latest to GitHub Actions CI matrix + Windows OpenCode path support

Try it

npx toklens@latest adapters
npx toklens@latest --last 7d

v0.1.1 — Clean npx bin entry

Choose a tag to compare

@darialan darialan released this 03 Dec 04:37

Fix package.json bin path normalization (dist/cli.js) for clean npx toklens execution.

v0.1.0 — Initial Public Release

Choose a tag to compare

@darialan darialan released this 03 Dec 04:36

What's in v0.1.0

  • Multi-agent local log adapters: Claude Code, Codex (.jsonl + .jsonl.zst), OpenCode, MiniMax Mavis, and Antigravity
  • Built-in CNY/USD official API pricing (including DeepSeek Beijing-time peak/off-peak 50% discount) + user override via ~/.config/toklens/pricing.json
  • Zero-native-dependency incremental SQLite cache (node:sqlite, ~0.3s warm runs)
  • Multi-dimension views (--by family|tool|channel|day), migration budget simulator (--simulate), and 5-hour rolling window burst stats (--burst)
  • Table, Markdown, JSON, and CSV output formats

Quick Try

npx toklens --last 7d