You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e8c1925
Browse filesBrowse the repository at this point in the historyBrowse files
A compact Windows system-tray and macOS menu-bar widget for monitoring AI subscription and agent usage across:
8
+
A compact Windows system-tray app and native macOS app with a WidgetKit desktop widget for monitoring AI subscription and agent usage across:
8
9
9
10
-**Claude / Claude Code**
10
11
-**ChatGPT / Codex**
11
12
-**Cursor**
12
13
-**Cursor per-model usage breakdown**
13
14
14
-
The widget is designed to stay out of the way: it lives in the Windows system tray or macOS menu bar and opens on demand.
15
+
The Windows app lives in the system tray. On macOS, the app behaves like a normal Dock application and can supply an optional desktop widget.
15
16
16
17
## Preview
17
18
18
-

19
+
<table>
20
+
<tr>
21
+
<th>Windows</th>
22
+
<th>macOS</th>
23
+
</tr>
24
+
<tr>
25
+
<td align="center"><img src="assets/ai-usage-widget-preview.png" alt="AI Usage Widget on Windows" height="500"></td>
26
+
<td align="center"><img src="assets/ai-usage-widget-macos-app.jpg" alt="AI Usage Widget app on macOS" height="500"></td>
27
+
</tr>
28
+
</table>
29
+
30
+
### Widget
31
+
32
+
<palign="center">
33
+
<imgsrc="assets/ai-usage-widget-macos-widget.jpg"alt="AI Usage desktop widget on macOS"width="560">
34
+
</p>
19
35
20
36
## Features
21
37
@@ -26,17 +42,18 @@ The widget is designed to stay out of the way: it lives in the Windows system tr
26
42
- Separate Cursor **Cursor Models** and **Other Models** pools
27
43
- Expandable Cursor model table with requests, weighted usage and costs
28
44
- Expandable **Model consumption** view with one bar per Cursor model
29
-
-`AI` system-tray icon
45
+
-`AI` system-tray icon on Windows
46
+
- Native Dock application and WidgetKit widget on macOS
30
47
- Manual refresh and 5-minute auto-refresh
31
48
- Optional always-on-top mode
32
49
- No API keys need to be pasted into the app
33
50
34
51
## Platform support
35
52
36
53
-**Windows 10/11:** stable
37
-
-**macOS 12 or newer:**beta; the shared application code and installer are available, but the package still needs validation on real Mac hardware
54
+
-**macOS 14 or newer:**native app bundle and WidgetKit extension built locally by the installer
38
55
39
-
Both platforms use the same application core. Only installation, menu-bar integration, icons, and local provider paths are platform-specific.
56
+
The established Windows entry point remains unchanged. macOS has a separate native build entry point so its Dock, WidgetKit, Keychain, and Claude Desktop integrations do not change Windows behavior.
40
57
41
58
## Installation
42
59
@@ -69,7 +86,7 @@ You can also run the repository copy directly:
69
86
start_ai_usage_widget.bat
70
87
```
71
88
72
-
### macOS (beta)
89
+
### macOS
73
90
74
91
Clone or download the repository, open Terminal in the repository folder, and run:
Before installation, install full Xcode, sign in under **Xcode > Settings > Accounts**, and create an **Apple Development** certificate.
99
+
81
100
The installer:
82
101
83
-
1. checks for Python 3.10+ and Tkinter,
84
-
2. creates an isolated Python environment in `~/Library/Application Support/AIUsageWidget`,
85
-
3. installs the required Python dependencies,
86
-
4. creates `~/Applications/AI Usage Widget.app`,
87
-
5. opens the widget in the macOS menu bar.
102
+
1. checks for Python 3.10+, Tkinter, full Xcode, and a signing certificate,
103
+
2. creates an isolated build environment inside the repository,
104
+
3. builds a self-contained native macOS application with its own Dock icon,
105
+
4. builds and embeds the signed WidgetKit extension,
106
+
5. creates `~/Applications/AI Usage Widget.app`, registers it with macOS, and opens it.
107
+
108
+
The **AI Usage** widget can then be added from macOS **Edit Widgets** in small
109
+
or medium size. The desktop app must be running for fresh usage data; WidgetKit
110
+
keeps the most recent timeline entry between refreshes.
111
+
112
+
Closing the macOS app window quits the app. Launch it again from Finder,
113
+
Spotlight, Launchpad, or the Dock. Use macOS **Keep in Dock** if you want its
114
+
icon to remain there while the app is closed.
88
115
89
116
If Tkinter is missing, install Python from [python.org](https://www.python.org/downloads/macos/) or install the matching `python-tk` package through Homebrew.
90
117
91
118
## Requirements
92
119
93
-
- Windows 10/11 or macOS 12+
120
+
- Windows 10/11 or macOS 14+
94
121
- Python 3.10+
122
+
- Full Xcode and an Apple Development certificate for the macOS WidgetKit build
95
123
- For each provider you want to monitor, its corresponding local app/CLI must already be logged in.
96
124
97
125
### Claude
98
126
99
-
The app uses the existing Claude Code OAuth credentials stored by Claude Code.
127
+
On macOS, the app first uses the existing Claude Code OAuth credentials from the
128
+
macOS Keychain. If Claude Code is not installed, it can fall back to the current,
129
+
non-sensitive usage cache written by the signed-in Claude Desktop app.
100
130
101
131
Typical location:
102
132
103
133
```text
104
134
%USERPROFILE%\.claude\.credentials.json
105
135
```
106
136
107
-
It can show normal 5h/7d limits when exposed by Anthropic. For accounts using **Extra Usage**, it displays used/remaining budget. Some Extra Usage account types do not expose a reset timestamp; in that case the widget explicitly says that the reset is not reported.
137
+
Claude Desktop-only users should open Claude Desktop periodically so its local
138
+
usage cache remains current. The app can show normal 5h/7d limits when exposed
139
+
by Anthropic. For accounts using **Extra Usage**, it displays used and remaining
140
+
budget. When Anthropic does not expose a reset timestamp, the widget says that
141
+
the provider did not report one instead of estimating a date.
108
142
109
143
### ChatGPT / Codex
110
144
@@ -150,7 +184,7 @@ means model A accounts for approximately 41% of the captured weighted usage.
150
184
151
185
AI Usage Widget does not ask you to paste API keys into the UI.
152
186
153
-
It reads the local authentication state already created by the installed provider tools and queries their usage endpoints.
187
+
It reads the local authentication state already created by the installed provider tools and queries their usage endpoints. The macOS desktop-widget bridge exposes only usage percentages on `127.0.0.1`; it does not expose authentication tokens.
154
188
155
189
No telemetry is intentionally collected by this project.
0 commit comments