← Catalog

@getpipher/omp-statusline

Six/seven-line omp statusline widget: hijri clock, prayer times, API-spend ledger (REPO/DAY/7DAY/30DAY, subagent-inclusive), per-window z.ai or OpenCode Go coding-plan quota rows (provider-gated), and an omp/sl/tern version row.

Extension

Install

Install with PiG

pig install npm:@getpipher/omp-statusline

Install with Pi

pi install npm:@getpipher/omp-statusline
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./src/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.8.12 (README.md). PiG does not review it.

omp-statusline

Seven lines under your editor — Hijri clock, prayer times, API-spend ledger, per-window z.ai or OpenCode Go quota rows, and a version line — styled to match omp's native chrome.

npm CI omp extension node MIT

omp-statusline rendering its rows beneath the editor in a terminal: clock, Hijri date with Gregorian gloss and city; the five prayer times with a green countdown on the next prayer; API spend and token volume per window; one z.ai quota pace row per window with over/under indicators; and an omp/sl/tern version line.

A statusline widget for omp (Oh My Pi) — the omp-native successor to pi-statusline. It renders below the editor in omp's own visual language (· separators, nerd glyphs, theme tokens), and omp's native statusline closes the block beneath it (extension widgets cannot render under it yet — tracked upstream as can1357/oh-my-pi#11100).

What it renders

Render order (top → bottom): info · prayers · money · zai (one row per window) · opencode (one row per Go window) · versions.

LineContents
infoLocal weekday + clock — Sun 21:12 · Hijri date with Gregorian gloss — 1 Jumādá al-ūlá 1448 (11 Oct 2026) · city — all dim. The Hijri date advances at Maghrib, not civil midnight (evening value via Aladhan gToH, cached per city-day; on failure it stays on today's date).
prayersAll five prayers with wall times, from aladhan (cached per local day, stale-marker on degradation). Past prayers get a dim ✓; the next prayer is green with a countdown on its segment only — Fajr 04:15 (7h 03m).
moneyAPI spend + token volume per window: REPO $68.36 (1.3B) (all-time for the current project) · DAY (since 00:00 local) · 7DAY / 30DAY (rolling, hour-aligned). Token volumes are dim, from the same sessions scan.
zaiOne row per quota window — 󰚯 zai 5hrs … / 󰚯 zai 7DAY … — each LABEL usage%/elapsed% (pace · reset · absolute), e.g. 5hrs 16%/26% (30m under · 3h 42m · Mon Oct 12 00:54) / 7DAY 33%/32% (1h 41m over · 4d 19h · Fri Oct 16 16:12). Provider-gated: renders only while the active model's provider is zai (or the provider is unreadable); vanishes entirely on other providers.
opencodeOne row per OpenCode Go window — 󰚯 opencode 5hrs … / 7DAY … / MONTH … — same LABEL usage%/elapsed% (pace · reset · absolute) grammar as zai, sourced from GET https://opencode.ai/zen/go/v1/usage with the omp-stored Go key. MONTH (not 30DAY) because the Go meter is anniversary-based: the window is the calendar month before the reset stamp, 28–31 days. Provider-gated to opencode-go (or an unreadable provider) — opencode-zen is excluded (that endpoint reports the Go plan; Zen is pay-as-you-go).
versions󰚦 omp 18.22.1 · sl 0.8.12 · tern 0.7.2 — host from one --version spawn of the running omp binary (process.execPath, so it is install-agnostic (brew/npm/curl/source) and correct even for sessions resumed across an upgrade); plugin from its own package.json; tern from the TERM_PROGRAM/TERM_PROGRAM_VERSION env the Tern terminal sets — Tern-gated: strict env match, segment omitted outside Tern or when the version is unknown. Omitted entirely when no version is known — never a placeholder.

Pace — window × (usage% − elapsed%)/100 — renders 1h 36m over (orange: burning faster than the clock, quota exhausts early by that much) or 30m under (green: behind the clock). Percent heat: accent < 70%, warning ≥ 70%, error ≥ 90% — raw, so over-quota stays error-red while display caps at 100%+.

The money line is a ledger, not a tracker

Data-flow diagram: the omp sessions tree on disk feeds the money line; the z.ai quota API (key from omp's credential store, with the pi auth file as fallback) feeds the provider-gated zai line; the aladhan API, cached per local day, feeds the prayers and info lines; and the version sources (omp's running binary, the plugin's package.json, the Tern terminal's env) feed the versions row.

Costs are disk-scanned from omp's own session tree (~/.omp/agent/sessions/), not tracked live:

  • every session file embeds its cwd and per-assistant-message usage.cost.total — the tree is a complete ledger;
  • subagent and advisor spend is included: subagent transcripts persist as session-format JSONL artifacts (<repo-slug>/<session-id>/<Agent>.jsonl) and advisor consults as __advisor.jsonl — beside the session (<session-id>/__advisor.jsonl) and nested per agent (<session-id>/<Agent>/__advisor.jsonl) — and are scanned too;
  • entry ids are deduped globally, so branched/resumed session copies never double-count;
  • the sessions tree (including history migrated from pi) supersedes the retired pi-statusline ledger.

The full rescan runs off the render path (~4 s over ~148 k entries) on the poll cycle; renders between polls use the cached snapshot. Countdowns (prayer, quota reset) still move — the widget re-renders every 30 s without touching the network or disk.

Install

omp plugin install @getpipher/omp-statusline

Or from a checkout: omp plugin link /path/to/omp-statusline.

Config

~/.omp/agent/omp-statusline/config.json — every key optional:

{
  "zai": {
    "pollIntervalMs": 180000
  },
  "opencode": {
    "pollIntervalMs": 180000
  },
  "deen": {
    "city": "Jakarta",
    "country": "Indonesia",
    "method": "auto",
    "escalateMinutes": 30
  },
  "accent": true
}
KeyDefaultNotes
zai.pollIntervalMs180000Poll cycle for quota fetch + money rescan (clamped to ≥ 30000).
zai.authJsonPathunsetExplicit pi-style auth JSON {"zai": {"key": "…"}}, read-only — pins that file as the sole key source. Unset (default): the key resolves from omp's own credential store (omp /login → models.yml → env → auth broker) via the host, falling back to ~/.pi/agent/auth.json — omp-only setups need no pi files.
opencode.pollIntervalMs180000Poll cycle for the OpenCode Go usage endpoint (clamped to ≥ 30000); runs alongside the zai poller. The Go key always comes from omp's credential store (no file fallback).
deen.city / deen.countryJakarta / Indonesiaaladhan lookup. city: "auto" resolves city/country/timezone via IP geolocation instead (cached 7 days).
deen.methodautoCalculation method (auto → aladhan default).
deen.escalateMinutes30Minutes-until-next-prayer threshold for the soon escalation band.
accenttrueSession-accent colorizer (Option A): row glyphs + zai/money/version labels pick up omp's per-session accent — the same name-hash hue omp paints the editor border and model name with, re-derived per render so /theme switches re-dress it. Values keep their semantic tokens (heat bands, next-prayer green, money green) regardless. false = tokens-only. Unnamed sessions render tokens-only automatically.

State (deen cache) lives beside the config in ~/.omp/agent/omp-statusline/.

/sl — force refresh & full report

Forces a zai + opencode + deen + money refresh and notifies full source state: quota freshness on both plan meters, today's plan credits, 7-day per-model split, usage streaks, cache-hit rate, prayer city/hijri, and the spend breakdown including subagent + advisor share and entry count:

zai key omp credentials · 5h 16% · weekly 33% · fetched 0m ago · today 7.7K · models 7d glm-5.3 28K · gpt-5.4 9.2K · streak 46d (best 61d) · cache 71% | opencode key omp credentials · 5h 40% · weekly 16% · monthly 8% · fetched 0m ago | deen Jakarta · 1 Jumādá al-ūlá 1448 (11 Oct 2026) · fresh | money REPO $68.36 · DAY $26.50 · 7DAY $315.27 · 30DAY $492.88 · sub $11.02 · 1234 entries

The z.ai dashboard endpoints (credit-usage/usage-detail, credit-usage/activity) accept the same API key as the quota API — no browser or cookie session needed.

Provenance

Data layer (src/quota/, src/deen/, src/adapters/, src/format.ts, src/types.ts) vendored verbatim from @getpipher/pi-statusline (same author, MIT) — see NOTICE. MIT licensed.