llm-usage-metrics 0.10.0 → 0.10.2
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 +9 -3
- package/dist/index.js +1501 -771
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<h1 align="center">llm-usage-metrics</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
|
|
8
|
+
Usage reports for AI coding tools, across all your machines.
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
@@ -23,10 +23,12 @@
|
|
|
23
23
|
<a href="./CONTRIBUTING.md">Contributing</a>
|
|
24
24
|
</p>
|
|
25
25
|
|
|
26
|
-
`llm-usage-metrics` reads local session data from 17 AI coding tools and converts it into one normalized usage history. Use it to review tokens and estimated cost, compare periods, find expensive sessions, correlate usage with local Git activity, or export the result.
|
|
26
|
+
`llm-usage-metrics` reads local session data from 17 AI coding tools, on this machine and on others you reach over ssh, and converts it into one normalized usage history. Use it to review tokens and estimated cost, compare periods, find expensive sessions, correlate usage with local Git activity, or export the result.
|
|
27
27
|
|
|
28
28
|
The CLI parses session content on your machine. It discovers standard source locations and includes a bundled pricing snapshot, so the first report can run without configuration or network access.
|
|
29
29
|
|
|
30
|
+
See [Privacy](https://ayagmar.github.io/llm-usage-metrics/privacy/) for what it reads, stores, and sends over the network.
|
|
31
|
+
|
|
30
32
|
## Quick start
|
|
31
33
|
|
|
32
34
|
Requires Node.js 22.16+ or 24+ (Node 23 lacks the SQLite busy timeout the ledger uses), or Bun 1.4+.
|
|
@@ -193,6 +195,7 @@ Reports can include your other machines' usage over ssh. Install llm-usage-metri
|
|
|
193
195
|
llm-usage machine add laptop # syncs over ssh laptop; see the docs for other destinations
|
|
194
196
|
llm-usage monthly # this machine and the laptop, fetched when due
|
|
195
197
|
llm-usage monthly --machine laptop # only the laptop
|
|
198
|
+
llm-usage # the summary splits this month's cost by machine
|
|
196
199
|
```
|
|
197
200
|
|
|
198
201
|
A session that reached both machines (a copied or synced `~/.claude`) is counted once. See [Multiple machines](https://ayagmar.github.io/llm-usage-metrics/machines/).
|
|
@@ -204,9 +207,10 @@ llm-usage daily --all --json
|
|
|
204
207
|
llm-usage daily --markdown
|
|
205
208
|
llm-usage daily --compact
|
|
206
209
|
llm-usage monthly --share
|
|
210
|
+
llm-usage weekly --last 1 --no-cost
|
|
207
211
|
```
|
|
208
212
|
|
|
209
|
-
Terminal tables fit the terminal width: on a narrow terminal, token counts are abbreviated and less-used columns are hidden, with a `stderr` note saying what was left out. `--compact` asks for the short table directly.
|
|
213
|
+
Terminal tables fit the terminal width: on a narrow terminal, token counts are abbreviated and less-used columns are hidden, with a `stderr` note saying what was left out. `--compact` asks for the short table directly. `--last N` covers the last N days, weeks, or months, counting the current one, and `--no-cost` leaves spend out of tables and share cards.
|
|
210
214
|
|
|
211
215
|
Report data goes to `stdout`. Diagnostics go to `stderr` as one summary line plus any warnings, which keeps JSON and Markdown safe to redirect; `--quiet` keeps only warnings and `--verbose` adds per-source and skipped-row detail. JSON output is wrapped in a versioned envelope: `{ "schemaVersion": 1, "report": "usage", "data": ... }`. Scripts written against pre-0.8.0 JSON should follow the [migration guide](https://ayagmar.github.io/llm-usage-metrics/migrating-to-0-8/).
|
|
212
216
|
|
|
@@ -231,6 +235,8 @@ pnpm run build
|
|
|
231
235
|
|
|
232
236
|
The website has a [docs overview](https://ayagmar.github.io/llm-usage-metrics/docs/) and a [report chooser](https://ayagmar.github.io/llm-usage-metrics/reports/) for finding the right command. Its landing page and source navigation use the CLI source registry; regenerate CLI and security references after behavior changes.
|
|
233
237
|
|
|
238
|
+
For LLMs and agents, the docs are also published as [llms.txt](https://ayagmar.github.io/llm-usage-metrics/llms.txt) (plus `llms-full.txt` with every page inlined).
|
|
239
|
+
|
|
234
240
|
Site commands:
|
|
235
241
|
|
|
236
242
|
```bash
|