Omahub
← All plugins
L

Magilla AI Usage

by Leonardo Bassanello (xFurti)

Magilla-themed Omarchy bar widget that detects AI coding tools and shows subscription usage, remaining quota, and reset countdowns in one place.

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
b7fd3c9
Scanned
7 hours 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
b7fd3c9
Reviewed
2 hours ago

This plugin reads local configuration and state files of popular AI coding tools to report usage, and queries their official usage endpoints using credentials already on disk. Network traffic is restricted to a small allow-list, no credentials are stored, and there is no obfuscated, destructive, or persistence behavior. No notable security risk for a user installing it via the Omarchy plugin manager.

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/xFurti/omarchy-magilla-ai-usage --enable
Widgets #bar #quickshell #ai

Magilla AI Usage

A Magilla-themed Omarchy shell plugin for people who run more than one AI coding tool.

Purple derby, banana yellow, soft pink — playful enough to spot on the bar, quiet enough to live there all day. Magilla watches Grok, Cursor, Claude Code, Codex, OpenCode, and the rest of the usual suspects, then puts leftover quota, plan names, and reset countdowns in one place.

<p align="center"> <img src="assets/magilla-mark.png" alt="Magilla mascot" width="160" height="160"> </p>

Features

  • Bar — up to three signed-in providers, official icons and percent used
  • Panel — stacked usage cards (plan, leftover, reset, pace) for accounts with live quota
  • Settings — pin to the bar; installed tools without a login stay here until you sign in
  • Detection — Grok, Cursor, Claude Code, Codex, OpenCode, Gemini, Copilot, Crush, Pi, Fireworks
  • Keyboard — Esc closes, R refreshes, S settings, Tab neighboring panel

Screenshots

<p align="center"> <img src="docs/bar.png" alt="Magilla on the Omarchy bar"> </p> <p align="center"> <img src="docs/panel.png" alt="Magilla Usage panel" width="380"> </p> <p align="center"> <img src="docs/settings.png" alt="Magilla settings" width="380"> </p>

Install

omarchy plugin add https://github.com/xFurti/omarchy-magilla-ai-usage.git --enable

The widget lands on the right of the bar. Move it with:

omarchy bar move io.github.xfurti.magilla-ai-usage --section right

Magilla can sit next to Omarchy's built-in Agents widget. If you only want one usage chip, disable the stock one:

omarchy plugin disable omarchy.agents

Requirements

  • Python 3 with the standard library only. No pip packages, no extra system packages, no sudo.
  • Optional: Omarchy's first-party omarchy-agent-usage-claude, omarchy-agent-usage-codex, and omarchy-agent-usage-fireworks when those CLIs are installed. Magilla reuses them if present and otherwise stays quiet.
  • Collectors talk to provider APIs only with credentials already on disk (Grok auth.json, Cursor app session). Magilla does not store API keys, cookies, or emails.

Install and enable go through omarchy plugin add / omarchy plugin enable. Magilla does not rewrite shell.json or other plugins unless you change its own bar settings.

Provider product marks in assets/icons/ remain the trademarks of their owners. Sources are listed in assets/SOURCES.md. Magilla is not affiliated with those tools.

Remove

omarchy plugin remove io.github.xfurti.magilla-ai-usage

That disables Magilla, then deletes the git checkout under ~/.config/omarchy/plugins/. Optional leftover caches (no secrets) live in ~/.local/state/magilla-ai-usage/ and ~/.cache/magilla-ai-usage/ — delete those by hand if you want a clean uninstall.

How to choose which providers appear in the bar

Left-click the chip, then the gear.

  1. Enable or disable each signed-in tool
  2. Pin up to three providers to the bar
  3. Pick a display style:
    • percent — used quota (Grok 32%)
    • remaining — leftover quota (Grok 68%)
    • compact — numbers only

By default Magilla only enables tools that are signed in. Installed CLIs without a login stay off until you turn them on in Settings.

Leave the bar list empty to auto-pick up to three signed-in tools.

From the command line:

omarchy bar set io.github.xfurti.magilla-ai-usage barSlots 'grok,cursor,claude'
omarchy bar set io.github.xfurti.magilla-ai-usage displayStyle remaining
omarchy bar set io.github.xfurti.magilla-ai-usage refreshIntervalSec 180 --json

Nested enablement lives under providers in ~/.config/omarchy/shell.json, or:

omarchy bar set io.github.xfurti.magilla-ai-usage providers '{
  "grok": { "enabled": true },
  "cursor": { "enabled": true },
  "claude": { "enabled": true },
  "codex": { "enabled": false }
}' --json

Interactions

Action What it does
Left-click the bar Open / close the panel
Right-click or middle-click Refresh now
R or Enter in the panel Refresh
S Toggle Magilla Settings
Esc Close settings, then the panel
Tab Neighboring Omarchy bar panel

Supported providers

Detection honors environment variables instead of baking in fragile absolute paths (GROK_HOME, CLAUDE_CONFIG_DIR, CODEX_HOME, CURSOR_CONFIG_DIR, XDG_*).

Id Tool How Magilla finds it Usage source
grok Grok / SuperGrok $GROK_HOME (default ~/.grok), grok CLI, auth.json SuperGrok billing pool + local updates.jsonl turn totals
cursor Cursor $XDG_CONFIG_HOME/Cursor, cursor / cursor-agent Cursor dashboard plan usage (app session)
claude Claude Code $CLAUDE_CONFIG_DIR, claude CLI Omarchy omarchy-agent-usage-claude when present
codex OpenAI Codex $CODEX_HOME, codex CLI Omarchy omarchy-agent-usage-codex when present
opencode OpenCode ~/.config/opencode, ~/.local/share/opencode/auth.json (Go /connect key) OpenCode Go 5-hour / weekly / monthly via GET /zen/go/v1/usage, plus local session totals
fireworks Fireworks FIREWORKS_API_KEY, ~/.fireworks Omarchy omarchy-agent-usage-fireworks when present
gemini Gemini CLI gemini CLI, GEMINI_API_KEY, ~/.gemini Detection + local logs when present
copilot GitHub Copilot CLI copilot CLI, GitHub Copilot config dirs Detection (quota API not public)
crush Crush crush CLI, config/data dirs Detection + local logs when present
pi Pi / Oh My Pi pi CLI, ~/.pi Local session totals when present

Missing tools fail closed: the row stays quiet instead of erroring the widget.

Magilla does not store API keys, cookies, or emails. Collectors read credentials already managed by the provider CLIs, use them in memory, and write only percents, plan names, and token totals.

Development

omarchy plugin validate .
python3 collectors/magilla-usage-update --detect-only --json
python3 collectors/magilla-usage-update --force

For a live checkout while iterating:

omarchy plugin add "$PWD" --enable --yes
# saved QML under ~/.config/omarchy/plugins/ hot-reloads

Records land in ~/.local/state/magilla-ai-usage/. Limit caches (no secrets) live in ~/.cache/magilla-ai-usage/.

Layout:

magilla-ai-usage/
├── manifest.json
├── BarWidget.qml          # bar chip + panel host
├── Panel.qml              # Magilla dashboard
├── Settings.qml           # in-panel settings
├── Engine.qml             # refresh, file watchers, merge
├── Agent.qml              # one usage JSON watcher
├── Model.js / Theme.js
├── collectors/            # detection + usage (Python 3, stdlib only)
└── assets/                # Magilla mark + provider badges

Adding a provider: register a detector in collectors/detect.py, a collect() in collectors/, an icon under assets/icons/<id>.svg, and a row in Model.js KNOWN.

Links

License

MIT © 2026 Leonardo Bassanello (xFurti)

Third-party product logos in assets/icons/ are trademarks of their respective owners and are used only to identify those tools. See assets/SOURCES.md.