Skip to content
Merged
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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Hover over the widget to reveal its buttons. The grab handle is separated from t
| Drag the bottom-right grip | Resize the widget |
| Click a provider icon | Switch between Claude and Codex |
| Click Pin | Keep the widget above other windows |
| Click Refresh | Recheck local providers and retry usage immediately |
| Click Refresh | Recheck local providers and retry usage (Codex respects server cooldowns) |
| Click Settings | Adjust appearance, layout, limits, controls, and startup preferences |
| Click Close | Hide the widget; restore it from the tray |
| Hover over the graph | Inspect usage and time at the cursor |
Expand All @@ -118,6 +118,10 @@ Tokometer reads `$CODEX_HOME/auth.json`, or `~/.codex/auth.json` by default, and

API-key and other non-ChatGPT login modes are not supported for subscription usage tracking. If the login expires, refresh it through Codex and then click Refresh in Tokometer. This implementation follows the direct OAuth approach documented by [CodexBar](https://github.com/steipete/CodexBar/blob/1c4650d1b421bda3f0e495e8c14b69dc1b3de81d/docs/codex-oauth.md). The endpoint is internal and may change.

Codex requests allow up to 30 seconds. Temporary connection failures, timeouts, and selected server errors receive one retry after two seconds. Rate limits use increasing cooldowns and honor the server's `Retry-After` header; Refresh and provider switching do not bypass an active account cooldown. Login errors appear immediately with guidance to reopen Codex.

When a temporary failure occurs, the last reading stays faded with its age. The first two failed polls show a quiet “Updating…” message while the reading is under five minutes old; continued failures show the specific error. Stale readings are never added to usage history. Keep just one Tokometer instance running during normal use to avoid duplicate polling from development or preview builds.

### Local history

The providers report current usage, so Tokometer records its own time series in `history.json` alongside its settings. Recent samples retain full resolution; older history is reduced to five-minute intervals and retained for up to 15 days.
Expand Down
7 changes: 7 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
base64 = "0.22"
# Parse standard Retry-After HTTP dates without a date/time runtime.
httpdate = "1"
# Pure-Rust glyph rasterizer for the two-line text tray icon (cross-platform).
ab_glyph = "0.2"
# native-tls (schannel) so corporate root CAs in the Windows cert store work
Expand Down
Loading
Loading