omp packages

omp-usage-widgets1.3.2

Claude/Codex/tokscale usage status-line widgets + subagent status widget for omp (oh-my-pi coding agent). Installs itself into ~/.omp/agent/extensions.

akasai Published 1 month ago MIT ~40 downloads/mo

Built for omp

The author tagged this package oh-my-pi.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

omp-usage-widgets

Claude/Codex/tokscale usage status-line widgets + subagent status widget for omp (oh-my-pi coding agent).

  • agent-model-widget.ts — shows active subagents and recently-read skills above the editor.
  • usage-widget/ — shows Claude/Codex OAuth usage percentages plus a right-aligned tokscale ($ cost) segment, matching the native status line's powerline/box-drawing style.

Install

npm install -g omp-usage-widgets

For a local dev build instead of the published registry version:

npm pack && npm install -g ./omp-usage-widgets-*.tgz

The postinstall script (runs via bun) copies both widgets into ~/.omp/agent/extensions/ (or $PI_CODING_AGENT_DIR/extensions under --profile) — omp's native extension auto-discovery picks them up from there with no extensions: config entry or CLI flag needed.

It also appends a default usageWidget: block to ~/.omp/agent/config.yml only if one isn't already there — an existing block is left untouched.

Requirements

  • tokscale CLI for the cost segment: npm i -g @tokscale/cli. Without it, the segment shows an install prompt instead of numbers (no crash).
  • Claude/Codex credentials are per-machine (Keychain / ~/.claude/.credentials.json / ~/.codex/auth.json) — not bundled here, log in separately on each machine.

Updating

npm update -g omp-usage-widgets

This only picks up new versions within the same major (e.g. 1.x → 1.y), matching the ^1.x range npm records for a plain npm install -g with no version pinned. A major bump (breaking config.yml key changes) requires an explicit npm install -g omp-usage-widgets@latest.

Either way, the postinstall script always overwrites ~/.omp/agent/extensions/agent-model-widget.ts and ~/.omp/agent/extensions/usage-widget/ with this package's copies, but never touches config.yml if a usageWidget: block already exists there.

This means: edit widget behavior (bar width, colors, etc.) upstream in this package's source, publish a new version, and update — hand edits made directly under ~/.omp/agent/extensions/ are lost on the next update. Config values (leftInset, showCodex, ...) live in config.yml and always survive.

Config options (usageWidget: in config.yml)

Key Default Description
leftInset 2 Dashes between the left corner and the first pill
rightInset 2 Dashes between the last pill and the right corner
refreshMs 60000 Usage/cost refresh interval
showClaude true Show the Claude usage pill
showCodex true Show the Codex usage pill
showCost true Show the right-aligned tokscale cost segment