@tommasomarchionni/omp-usage1.0.0
OMP plugin for collecting LLM usage events
Built for omp
The author tagged this package oh-my-pi.
Reports 0
No reports yet.
Readme
@tommasomarchionni/omp-usage
Oh My Pi extension that records LLM usage metadata (provider, model, tokens, reported cost, stop reason) as local JSONL files. Pair it with @tommasomarchionni/omp-usage-exporter to get Prometheus metrics and Grafana dashboards.
Install
omp plugin install @tommasomarchionni/omp-usage
Events are written to ~/.local/state/omp-usage/events/<sessionRunId>.jsonl (override with OMP_USAGE_EVENTS_DIR).
Privacy
Only whitelisted usage fields are written. Message content, tool input/output, headers and API keys are never recorded, and nothing is sent over the network.
Reliability
- Events are written right after each
message_end, and flushed synchronously onsession_shutdown. - Write failures are retried; anything dropped is counted in
/omp-usage status. - The plugin never throws into OMP.
- Retention is off by default. Use
omp-usage-exporter --retention-days N, which only deletes files that are fully imported.
Commands
/omp-usage status
/omp-usage retention [N|off]
/omp-usage prune
Documentation: https://tommasomarchionni.github.io/omp-usage/plugin/ · License: MIT