Omahub
← All plugins
D

Grok Usage

by dougfour

Adds Grok to Omarchy's existing AI toolbar widget (the stock AI icon), not a new bar icon.

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
ff0fecf
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

None
AI risk level
None
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
ff0fecf
Reviewed
1 month ago

The plugin is a transparent headless collector that reads local Grok session files and the saved Grok login token to fetch weekly usage from xAI's billing endpoint, then writes a usage record for the stock Omarchy AI panel. The code is readable, uses safe file handling (O_NOFOLLOW, size limits), and performs no destructive or hidden actions. The deterministic scan found no issues, and my review agrees.

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/dougfour/omarchy-grok-usage --enable
Developer Tools #bar #quickshell #ai

Grok Usage

Adds Grok to Omarchy's existing AI toolbar widget — the AI icon already on the top bar. It does not add a second icon.

After install, click that same AI button. You get a Grok chip next to Claude Code (and Codex / Fireworks if you use them): weekly SuperGrok pool, Grok Build vs Chat vs Imagine, and local token stats from ~/.grok/sessions.

Grok inside Omarchy's existing AI toolbar widget

Install

omarchy plugin add https://github.com/dougfour/omarchy-grok-usage.git --enable

Requires:

  • Omarchy with the stock AI widget enabled (omarchy.agents, on by default)
  • Python 3 on PATH (stdlib only)
  • Grok Build signed in (grok login) so weekly limits can load

Leave the built-in AI icon where it is. After the first scan, click it and switch to Grok.

Usage

  • Left click the existing AI icon: usage panel
  • Switch to Grok with the chip in the panel (or middle-click the icon)
  • r or Enter in the panel: refresh (Grok follows the stock update)
  • Grok also refreshes about every 5 minutes

This plugin is a headless service. It only writes a Grok usage record for the stock panel to display.

Weekly percent comes from https://cli-chat-proxy.grok.com/v1/billing?format=credits using the token in ~/.grok/auth.json. Token charts come from ~/.grok/sessions/**/updates.jsonl.

Remove

omarchy plugin remove io.github.dougfour.grok-usage

Removal deletes the plugin checkout and drops ~/.local/state/omarchy/agents/usage/grok.json, so the Grok chip leaves the stock AI panel. It does not change ~/.grok/auth.json or session files.

Privacy

The collector reads local Grok session files and the saved Grok login, then calls xAI's billing endpoint. It never logs tokens. Expired tokens are not refreshed; run grok login (or start Grok) to renew them.

License

MIT. See LICENSE.