@v1nvn/tokens 0.23.0 → 0.25.0

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 (2) hide show
  1. package/README.md +54 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @v1nvn/tokens
2
+
3
+ The CLI behind the tokens plugin: per-model token usage and cache hit rate
4
+ for the last 24 hours, plus daily totals for the last 7 days, read from local
5
+ Claude Code session transcripts — no model tokens spent to learn what the
6
+ model cost.
7
+
8
+ User-facing docs: [root README](../../README.md).
9
+
10
+ ## Quickstart
11
+
12
+ In Claude Code, the plugin is the way in — `/tokens:usage` runs this CLI
13
+ through a `UserPromptExpansion` hook with zero model tokens:
14
+
15
+ ```sh
16
+ claude plugin marketplace add v1nvn/agentic
17
+ claude plugin install tokens@agentic
18
+ ```
19
+
20
+ In a terminal, bare:
21
+
22
+ ```sh
23
+ npx -y @v1nvn/tokens@0.25.0
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ | Invocation | Does |
29
+ |---|---|
30
+ | `npx -y @v1nvn/tokens@0.25.0` | per-model table: input/output/cache-write/cache-read tokens, cache hit rate, 24 h window + 7-day daily totals |
31
+
32
+ Works for every profile writing to `~/.claude/projects` — default `claude`,
33
+ `claudez`, headless `claude -p` runs alike.
34
+
35
+ ## Develop
36
+
37
+ ```sh
38
+ yarn workspace @v1nvn/tokens build
39
+ yarn workspace @v1nvn/tokens test
40
+ yarn lint && yarn typecheck # from the repo root
41
+ ```
42
+
43
+ ## Modules
44
+
45
+ | File | Role |
46
+ |---|---|
47
+ | `src/index.ts` | bin entry (`tokens-report`) — dispatch, exit codes |
48
+ | `src/scan.ts` | transcript discovery and usage aggregation |
49
+ | `src/format.ts` | the printed tables |
50
+
51
+ ## Contracts
52
+
53
+ - Reads transcripts only; writes nothing.
54
+ - No flags — the report shape is the contract the plugin's hook prints too.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v1nvn/tokens",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "Per-model token usage and cache hit rate from local Claude Code transcripts — the tokens-report CLI behind the tokens plugin.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "node": ">=22"
35
35
  },
36
36
  "dependencies": {
37
- "@v1nvn/agentic-core": "^0.23.0",
37
+ "@v1nvn/agentic-core": "^0.25.0",
38
38
  "commander": "^15.0.0"
39
39
  },
40
40
  "devDependencies": {