Codex Meter is an unofficial open-source client for viewing your AI coding allowances: Codex, Claude Code, Cursor and 21 more providers. This repository is a monorepo:
| Path | Platform | Notes |
|---|---|---|
| Repository root | Shared | Docs, license, changelog, CI, convenience script wrappers |
android/ |
Android | Phone app + Wear companion: One UI 8 and One UI 9 designs, 24 providers, live usage inside AI apps, One UI dashboard, home widgets, Samsung lock/AOD, notifications, optional live usage monitor |
ios/ |
iPhone / iPad | Native SwiftUI + WidgetKit client for iPhone, iPad (sidebar and adaptive columns) and Apple Watch, with the same providers as Android |
macos/ |
Mac | Native SwiftUI app: menu bar meter, sidebar window with the shared dashboards, Settings window, and desktop widgets. Reuses the iOS sources |
windows/ |
Windows | Native WinUI 3 app: Mica, per-provider dashboards (Codex, Claude Code, Cursor), accounts, settings, notification-area icon and toasts |
linux/ |
Linux | Native GTK 4 + libadwaita app: adaptive layout, per-provider dashboards (Codex, Claude Code, Cursor), accounts, settings, tray icon, keyring storage; .deb and AppImage for x86-64 and ARM64 |
There is no shared backend. Each platform talks to ChatGPT/Codex endpoints directly and stores credentials only on-device.
Codex Meter 3.0 tracks 24 AI coding providers, adds One UI 9 and Liquid Glass designs, shows your usage as a live notification while ChatGPT, Claude, GitHub, Grok or Kimi is open, can use banked resets for you before they expire, and shows workspace monthly credit limits. It also adds native apps for Mac, Windows, Linux, iPad and Apple Watch, and Wear OS now follows every provider. This stable release consolidates the 2.9.0-alpha.1 through 2.9.0-alpha.17 channel builds; alpha remains opt-in under Settings → Updates → Update channel. See CHANGELOG.md for everything that changed.
On compatible Galaxy Watches, those five standard AndroidX Tiles also advertise Samsung's private modular-card hints: the overview requests a 2×2 footprint and the focused usage, reset, and monitor Tiles request 2×1 footprints. Their diagonal One UI gradient cards use the same rounded 228-degree usage-dial geometry and One UI Sans typography as the phone's battery-style widgets. Other Wear OS tile hosts ignore the sizing hints and keep the normal full-screen carousel presentation. Samsung does not document third-party eligibility for modular placement, so final grid behavior remains firmware-dependent.
Samsung lock-screen widgets can display the remaining time until each usage window resets. The countdown is driven locally by Android Chronometer views using the reset timestamp already cached from the usage response; it does not repeatedly contact the server merely to update seconds or minutes.
Settings includes an optional, user-started live usage monitor that runs only until the next available usage reset. It shows the real five-hour and weekly allowance values, marks a missing window as unavailable, and refreshes whenever the app receives new usage data. Android 16 can promote the notification as a Live Update, while compatible Samsung firmware can also surface it in the Now Bar. The monitor can be stopped at any time and is cleared when the user signs out.
Users can choose silent, notification-sound, or alarm-sound alerts for the five-hour limit, weekly limit, or both. Alerts can be conditional on the most recently observed allowance being below a selected threshold. Android schedules the notification for the cached reset time and performs a normal background refresh after the alert fires.
One UI bottom tabs (the stock BottomTabLayout from oneui-design) under the dashboard switch between usage providers. Codex is the default and is unchanged. Claude Code signs in with your Claude account (the same OAuth flow and loopback callback the Claude Code CLI uses) and shows exactly the limits Claude Code reports in /usage: normally the 5-hour and weekly limits, plus a model-only weekly allocation (such as Fable) when your account has one, and extra usage when it is enabled. Claude keeps its own usage history and burn-rate estimates, and any home-screen widget can show it (widget settings → Provider). Because Anthropic's usage route rate-limits polling, Claude refreshes when you open its tab (if older than 5 minutes), pull to refresh, or tap a Claude widget's refresh, and in the background at most every 30 minutes, backing off for an hour after a 429. Now Bar, Wear, lock-screen widgets, and reset alerts remain Codex-only. Cursor signs in through the browser login the Cursor editor uses and shows included usage for the billing cycle, plus the Auto + Composer and API model pools and on-demand spend when Cursor reports them; it refreshes when you open its tab and in the background at most every 15 minutes. First-run setup asks which providers you use and signs you in to each; upgrades start with Codex only. Settings → Providers changes which providers appear and drags them into your preferred tab order (with one on, the tabs are hidden), and Settings → Accounts signs each provider in or out. Each tab uses the service's own mark: most come from Simple Icons (CC0) or Lobe Icons (MIT), and Augment, Factory, Synthetic and Codebuff are redrawn from their official site icons. The marks are their owners' trademarks. New providers plug in through UsageProvider and a tab in res/menu/provider_tabs.xml.
The app includes:
- Responsive home-screen widgets with ring, four-dial, and battery-list layouts, plus Adaptive / Dials / Progress bars layout preference and drag-reorderable meter slots (Codex 5-hour/weekly, next reset, reset credits).
- Both-window, five-hour-only, and weekly-only configurations (legacy metric mode; meters checklist supersedes this when customized).
- Optional reset-credit inventory, expiration, and redemption controls.
- Transparent through opaque backgrounds, including a Background off toggle and three One UI-style opacity steps.
- Samsung One UI presentation throughout the dashboard, settings, and widget configuration surfaces.
- Samsung lock/AOD providers for both usage windows together or dedicated five-hour and weekly views.
- High-resolution supersampled lock-screen geometry with native Android text overlays.
- Optional live time-to-reset labels on supported lock-screen hosts.
- Browser-based ChatGPT sign-in using OAuth authorization code + PKCE and a localhost loopback callback.
- Access-token refresh with refresh-token rotation preservation.
- Android Keystore AES-GCM encryption for locally stored tokens.
- Usage and reset-credit retrieval from the ChatGPT backend routes used by Codex.
- Optional Claude Code sign-in (Claude OAuth + PKCE, loopback callback) and usage from
api.anthropic.com/api/oauth/usage, the route Claude Code's/usagereads. Claude tokens use their own Keystore key and are removed independently on sign-out. - Optional Cursor sign-in (the editor's PKCE
loginDeepControl+auth/pollflow, no callback server) and usage fromapi2.cursor.shDashboardService/GetCurrentPeriodUsage. Cursor tokens use their own Keystore key and are removed independently on sign-out. - No analytics, advertisements, WebView, or application-level relay server.
- Phone minimum Android 8.0 (API 26); Wear companion minimum API 30
- Phone compile SDK Android 17 (API 37.1); Wear compile SDK Android 17 (API 37.0)
- Phone and Wear target Android 16 (API 36)
- Universal DEX APK with no native ABI libraries
- Standard Android home-screen widgets
- Private Samsung One UI lock/AOD integration on compatible Galaxy firmware
See android/README.md. The Android project uses Gradle with the OneUI-Design and oneui-icons libraries so its dashboards use Samsung-style SESL components, typography, and iconography.
Requirements:
- JDK 17 or newer
- Android SDK Platforms 36 and 37.0
- Android Build Tools 36.x
ANDROID_SDK_ROOTorANDROID_HOMEconfigured- A GitHub Packages token in
GH_ACCESS_TOKEN(withread:packages) and your username inGH_USERNAMEwhen the OneUI-Design dependencies are not already cached
From the repository root:
./run-tests.sh
./build.shOr from android/ directly. build.sh assembles the release APKs with Gradle and signs them with a local development key under android/.local-signing/. Those locally signed APKs will not install over the distributed release build. Artifacts land in android/dist/.
See ios/README.md. Requires Xcode 26+ and iOS/iPadOS 26+.
The iOS client now carries portable Android 2.8.0 behavior: Free-tier monthly
windows, scrubbable usage-history analytics with customize, and opt-in
diagnostic log export.
cd ios
swift test --package-path CodexMeterCore
xcodebuild -project CodexMeter.xcodeproj -scheme CodexMeter \
-destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO buildCreating a v* tag that matches the Gradle versionName in android/app/build.gradle.kts (for example v2.6.5) runs the full CI pipeline and publishes the signed phone APK, signed Wear OS APK, and their SHA-256 checksums to GitHub Releases. CI authenticates and decrypts the persistent PKCS#12 release keystore android/ci/release-keystore.p12.enc (alias codexmeter) using the ANDROID_SIGNING_PASSWORD repository Actions secret, so every release is signed with the same certificate and installs in place over previous releases. Release notes are taken from the root CHANGELOG.md.
The ChatGPT usage and reset-credit routes and Samsung's lock-screen metadata are implementation details rather than stable third-party Android SDK contracts. OpenAI or Samsung may change eligibility, routing, response fields, host behavior, or private metadata.
OpenAI, ChatGPT, Codex, Samsung, Galaxy, One UI, and related marks belong to their respective owners. This project is not affiliated with or endorsed by OpenAI or Samsung.