Skip to content
Open
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
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[target.x86_64-pc-windows-gnu]
linker = "C:/msys64/mingw64/bin/gcc.exe"
ar = "C:/msys64/mingw64/bin/ar.exe"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ AGENTS.md

# Local WinGet manifest generation output
/manifests/

# Cursor IDE agent rules - hard-linked, not repo content
.cursor/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ What it does **not** do:

Notes:

- If your Claude Code token is expired, the app may ask the local Claude CLI to refresh it in the background
- If your Claude Code token is expired, the app refreshes OAuth directly against `platform.claude.com/v1/oauth/token` and updates `~/.claude/.credentials.json` (no Claude CLI session / no model spend on Windows)
- 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.
- If your Antigravity token is expired, open Antigravity and sign in again. The monitor does not write Windows Credential Manager entries itself.
- Portable installs can update themselves by downloading the latest release from this repository
Expand Down
2 changes: 1 addition & 1 deletion src/localization/english.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub(super) const STRINGS: Strings = Strings {
hour_suffix: "h",
minute_suffix: "m",
token_expired_title: "Claude Code Auth Error",
token_expired_body: "Run 'claude' in a terminal, then use '/login' and follow the prompts. After that, refresh or restart this app.",
token_expired_body: "Run 'claude auth login' in a terminal and complete sign-in. After that, refresh or restart this app.",
codex_token_expired_title: "Codex Auth Error",
codex_token_expired_body: "Run 'codex' in a terminal and follow the sign-in prompts. After that, refresh or restart this app.",
antigravity_token_expired_title: "Antigravity Auth Error",
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ mod localization;
mod models;
mod native_interop;
mod poller;
mod spend_pace;
mod theme;
mod tray_icon;
mod updater;
Expand Down
34 changes: 34 additions & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::time::SystemTime;
pub struct UsageSection {
pub percentage: f64,
pub resets_at: Option<SystemTime>,
pub has_bucket: bool,
}

#[derive(Clone, Debug, Default)]
Expand All @@ -12,9 +13,42 @@ pub struct UsageData {
pub weekly: UsageSection,
}

#[derive(Clone, Debug, Default)]
pub struct AccountUsage {
pub credit_pct: f64,
pub credit_expiry: Option<SystemTime>,
pub spend_used: f64,
pub spend_limit: f64,
}

#[derive(Clone, Debug, Default)]
pub struct SpendPaceSlots {
pub month_actual: f64,
pub month_cap: f64,
pub month_expected: f64,
pub month_level: u8,
pub week_actual: f64,
pub week_cap: f64,
pub week_expected: f64,
pub week_level: u8,
pub day_actual: f64,
pub day_cap: f64,
pub day_expected: f64,
pub day_level: u8,
}

#[derive(Clone, Debug)]
pub struct SpendPaceView {
pub credit_pct: f64,
pub credit_expiry: Option<SystemTime>,
pub slots: SpendPaceSlots,
}

#[derive(Clone, Debug, Default)]
pub struct AppUsageData {
pub claude_code: Option<UsageData>,
pub codex: Option<UsageData>,
pub antigravity: Option<UsageData>,
pub account: Option<AccountUsage>,
pub spend_pace: Option<SpendPaceView>,
}
Loading