llm-usage-metrics 0.6.0 → 0.7.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.
- package/README.md +15 -12
- package/dist/index.js +337 -90
- package/dist/index.js.map +1 -1
- package/package.json +29 -11
package/README.md
CHANGED
|
@@ -55,13 +55,14 @@ llm-usage daily
|
|
|
55
55
|
|
|
56
56
|
## 📋 Supported Sources
|
|
57
57
|
|
|
58
|
-
| Source
|
|
59
|
-
|
|
|
60
|
-
| **pi**
|
|
61
|
-
| **codex**
|
|
62
|
-
| **Gemini CLI**
|
|
63
|
-
| **Droid CLI**
|
|
64
|
-
| **OpenCode**
|
|
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
|
|