Feature request
It would be useful to add an optional AI Usage module to Stats for monitoring the usage limits of AI coding tools directly from the macOS menu bar.
A good reference implementation is CodexBar, which supports providers such as OpenAI Codex, Claude Code, Cursor, GitHub Copilot, Gemini, and many others.
Motivation
AI coding subscriptions often have multiple usage windows, such as session, five-hour, weekly, or monthly limits. Currently, users need a separate menu-bar application to monitor these limits.
Since Stats already provides a modular menu-bar interface for monitoring system resources, an AI usage module could make it a more complete monitoring application while reducing the number of separate menu-bar utilities users need to run.
Suggested initial scope
A first version could focus on a few commonly used AI coding tools:
- OpenAI Codex
- Claude Code
- Cursor
- GitHub Copilot
- Gemini CLI
Possible information to display:
- Current quota or usage percentage
- Remaining allowance, when available
- Reset time or countdown
- Session, daily, weekly, and monthly usage windows
- Optional API spending or locally estimated cost
- Data-source status and last refresh time
Possible implementation approach
Rather than reimplementing and maintaining every provider integration inside Stats, the module could use a provider-based architecture and initially support one or more of the following approaches:
- Read supported providers’ local CLI or configuration data.
- Allow users to configure official API credentials where an appropriate usage endpoint is available.
- Optionally consume the JSON output of CodexBar’s bundled CLI when CodexBar is installed.
The third approach may provide a relatively low-maintenance way to support multiple providers. Stats could remain responsible for the menu-bar widget and presentation, while CodexBar provides normalized usage data.
Native provider implementations could then be added gradually where appropriate.
It might also be useful to expose a simple external data-source or plugin interface, so Stats can display usage data produced by CodexBar or other command-line tools without tightly coupling the two projects.
Privacy and security
The module should be disabled by default and process data locally whenever possible.
It should avoid storing account passwords. Any use of API keys, OAuth credentials, browser-session information, Keychain entries, local logs, or configuration files should be clearly disclosed and use appropriate macOS security mechanisms.
A CLI-based integration could also allow Stats to avoid handling provider credentials directly.
UI suggestion
The menu-bar widget could display:
- A compact usage percentage
- A progress bar
- Remaining quota
- Time until the next reset
The popup could group usage by provider and show:
- Separate quota windows
- Reset countdowns
- Recent usage history
- Refresh controls
- Authentication or data-source errors
It would also be helpful if the module worked with Stats’ existing combined-modules interface.
I understand that this is somewhat different from traditional hardware monitoring. Therefore, even a lightweight external CLI or generic data-source integration would be valuable and could avoid adding substantial provider-specific maintenance to Stats.
Feature request
It would be useful to add an optional AI Usage module to Stats for monitoring the usage limits of AI coding tools directly from the macOS menu bar.
A good reference implementation is CodexBar, which supports providers such as OpenAI Codex, Claude Code, Cursor, GitHub Copilot, Gemini, and many others.
Motivation
AI coding subscriptions often have multiple usage windows, such as session, five-hour, weekly, or monthly limits. Currently, users need a separate menu-bar application to monitor these limits.
Since Stats already provides a modular menu-bar interface for monitoring system resources, an AI usage module could make it a more complete monitoring application while reducing the number of separate menu-bar utilities users need to run.
Suggested initial scope
A first version could focus on a few commonly used AI coding tools:
Possible information to display:
Possible implementation approach
Rather than reimplementing and maintaining every provider integration inside Stats, the module could use a provider-based architecture and initially support one or more of the following approaches:
The third approach may provide a relatively low-maintenance way to support multiple providers. Stats could remain responsible for the menu-bar widget and presentation, while CodexBar provides normalized usage data.
Native provider implementations could then be added gradually where appropriate.
It might also be useful to expose a simple external data-source or plugin interface, so Stats can display usage data produced by CodexBar or other command-line tools without tightly coupling the two projects.
Privacy and security
The module should be disabled by default and process data locally whenever possible.
It should avoid storing account passwords. Any use of API keys, OAuth credentials, browser-session information, Keychain entries, local logs, or configuration files should be clearly disclosed and use appropriate macOS security mechanisms.
A CLI-based integration could also allow Stats to avoid handling provider credentials directly.
UI suggestion
The menu-bar widget could display:
The popup could group usage by provider and show:
It would also be helpful if the module worked with Stats’ existing combined-modules interface.
I understand that this is somewhat different from traditional hardware monitoring. Therefore, even a lightweight external CLI or generic data-source integration would be valuable and could avoid adding substantial provider-specific maintenance to Stats.