Skip to content

Commit 4676f6f

Browse files
committed
feat: Codex usage now available through the model menu
- Option to have both or a single model visible - Tray icon for each visible model - Coloured text in duel mode to assist in identifying which model
1 parent d54588b commit 4676f6f

16 files changed

Lines changed: 971 additions & 131 deletions

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "claude-code-usage-monitor"
3-
version = "1.3.9"
3+
version = "1.4.0"
44
edition = "2021"
55
license = "MIT"
66
description = "Claude Code Usage Monitor"

README.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,34 @@
55

66
![Screenshot](.github/animation.gif)
77

8-
A lightweight Windows taskbar widget for people already using Claude Code.
8+
A lightweight Windows taskbar widget for people already using Claude Code, with optional Codex usage display.
99

10-
It sits in your taskbar and shows how much of your Claude Code usage window you have left, without needing to open the terminal or the Claude site.
10+
It sits in your taskbar and shows how much of your Claude Code and/or Codex usage window you have left, without needing to open the terminal or the provider site.
1111

1212
## What You Get
1313

1414
- A **5h** bar for your current 5-hour Claude usage window
1515
- A **7d** bar for your current 7-day window
16+
- Optional Codex usage bars alongside Claude Code
1617
- A live countdown until each limit resets
1718
- A small native widget that lives directly in the Windows taskbar
18-
- A **system tray icon** showing your usage percentage as a color-coded badge
19+
- System tray icon badges showing your enabled model usage percentage
1920
- Left-click the tray icon to toggle the taskbar widget on or off
20-
- Right-click options for refresh, update frequency, language, startup, and updates
21+
- Right-click options for refresh, displayed models, update frequency, language, startup, and updates
2122

2223
## Who This Is For
2324

2425
This app is for Windows users who already have **Claude Code (CLI or App) installed and signed in**.
2526

27+
Codex support is optional. To show Codex usage, install and sign in to the Codex CLI, then enable Codex from the right-click **Models** menu.
28+
2629
It works best if you want a simple "how close am I to the limit?" display that is always visible.
2730

2831
## Requirements
2932

3033
- Windows 10 or Windows 11
3134
- Claude Code (CLI or App) installed and authenticated
35+
- Optional: Codex CLI installed and authenticated, if you want Codex usage
3236

3337
If you use Claude Code through WSL, that is supported too. The monitor can read your Claude Code credentials from Windows or from your WSL environment.
3438

@@ -50,18 +54,31 @@ After installing with WinGet, run:
5054
claude-code-usage-monitor
5155
```
5256

53-
Once running, it will appear in your taskbar and as a tray icon in the notification area.
57+
Once running, it will appear in your taskbar and as one or more tray icons in the notification area.
5458

5559
- Drag the left divider to move the taskbar widget
56-
- Right-click the taskbar widget or tray icon for refresh, update frequency, Start with Windows, reset position, language, updates, and exit
60+
- Right-click the taskbar widget or tray icon for refresh, displayed models, update frequency, Start with Windows, reset position, language, updates, and exit
5761
- Left-click the tray icon to toggle the taskbar widget on or off
5862
- Enable `Start with Windows` from the right-click menu if you want it to launch automatically when you sign in
5963

64+
### Models
65+
66+
Use the right-click **Models** menu to choose what the widget displays:
67+
68+
- **Claude Code** is enabled by default
69+
- **Codex** can be enabled alongside Claude Code or shown by itself
70+
71+
When both models are shown, each model has its own usage bar and matching usage text color.
72+
6073
### System Tray Icon
6174

62-
The tray icon shows your current 5-hour usage as a color-coded percentage badge.
75+
The tray icon shows your current 5-hour usage as a percentage badge.
76+
77+
If both Claude Code and Codex are enabled, the app shows two tray icons: one for Claude Code and one for Codex. If only one model is enabled, it shows one tray icon.
78+
79+
The Claude Code tray icon uses the same warm usage colors as the Claude bar. The Codex tray icon uses a black and white badge style.
6380

64-
Hovering over the tray icon shows a tooltip with both your 5h and 7d usage.
81+
Hovering over a tray icon shows the usage values for that model.
6582

6683
## Diagnostics
6784

@@ -102,10 +119,12 @@ What the app reads:
102119

103120
- Your local Claude Code OAuth credentials from `~/.claude/.credentials.json`
104121
- If needed, the same credentials file inside an installed WSL distro
122+
- If Codex is enabled, your local Codex credentials from `$CODEX_HOME/auth.json` or `~/.codex/auth.json`
105123

106124
What the app sends over the network:
107125

108126
- Requests to Anthropic's Claude endpoints to read your usage and rate-limit information
127+
- Requests to ChatGPT's Codex usage endpoint to read your Codex usage and rate-limit information, if Codex is enabled
109128
- Requests to GitHub only if you use the app's update check / self-update feature
110129
- If proxy environment variables such as `HTTPS_PROXY`, `HTTP_PROXY`, or `ALL_PROXY` are set, those outbound requests may use that proxy
111130

@@ -115,26 +134,29 @@ What the app stores locally:
115134
- Polling frequency
116135
- Language preference
117136
- Last update check time
137+
- Displayed model preferences
118138

119139
What it does **not** do:
120140

121141
- It does not send your credentials to any other server
122142
- It does not use a separate backend service
123143
- It does not collect analytics or telemetry
124144
- It does not upload your project files
145+
- It does not directly edit your Codex credentials file
125146

126147
Notes:
127148

128149
- If your Claude Code token is expired, the app may ask the local Claude CLI to refresh it in the background
150+
- If your Codex token is expired, the app may ask the local Codex CLI to refresh it in the background. The monitor does not write `auth.json` itself; any credential update is handled by the Codex CLI.
129151
- Portable installs can update themselves by downloading the latest release from this repository
130-
- Proxies should be trusted because proxied Claude requests include your OAuth bearer token inside the TLS connection
152+
- Proxies should be trusted because proxied usage requests include your OAuth bearer token inside the TLS connection
131153

132154
## How It Works
133155

134156
The monitor:
135157

136-
1. Finds your Claude Code login credentials
137-
2. Reads your current usage from Anthropic
158+
1. Finds your enabled model login credentials
159+
2. Reads your current usage from Anthropic and/or ChatGPT
138160
3. Shows the result directly in the Windows taskbar
139161
4. Refreshes periodically in the background
140162

src/localization/dutch.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pub(super) const STRINGS: Strings = Strings {
1010
five_minutes: "5 minuten",
1111
fifteen_minutes: "15 minuten",
1212
one_hour: "1 uur",
13+
models: "Modellen",
14+
claude_code_model: "Claude Code",
15+
codex_model: "Codex",
1316
settings: "Instellingen",
1417
start_with_windows: "Opstarten met Windows",
1518
reset_position: "Positie herstellen",
@@ -36,5 +39,8 @@ pub(super) const STRINGS: Strings = Strings {
3639
minute_suffix: "m",
3740
token_expired_title: "Claude Code-authenticatiefout",
3841
token_expired_body: "Voer 'claude' uit in een terminal, gebruik daarna '/login' en volg de stappen. Ververs of herstart de app daarna.",
42+
codex_token_expired_title: "Codex-authenticatiefout",
43+
codex_token_expired_body: "Voer 'codex' uit in een terminal en volg de aanmeldstappen. Ververs of herstart de app daarna.",
44+
codex_window_title: "Codex-gebruiksmonitor",
3945
second_suffix: "s",
4046
};

src/localization/english.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pub(super) const STRINGS: Strings = Strings {
1010
five_minutes: "5 Minutes",
1111
fifteen_minutes: "15 Minutes",
1212
one_hour: "1 Hour",
13+
models: "Models",
14+
claude_code_model: "Claude Code",
15+
codex_model: "Codex",
1316
settings: "Settings",
1417
start_with_windows: "Start with Windows",
1518
reset_position: "Reset Position",
@@ -36,5 +39,8 @@ pub(super) const STRINGS: Strings = Strings {
3639
minute_suffix: "m",
3740
token_expired_title: "Claude Code Auth Error",
3841
token_expired_body: "Run 'claude' in a terminal, then use '/login' and follow the prompts. After that, refresh or restart this app.",
42+
codex_token_expired_title: "Codex Auth Error",
43+
codex_token_expired_body: "Run 'codex' in a terminal and follow the sign-in prompts. After that, refresh or restart this app.",
44+
codex_window_title: "Codex Usage Monitor",
3945
second_suffix: "s",
4046
};

src/localization/french.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pub(super) const STRINGS: Strings = Strings {
1010
five_minutes: "5 minutes",
1111
fifteen_minutes: "15 minutes",
1212
one_hour: "1 heure",
13+
models: "Modeles",
14+
claude_code_model: "Claude Code",
15+
codex_model: "Codex",
1316
settings: "Paramètres",
1417
start_with_windows: "Démarrer avec Windows",
1518
reset_position: "Réinitialiser la position",
@@ -36,5 +39,8 @@ pub(super) const STRINGS: Strings = Strings {
3639
minute_suffix: "m",
3740
token_expired_title: "Erreur d'authentification",
3841
token_expired_body: "Exécutez 'claude' dans un terminal, puis utilisez '/login' et suivez les instructions. Ensuite, actualisez ou redémarrez cette application.",
42+
codex_token_expired_title: "Erreur d'authentification Codex",
43+
codex_token_expired_body: "Executez 'codex' dans un terminal et suivez les instructions de connexion. Ensuite, actualisez ou redemarrez cette application.",
44+
codex_window_title: "Moniteur d'utilisation Codex",
3945
second_suffix: "s",
4046
};

src/localization/german.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pub(super) const STRINGS: Strings = Strings {
1010
five_minutes: "5 Minuten",
1111
fifteen_minutes: "15 Minuten",
1212
one_hour: "1 Stunde",
13+
models: "Modelle",
14+
claude_code_model: "Claude Code",
15+
codex_model: "Codex",
1316
settings: "Einstellungen",
1417
start_with_windows: "Mit Windows starten",
1518
reset_position: "Position zurücksetzen",
@@ -36,5 +39,8 @@ pub(super) const STRINGS: Strings = Strings {
3639
minute_suffix: "m",
3740
token_expired_title: "Authentifizierungsfehler",
3841
token_expired_body: "Führen Sie 'claude' in einem Terminal aus, verwenden Sie dann '/login' und folgen Sie den Anweisungen. Aktualisieren oder starten Sie diese App anschließend neu.",
42+
codex_token_expired_title: "Codex-Authentifizierungsfehler",
43+
codex_token_expired_body: "Fuhren Sie 'codex' in einem Terminal aus und folgen Sie den Anmeldeanweisungen. Aktualisieren oder starten Sie diese App anschliessend neu.",
44+
codex_window_title: "Codex-Nutzungsmonitor",
3945
second_suffix: "s",
4046
};

src/localization/japanese.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pub(super) const STRINGS: Strings = Strings {
1010
five_minutes: "5分",
1111
fifteen_minutes: "15分",
1212
one_hour: "1時間",
13+
models: "モデル",
14+
claude_code_model: "Claude Code",
15+
codex_model: "Codex",
1316
settings: "設定",
1417
start_with_windows: "Windows と同時に開始",
1518
reset_position: "位置をリセット",
@@ -36,5 +39,8 @@ pub(super) const STRINGS: Strings = Strings {
3639
minute_suffix: "分",
3740
token_expired_title: "認証エラー",
3841
token_expired_body: "ターミナルで 'claude' を実行し、'/login' を使って案内に従ってください。その後、このアプリを更新するか再起動してください。",
42+
codex_token_expired_title: "Codex 認証エラー",
43+
codex_token_expired_body: "ターミナルで 'codex' を実行し、サインインの案内に従ってください。その後、このアプリを更新または再起動してください。",
44+
codex_window_title: "Codex 使用量モニター",
3945
second_suffix: "秒",
4046
};

src/localization/korean.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pub(super) const STRINGS: Strings = Strings {
1010
five_minutes: "5분",
1111
fifteen_minutes: "15분",
1212
one_hour: "1시간",
13+
models: "모델",
14+
claude_code_model: "Claude Code",
15+
codex_model: "Codex",
1316
settings: "설정",
1417
start_with_windows: "Windows 시작 시 자동 실행",
1518
reset_position: "위치 초기화",
@@ -36,5 +39,8 @@ pub(super) const STRINGS: Strings = Strings {
3639
minute_suffix: "분",
3740
token_expired_title: "인증 오류",
3841
token_expired_body: "터미널에서 'claude'를 실행한 다음 '/login'을 사용하고 안내에 따라 진행하세요. 그런 다음 이 앱을 새로 고치거나 다시 시작하세요.",
42+
codex_token_expired_title: "Codex 인증 오류",
43+
codex_token_expired_body: "터미널에서 'codex'를 실행하고 로그인 안내를 따르세요. 그런 다음 이 앱을 새로 고치거나 다시 시작하세요.",
44+
codex_window_title: "Codex 사용량 모니터",
3945
second_suffix: "초",
4046
};

src/localization/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mod english;
21
mod dutch;
2+
mod english;
33
mod french;
44
mod german;
55
mod japanese;
@@ -128,6 +128,9 @@ pub struct Strings {
128128
pub five_minutes: &'static str,
129129
pub fifteen_minutes: &'static str,
130130
pub one_hour: &'static str,
131+
pub models: &'static str,
132+
pub claude_code_model: &'static str,
133+
pub codex_model: &'static str,
131134
pub settings: &'static str,
132135
pub start_with_windows: &'static str,
133136
pub reset_position: &'static str,
@@ -155,6 +158,9 @@ pub struct Strings {
155158
pub second_suffix: &'static str,
156159
pub token_expired_title: &'static str,
157160
pub token_expired_body: &'static str,
161+
pub codex_token_expired_title: &'static str,
162+
pub codex_token_expired_body: &'static str,
163+
pub codex_window_title: &'static str,
158164
}
159165

160166
pub fn resolve_language(language_override: Option<LanguageId>) -> LanguageId {

0 commit comments

Comments
 (0)