Omahub
← All plugins
D

OMP Stats

by Dylan McCavitt

Theme-aware OMP request, token, cache, cost, and model-performance statistics in the Omarchy bar.

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
31a2bd3
Scanned
1 month ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

Low
AI risk level
Low
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
31a2bd3
Reviewed
1 month ago

The plugin is a straightforward bar widget that runs the local `omp stats --json` command via a bash bridge and displays the results. It performs no network requests, does not read credential files, and does not install or modify system components. The code is transparent and well-tested.

  • Executes the external `omp` CLI, which is expected and documented; behavior depends on OMP's own configuration.
  • The bash bridge uses `timeout` and handles errors gracefully, but any external command execution carries inherent risk if the environment is compromised.
How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/dylanmccavitt/omarchy-omp-stats --enable
Developer Tools #bar #quickshell #ai

OMP Stats

A native Omarchy Quattro bar widget for the local omp stats report.

The bar shows live request and cost totals. Its popup condenses OMP's Overview and Models views without scraping sessions or maintaining a second statistics database.

Preview

Panel and vertical bar

<img src="preview.png" alt="OMP Stats panel beside the vertical Omarchy bar" width="568">

Horizontal bar

<img src="assets/bar-horizontal.png" alt="OMP Stats request and cost totals in a horizontal Omarchy bar" width="396">

The screenshots use synthetic usage data and contain no account or session information.

Features

  • Compact request and cost totals in horizontal and vertical bars
  • Canonical OMP terminal Pi logo and compact Pi bar mark
  • Cost, request, token, cache, error-rate, and performance summaries
  • Model request-share, request-trend, TTFT, and tokens-per-second graphs
  • Expandable model details plus project, agent-type, and recent-activity breakdowns
  • Live Omarchy colors, fonts, spacing, and light/dark theme changes
  • Configurable bar metric and 60–3600 second refresh interval
  • Last valid report remains visible when a refresh fails

Requirements

  • Current stable Omarchy Quattro with third-party bar-widget support; verified with Omarchy 4.0.0-1
  • Bash and GNU timeout, both included with Omarchy
  • OMP with omp stats --json support; verified with OMP 17.3.7

The bundled bridge resolves OMP in this order:

  1. OMP_BIN, when explicitly set
  2. omp on PATH
  3. mise which omp
  4. OMP releases under the active mise data directory

No fixed home directory, plugin directory, OMP version, jq, or Python package is required.

Install

Open the OMP Stats listing on Omarchy Plugins to review its checked commit and compatibility status, then copy the current install command. Or install directly:

omarchy plugin add https://github.com/dylanmccavitt/omarchy-omp-stats.git --enable

The manifest places the widget in the right bar section by default. Move it when desired:

omarchy bar move io.github.dylanmccavitt.omp-stats --section right

Update

omarchy plugin update io.github.dylanmccavitt.omp-stats

New installations clone the current main branch. Existing installations remain on their current commit until an update is requested; Omarchy presents the diff for confirmation, validates the fast-forward, and rolls back if validation fails. Manifest versions and GitHub tags document releases but do not pin Omarchy's installer or updater.

Releases and roadmap

  • Releases contain tested compatibility baselines, user-visible changes, and rollback anchors.
  • Milestones are the canonical roadmap.
  • Compatible feature work is batched into at most one minor release per month; empty months are skipped.
  • Tested regression, compatibility, and security/privacy fixes may ship as patch releases sooner.

Runtime changes stay off main until their release is ready. Documentation-only changes do not require a manifest version bump. The marketplace checks upstream on its own schedule, so its displayed version and checked commit can briefly lag the repository.

Configure

The Omarchy bar settings expose:

  • Bar display: Requests and cost, Requests, Cost, or Logo only
  • Refresh interval: 60–3600 seconds; default 300

Horizontal bars show requests and compact cost in the combined mode. Vertical bars show the request count beneath the Pi mark; the tooltip retains precise request and cost totals.

Use

Bar

  • Left-click: open or close the panel
  • Middle-click or right-click: refresh immediately

Panel

  • Click a model row: expand or collapse its performance details
  • G: expand or collapse the first model and scroll to its details
  • M: jump to the Models section
  • R or Enter: refresh
  • Arrow keys or J/K: scroll
  • Esc: close

Shell lifecycle commands use the permanent plugin ID:

omarchy-shell shell summon io.github.dylanmccavitt.omp-stats '{}'
omarchy-shell shell hide io.github.dylanmccavitt.omp-stats

Remove

omarchy plugin remove io.github.dylanmccavitt.omp-stats

Removal is handled by Omarchy: the widget is disabled before its Git checkout is removed.

Data, permissions, and privacy

Omarchy plugins run unsandboxed with the current user's permissions. Review this repository before installation.

This plugin starts the bundled bin/stats-json bridge, which executes the local omp stats --json command and renders its aggregate response. The plugin itself does not:

  • Read OMP credential files
  • Read raw session files
  • Store a second copy of usage data
  • Make network requests
  • Request elevated privileges, manage system services, or run install hooks

OMP may synchronize sessions or contact configured providers as part of its own normal behavior. That remains governed by OMP's configuration.

Architecture

  • BarWidget.qml: canonical Omarchy bar entry point, panel host, live metric, and IPC routes
  • Panel.qml: popup lifecycle, report refresh, keyboard behavior, and Canvas graphs
  • Model.js: report validation, formatting, grouping, and graph transforms
  • bin/stats-json: dependency-free OMP discovery and JSON-output bridge
  • assets/omp-mark.svg: compact OMP Pi mark used by the bar

The bar entry point loads Panel.qml and injects the bar, settings, anchor, and host identity. This matches Omarchy's published bar-widget and nested-panel contract.

Develop and validate

From the repository root:

omarchy plugin validate .
node Model.test.js
bash stats-json.test.sh
/usr/lib/qt6/bin/qmllint -I "$OMARCHY_PATH/shell" BarWidget.qml Panel.qml

Runtime checks:

omp stats --json
omarchy plugin list --json
omarchy-shell shell summon io.github.dylanmccavitt.omp-stats '{}'
omarchy-shell shell hide io.github.dylanmccavitt.omp-stats

Troubleshooting

OMP is not found

Confirm the CLI is available to a non-interactive shell:

command -v omp
omp stats --json

If OMP lives outside PATH and mise, launch Omarchy Shell with OMP_BIN set to the executable's absolute path.

Widget is missing

omarchy plugin validate ~/.config/omarchy/plugins/io.github.dylanmccavitt.omp-stats
omarchy plugin enable io.github.dylanmccavitt.omp-stats
omarchy restart shell

Statistics do not update

Run omp stats --json directly. Authentication, synchronization, and malformed-report errors from OMP are surfaced in the panel without replacing its last valid report.

Attribution

The Pi logo and gradient palette are adapted from Oh My Pi's MIT-licensed terminal branding. The bar and panel integration follows Omarchy's MIT-licensed Quattro plugin contract. Copyright notices are preserved in LICENSE.

Oh My Pi, Omarchy, and their marks belong to their respective owners. This community plugin is not affiliated with or endorsed by either project.

License

MIT. See LICENSE.