Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
780 changes: 780 additions & 0 deletions bin/omarchy-agent-usage-agy

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/17-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ There are terminal shortcuts too: `a` runs the default agent inline in the curre

### The agents panel

The top bar has an agents icon. Before you've set up an agent, its panel walks you through signing in to Claude, Codex, or Grok, and the first one becomes your default agent. After that, the panel puts every subscription on one page: each agent and account with its plan, a meter for each of its 5-hour session and weekly limits with the time until it resets (hover for the exact percentage), or the remaining prepaid balance, under a line that rotates through what you've used across all of them, like tokens this week and your most used model. Under _Make something_ it offers starter prompts for a new theme, plugin, or app that hand the task to your default agent. Apps are built the way Omarchy's own Hype, Monologue, and Omacut are, in C++ and Qt Quick, following the omarchy-app agent skill, and the compiler and Qt pieces they need come installed. Claude Code, Codex, Grok, Fireworks, and Kimi are covered out of the box. Kimi currently reports account quota limits without local token or prompt statistics.
The top bar has an agents icon. Before you've set up an agent, its panel walks you through signing in to Claude, Codex, or Grok, and the first one becomes your default agent. After that, the panel puts every subscription on one page: each agent and account with its plan, a meter for each of its 5-hour session and weekly limits with the time until it resets (hover for the exact percentage), or the remaining prepaid balance, under a line that rotates through what you've used across all of them, like tokens this week and your most used model. Under _Make something_ it offers starter prompts for a new theme, plugin, or app that hand the task to your default agent. Apps are built the way Omarchy's own Hype, Monologue, and Omacut are, in C++ and Qt Quick, following the omarchy-app agent skill, and the compiler and Qt pieces they need come installed. Claude Code, Codex, Grok, Fireworks, and Kimi are covered out of the box, as is Antigravity with its 5-hour and weekly limits, whether you signed in to it with `agy` or in omp, pi, or opencode, and its tokens count wherever you used it: `agy`, pi, omp, OpenClaw, or opencode. Kimi currently reports account quota limits without local token or prompt statistics.

Left-click the bar icon for the panel, right-click to launch your default agent. The usage records behind it are regenerated every 15 minutes by `omarchy agent usage-update`, and the panel can even merge usage from your other machines via a synced folder. See the README under `$OMARCHY_PATH/shell/plugins/agents/` for the full settings.

Expand Down
20 changes: 19 additions & 1 deletion shell/plugins/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Adding an agent needs no QML changes: ship a collector that prints the record co
| `grok` | The credits endpoint behind Grok's `/usage` view (the billing period's included usage) | Each session's `usage.json` (the ledger `grok usage` prints: tokens by model per finished turn), plus `summary.json` for sessions |
| `fireworks` | Estimated prepaid balance: configured funding minus rated account costs | Fireworks billing API, grouped by day and model for the last 30 days |
| `kimi` | Kimi Code quotas (5-hour session, weekly, and monthly allowances) | none; quota only |
| `agy` | Google's Cloud Code API (`loadCodeAssist` for the plan, `retrieveUserQuotaSummary` for the 5-hour and weekly windows), or `omp usage` for omp's sign-in | `history.jsonl`, `conversation_summaries.db`, and each conversation's `transcript.jsonl` under `~/.gemini/antigravity-cli/` (`AGY_DIR`), plus pi, omp, and OpenClaw sessions on the `google-antigravity` provider and opencode sessions on its Antigravity plugin's `antigravity-` models |

When `~/.local/state/omarchy/agents/accounts/<claude|codex|grok>.json`
registers more than one account, the `claude`, `codex`, and `grok` records
Expand All @@ -91,7 +92,24 @@ Codex CLI will front any OpenAI-compatible backend — `--oss`, or a custom `mod

Claude limits need a signed-in CLI; without credentials the panel says so and
falls back to local stats only. A non-default Claude directory is honored via
`CLAUDE_CONFIG_DIR`, Codex via `CODEX_HOME`, Grok via `GROK_HOME`. Grok's
`CLAUDE_CONFIG_DIR`, Codex via `CODEX_HOME`, Grok via `GROK_HOME`,
Antigravity via `AGY_DIR`. Antigravity's plan and limits are
asked with the sign-in `agy` keeps in the Secret Service keyring (service
`gemini`, username `antigravity`, or `antigravity-oauth-token` under
`AGY_DIR` without a keyring). Without `agy`, the Antigravity sign-in of
another harness stands in: omp's `agent.db`, pi's `auth.json` (both under
`PI_CODING_AGENT_DIR` when set), or opencode's `google` sign-in when the
Antigravity plugin's `antigravity-accounts.json` is there. Of these, the
token refreshed most recently is asked first, and one Google refuses gives
way to the next. omp is asked through `omp usage`, which refreshes its own
sign-in, and its token then only names the plan. Every other harness
refreshes its token while it runs; one left to lapse shows the last limits
until that harness runs again. Because the panel's _Sign-in required_ link
runs a sign-in flow that knows Claude, Codex, and Grok only, the Antigravity
record names that state in words and puts the instruction in `authHelpText`
instead of asking for a link. Hermes reaches Antigravity only through
plugins that run `agy`, so its usage is agy's own. The record's id is
`agy`, the name the default agent knows it by. Grok's
plan comes from the settings it caches in its home, and its limit from the
credits endpoint its own `/usage` view reads, asked with each account's
sign-in; a sign-in left to lapse shows the last credits until Grok runs
Expand Down
1 change: 1 addition & 0 deletions shell/plugins/agents/assets/agy-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions shell/plugins/agents/assets/agy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions shell/plugins/agents/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "1.0.0",
"author": "Omarchy",
"license": "MIT",
"description": "Claude Code, Codex, Grok, Fireworks, and Kimi usage, limits, and pace in a native Omarchy bar panel.",
"description": "Claude Code, Codex, Grok, Fireworks, Kimi, and Antigravity usage, limits, and pace in a native Omarchy bar panel.",
"kinds": ["bar-widget"],
"activation": "on-demand",
"entryPoints": {
Expand All @@ -23,7 +23,8 @@
"codex": { "enabled": true },
"grok": { "enabled": true },
"fireworks": { "enabled": true },
"kimi": { "enabled": true }
"kimi": { "enabled": true },
"agy": { "enabled": true }
},
"refreshIntervalSec": 900,
"syncMode": "Off",
Expand Down
Loading