llm-usage-metrics 0.6.0 โ†’ 0.7.1

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
@@ -55,13 +55,14 @@ llm-usage daily
55
55
 
56
56
  ## ๐Ÿ“‹ Supported Sources
57
57
 
58
- | Source | Pattern | Discovery |
59
- | -------------- | ---------------------------------------- | -------------------------------- |
60
- | **pi** | `~/.pi/agent/sessions/**/*.jsonl` | Automatic |
61
- | **codex** | `~/.codex/sessions/**/*.jsonl` | Automatic |
62
- | **Gemini CLI** | `~/.gemini/tmp/*/chats/*.json` | Automatic |
63
- | **Droid CLI** | `~/.factory/sessions/**/*.settings.json` | Automatic |
64
- | **OpenCode** | `~/.opencode/opencode.db` | Auto or explicit `--opencode-db` |
58
+ | Source | Pattern | Discovery |
59
+ | --------------- | ---------------------------------------- | -------------------------------- |
60
+ | **pi** | `~/.pi/agent/sessions/**/*.jsonl` | Automatic |
61
+ | **codex** | `~/.codex/sessions/**/*.jsonl` | Automatic |
62
+ | **Gemini CLI** | `~/.gemini/tmp/*/chats/*.json` | Automatic |
63
+ | **Droid CLI** | `~/.factory/sessions/**/*.settings.json` | Automatic |
64
+ | **OpenCode** | `~/.opencode/opencode.db` | Auto or explicit `--opencode-db` |
65
+ | **Claude Code** | `~/.claude/projects/**/*.jsonl` | Automatic |
65
66
 
66
67
  OpenCode source support requires Node.js 24+ runtime with built-in `node:sqlite`.
67
68
 
@@ -154,9 +155,10 @@ llm-usage efficiency monthly --repo-dir /path/to/repo --source codex
154
155
  llm-usage efficiency monthly --repo-dir /path/to/repo --source gemini
155
156
  llm-usage efficiency monthly --repo-dir /path/to/repo --source droid
156
157
  llm-usage efficiency monthly --repo-dir /path/to/repo --source opencode
158
+ llm-usage efficiency monthly --repo-dir /path/to/repo --source claude
157
159
  ```
158
160
 
159
- Note: usage filters (`--source`, `--provider`, `--model`, `--pi-dir`, `--codex-dir`, `--gemini-dir`, `--droid-dir`, `--opencode-db`, `--source-dir`) also constrain commit attribution: only commit days with matching repo-attributed usage events are counted.
161
+ Note: usage filters (`--source`, `--provider`, `--model`, `--pi-dir`, `--codex-dir`, `--gemini-dir`, `--droid-dir`, `--claude-dir`, `--opencode-db`, `--source-dir`) also constrain commit attribution: only commit days with matching repo-attributed usage events are counted.
160
162
 
161
163
  ### Optimize Reports
162
164
 
@@ -177,7 +179,7 @@ llm-usage optimize monthly --provider openai --candidate-model gpt-4.1 --candida
177
179
 
178
180
  ```bash
179
181
  # By source
180
- llm-usage monthly --source pi,codex,gemini,droid
182
+ llm-usage monthly --source pi,codex,gemini,droid,claude
181
183
 
182
184
  # By provider
183
185
  llm-usage monthly --provider openai
@@ -189,17 +191,18 @@ llm-usage monthly --model claude
189
191
  llm-usage monthly --source opencode --provider openai --model gpt-4.1
190
192
  ```
191
193
 
192
- Use `--source` to scope where events came from (`pi`, `codex`, `gemini`, `droid`, `opencode`), and `--provider` to scope the billing entity behind those events.
194
+ Use `--source` to scope where events came from (`pi`, `codex`, `gemini`, `droid`, `opencode`, `claude`), and `--provider` to scope the billing entity behind those events.
193
195
 
194
196
  ### Custom Paths
195
197
 
196
198
  ```bash
197
199
  # Custom directories
198
- llm-usage daily --source-dir pi=/path/to/pi --source-dir codex=/path/to/codex --source-dir gemini=/path/to/.gemini --source-dir droid=/path/to/.factory/sessions
200
+ llm-usage daily --source-dir pi=/path/to/pi --source-dir codex=/path/to/codex --source-dir gemini=/path/to/.gemini --source-dir droid=/path/to/.factory/sessions --source-dir claude=/path/to/.claude/projects
199
201
 
200
- # Explicit Gemini/Droid/OpenCode paths
202
+ # Explicit Gemini/Droid/Claude/OpenCode paths
201
203
  llm-usage daily --gemini-dir /path/to/.gemini
202
204
  llm-usage daily --droid-dir /path/to/.factory/sessions
205
+ llm-usage daily --claude-dir /path/to/.claude/projects
203
206
  llm-usage daily --opencode-db /path/to/opencode.db
204
207
  ```
205
208
 
@@ -211,6 +214,9 @@ llm-usage monthly --pricing-offline
211
214
 
212
215
  # Continue even if pricing fetch fails
213
216
  llm-usage monthly --ignore-pricing-failures
217
+
218
+ # Override per-model pricing from a local JSON file
219
+ llm-usage monthly --pricing-overrides ./pricing-overrides.json
214
220
  ```
215
221
 
216
222
  ## ๐Ÿงช Production Benchmarks
@@ -310,8 +316,8 @@ See full environment variable reference in the [documentation](https://ayagmar.g
310
316
  The CLI performs lightweight update checks with smart defaults:
311
317
 
312
318
  - 1-hour cache TTL
313
- - Fresh cached update results are used immediately
314
- - Stale or missing cache refreshes in the background instead of blocking report execution
319
+ - Fresh cached update results are used immediately without any network call
320
+ - Stale or missing cache triggers a bounded fetch (default 1s timeout) so the update prompt stays consistent across commands, instead of silently skipping the run that refreshes the cache
315
321
  - Skipped for `--help`, `--version`, `npx`, and direct source/development runs
316
322
  - Prompts only in interactive TTY sessions
317
323