Skip to content
Closed
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ In the default theme, left-click a provider tray icon to show or hide the widget
| Cursor | Sign in to Cursor, then enable it in **Providers**. The local session is detected automatically. |
| Grok Build | Run `grok login` in the Grok Build CLI, then enable Grok in **Providers**. The signed-in session is detected automatically. |
| GitHub Copilot | Sign in with the Copilot CLI (`copilot`, then `/login`) or the GitHub CLI (`gh auth login`), then enable Copilot in **Providers**. The stored login is detected automatically. |
| Mistral (Vibe + Studio) | Set `MISTRAL_API_KEY` or store a Mistral API key in Windows Credential Manager, then enable Mistral in **Providers**. Create the key in Studio under **API keys** at console.mistral.ai. |

For OpenCode Go, set `OPENCODE_GO_WORKSPACE_ID` and `OPENCODE_GO_AUTH_COOKIE`, or create `%APPDATA%\opencode-go\config.json`:

Expand All @@ -90,6 +91,8 @@ Grok Build usage comes from the session the CLI stores in `%USERPROFILE%\.grok\a

GitHub Copilot usage comes from `api.github.com/copilot_internal/user`, the endpoint Copilot's own editors and CLI read. The monitor uses the first GitHub login that endpoint accepts, in this order: the `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, or `GITHUB_TOKEN` environment variable, the Copilot CLI login, then the GitHub CLI login, both read from Windows Credential Manager. Copilot spends one premium-request pool per calendar month, so the monitor shows it on the long-window row and leaves the short-window row empty. Metered chat and completion allowances, as on Copilot Free, are available to themes through `copilot.limits.chat` and `copilot.limits.completions`.

Mistral usage (Vibe CLI and Studio/La Plateforme) comes from `api.mistral.ai` with a Bearer API key, read from `MISTRAL_API_KEY` or from the `mistral:vibe-api-key` entry in Windows Credential Manager — the same key the Vibe CLI uses. The short-window row reads the `x-ratelimit-*` headers returned by `GET /v1/models`; the long-window row shows the calendar-month spend from `GET /v1/billing/usage` (in EUR) against the `monthly_budget` from `GET /v1/billing/subscription`, resetting at midnight UTC on the 1st, and is labelled `30d`. Billing routes that the key cannot read (403/404) are skipped without failing the poll.

## Data and privacy

The monitor reads local sign-in credentials for enabled providers and sends usage requests directly to their official services. It has no backend service, collects no telemetry, and does not upload credentials or project files.
Expand Down
7 changes: 7 additions & 0 deletions src/app_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ pub struct SettingsFile {
show_grok: bool,
#[serde(default)]
show_copilot: bool,
#[serde(default)]
show_mistral: bool,
#[serde(default = "default_true")]
pub custom_theme_enabled: bool,
/// Show what is left of each allowance instead of what has been spent, so
Expand Down Expand Up @@ -140,6 +142,7 @@ impl Default for SettingsFile {
show_cursor: false,
show_grok: false,
show_copilot: false,
show_mistral: false,
custom_theme_enabled: true,
usage_countdown: false,
use_windows_default_font: true,
Expand Down Expand Up @@ -239,6 +242,7 @@ impl SettingsFile {
ProviderId::Cursor => self.show_cursor,
ProviderId::Grok => self.show_grok,
ProviderId::Copilot => self.show_copilot,
ProviderId::Mistral => self.show_mistral,
}
}

Expand Down Expand Up @@ -287,6 +291,7 @@ impl SettingsFile {
ProviderId::Cursor => self.show_cursor = enabled,
ProviderId::Grok => self.show_grok = enabled,
ProviderId::Copilot => self.show_copilot = enabled,
ProviderId::Mistral => self.show_mistral = enabled,
}
}

Expand Down Expand Up @@ -654,6 +659,7 @@ mod tests {
ProviderId::Cursor,
ProviderId::Grok,
ProviderId::Copilot,
ProviderId::Mistral,
]));

let json = settings_json(&settings);
Expand All @@ -664,6 +670,7 @@ mod tests {
assert_eq!(json["show_cursor"], true);
assert_eq!(json["show_grok"], true);
assert_eq!(json["show_copilot"], true);
assert_eq!(json["show_mistral"], true);

let decoded = decode_settings(&json.to_string()).unwrap();
assert_eq!(decoded.enabled_providers(), settings.enabled_providers());
Expand Down
10 changes: 10 additions & 0 deletions src/context_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,13 @@ pub fn classic_context_menu() -> ContextMenuDocument {
provider: Provider::Copilot,
},
),
ContextMenuItem::action(
"provider-mistral",
"Mistral",
Action::ToggleProvider {
provider: Provider::Mistral,
},
),
],
);
let languages = std::iter::once(ContextMenuItem::action(
Expand Down Expand Up @@ -730,6 +737,9 @@ mod tests {
assert!(serde_json::to_string(&menu)
.unwrap()
.contains("provider-copilot"));
assert!(serde_json::to_string(&menu)
.unwrap()
.contains("provider-mistral"));
assert!(menu.items.iter().any(|item| {
item.id == "toggle-widget"
&& matches!(
Expand Down
Binary file modified src/icons/brand-marks.ttf
Binary file not shown.
6 changes: 6 additions & 0 deletions src/localization/locales/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ opencode_model = "OpenCode"
cursor_model = "Cursor"
grok_model = "Grok"
copilot_model = "Copilot"
mistral_model = "Mistral"
settings = "Einstellungen"
start_with_windows = "Mit Windows starten"
language = "Sprache"
Expand Down Expand Up @@ -58,13 +59,16 @@ cursor_token_expired_body = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), th
grok_token_expired_title = "Grok-Authentifizierungsfehler"
grok_token_expired_body = "Führen Sie 'grok login' in einem Terminal aus und folgen Sie den Anmeldeanweisungen. Aktualisieren oder starten Sie diese App anschließend neu."
copilot_token_expired_title = "Copilot-Authentifizierungsfehler"
mistral_token_expired_title = "Mistral-Authentifizierungsfehler"
copilot_token_expired_body = "Melden Sie sich mit der Copilot-CLI ('copilot', dann /login) oder der GitHub-CLI ('gh auth login') an oder setzen Sie GH_TOKEN. Aktualisieren oder starten Sie diese App anschließend neu."
mistral_token_expired_body = "Legen Sie MISTRAL_API_KEY fest oder speichern Sie einen Mistral-API-Schlüssel im Windows-Anmeldeinformations-Manager (erstellen Sie einen in Studio unter API-Schlüssel auf console.mistral.ai). Aktualisieren oder starten Sie diese App anschließend neu."
codex_window_title = "Codex-Nutzungsmonitor"
antigravity_window_title = "Antigravity-Nutzungsmonitor"
opencode_window_title = "OpenCode-Nutzungsmonitor"
cursor_window_title = "Cursor-Nutzungsmonitor"
grok_window_title = "Grok-Nutzungsmonitor"
copilot_window_title = "Copilot-Nutzungsmonitor"
mistral_window_title = "Mistral-Nutzungsmonitor"

[translations]
"Use Windows default font" = "Windows-Standardschrift verwenden"
Expand Down Expand Up @@ -131,6 +135,7 @@ copilot_window_title = "Copilot-Nutzungsmonitor"
"Codex" = "Codex"
"Collect usage from Anthropic" = "Nutzungsdaten von Anthropic abrufen"
"Collect usage from GitHub" = "Nutzungsdaten von GitHub abrufen"
"Collect usage from Mistral" = "Nutzungsdaten von Mistral abrufen"
"Collect usage from Google" = "Nutzungsdaten von Google abrufen"
"Collect usage from OpenAI" = "Nutzungsdaten von OpenAI abrufen"
"Collect usage from xAI" = "Nutzungsdaten von xAI abrufen"
Expand Down Expand Up @@ -258,6 +263,7 @@ copilot_window_title = "Copilot-Nutzungsmonitor"
"Live preview" = "Live-Vorschau"
"Medium" = "Medium"
"Menu action" = "Menüaktion"
"Mistral" = "Mistral"
"Monitor" = "Monitor"
"Mouse action" = "Mausaktion"
"Mouse enter" = "Mouse enter"
Expand Down
6 changes: 6 additions & 0 deletions src/localization/locales/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ opencode_model = "OpenCode"
cursor_model = "Cursor"
grok_model = "Grok"
copilot_model = "Copilot"
mistral_model = "Mistral"
settings = "Settings"
start_with_windows = "Start with Windows"
language = "Language"
Expand Down Expand Up @@ -58,13 +59,16 @@ cursor_token_expired_body = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), th
grok_token_expired_title = "Grok Auth Error"
grok_token_expired_body = "Run 'grok login' in a terminal and follow the sign-in prompts. After that, refresh or restart this app."
copilot_token_expired_title = "Copilot Auth Error"
mistral_token_expired_title = "Mistral Auth Error"
copilot_token_expired_body = "Sign in with the Copilot CLI ('copilot', then /login) or the GitHub CLI ('gh auth login'), or set GH_TOKEN. After that, refresh or restart this app."
mistral_token_expired_body = "Set MISTRAL_API_KEY or store a Mistral API key in Windows Credential Manager (create one in Studio under API keys at console.mistral.ai). After that, refresh or restart this app."
codex_window_title = "Codex Usage Monitor"
antigravity_window_title = "Antigravity Usage Monitor"
opencode_window_title = "OpenCode Usage Monitor"
cursor_window_title = "Cursor Usage Monitor"
grok_window_title = "Grok Usage Monitor"
copilot_window_title = "Copilot Usage Monitor"
mistral_window_title = "Mistral Usage Monitor"

[translations]
"Use Windows default font" = "Use Windows default font"
Expand Down Expand Up @@ -131,6 +135,7 @@ copilot_window_title = "Copilot Usage Monitor"
"Codex" = "Codex"
"Collect usage from Anthropic" = "Collect usage from Anthropic"
"Collect usage from GitHub" = "Collect usage from GitHub"
"Collect usage from Mistral" = "Collect usage from Mistral"
"Collect usage from Google" = "Collect usage from Google"
"Collect usage from OpenAI" = "Collect usage from OpenAI"
"Collect usage from xAI" = "Collect usage from xAI"
Expand Down Expand Up @@ -258,6 +263,7 @@ copilot_window_title = "Copilot Usage Monitor"
"Live preview" = "Live preview"
"Medium" = "Medium"
"Menu action" = "Menu action"
"Mistral" = "Mistral"
"Monitor" = "Monitor"
"Mouse action" = "Mouse action"
"Mouse enter" = "Mouse enter"
Expand Down
6 changes: 6 additions & 0 deletions src/localization/locales/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ opencode_model = "OpenCode"
cursor_model = "Cursor"
grok_model = "Grok"
copilot_model = "Copilot"
mistral_model = "Mistral"
settings = "Configuración"
start_with_windows = "Iniciar con Windows"
language = "Idioma"
Expand Down Expand Up @@ -58,13 +59,16 @@ cursor_token_expired_body = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), th
grok_token_expired_title = "Error de autenticación de Grok"
grok_token_expired_body = "Ejecuta 'grok login' en una terminal y sigue las indicaciones de inicio de sesión. Después, actualiza o reinicia esta aplicación."
copilot_token_expired_title = "Error de autenticación de Copilot"
mistral_token_expired_title = "Error de autenticación de Mistral"
copilot_token_expired_body = "Inicia sesión con la CLI de Copilot ('copilot' y luego /login) o con la CLI de GitHub ('gh auth login'), o define GH_TOKEN. Después, actualiza o reinicia esta aplicación."
mistral_token_expired_body = "Define MISTRAL_API_KEY o guarda una clave de API de Mistral en el Administrador de credenciales de Windows (créala en Studio, en Claves de API, en console.mistral.ai). Después, actualiza o reinicia esta aplicación."
codex_window_title = "Monitor de uso de Codex"
antigravity_window_title = "Monitor de uso de Antigravity"
opencode_window_title = "Monitor de uso de OpenCode"
cursor_window_title = "Monitor de uso de Cursor"
grok_window_title = "Monitor de uso de Grok"
copilot_window_title = "Monitor de uso de Copilot"
mistral_window_title = "Monitor de uso de Mistral"

[translations]
"Use Windows default font" = "Usar la fuente predeterminada de Windows"
Expand Down Expand Up @@ -131,6 +135,7 @@ copilot_window_title = "Monitor de uso de Copilot"
"Codex" = "Codex"
"Collect usage from Anthropic" = "Recopilar uso de Anthropic"
"Collect usage from GitHub" = "Recopilar uso de GitHub"
"Collect usage from Mistral" = "Recopilar uso de Mistral"
"Collect usage from Google" = "Recopilar uso de Google"
"Collect usage from OpenAI" = "Recopilar uso de OpenAI"
"Collect usage from xAI" = "Recopilar uso de xAI"
Expand Down Expand Up @@ -258,6 +263,7 @@ copilot_window_title = "Monitor de uso de Copilot"
"Live preview" = "Vista previa en vivo"
"Medium" = "Medium"
"Menu action" = "Acción de menú"
"Mistral" = "Mistral"
"Monitor" = "Monitor"
"Mouse action" = "Acción del ratón"
"Mouse enter" = "Mouse enter"
Expand Down
6 changes: 6 additions & 0 deletions src/localization/locales/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ opencode_model = "OpenCode"
cursor_model = "Cursor"
grok_model = "Grok"
copilot_model = "Copilot"
mistral_model = "Mistral"
settings = "Paramètres"
start_with_windows = "Démarrer avec Windows"
language = "Langue"
Expand Down Expand Up @@ -58,13 +59,16 @@ cursor_token_expired_body = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), th
grok_token_expired_title = "Erreur d'authentification Grok"
grok_token_expired_body = "Exécutez 'grok login' dans un terminal et suivez les instructions de connexion. Ensuite, actualisez ou redémarrez cette application."
copilot_token_expired_title = "Erreur d'authentification Copilot"
mistral_token_expired_title = "Erreur d'authentification Mistral"
copilot_token_expired_body = "Connectez-vous avec la CLI Copilot ('copilot', puis /login) ou la CLI GitHub ('gh auth login'), ou définissez GH_TOKEN. Ensuite, actualisez ou redémarrez cette application."
mistral_token_expired_body = "Définissez MISTRAL_API_KEY ou enregistrez une clé API Mistral dans le Gestionnaire d'informations d'identification Windows (créez-en une dans Studio › Clés API sur console.mistral.ai). Ensuite, actualisez ou redémarrez cette application."
codex_window_title = "Moniteur d'utilisation Codex"
antigravity_window_title = "Moniteur d'utilisation Antigravity"
opencode_window_title = "Moniteur d'utilisation OpenCode"
cursor_window_title = "Moniteur d'utilisation Cursor"
grok_window_title = "Moniteur d'utilisation Grok"
copilot_window_title = "Moniteur d'utilisation Copilot"
mistral_window_title = "Moniteur d'utilisation Mistral"

[translations]
"Use Windows default font" = "Utiliser la police par défaut de Windows"
Expand Down Expand Up @@ -131,6 +135,7 @@ copilot_window_title = "Moniteur d'utilisation Copilot"
"Codex" = "Codex"
"Collect usage from Anthropic" = "Collecter l'utilisation depuis Anthropic"
"Collect usage from GitHub" = "Collecter l'utilisation depuis GitHub"
"Collect usage from Mistral" = "Collecter l'utilisation depuis Mistral"
"Collect usage from Google" = "Collecter l'utilisation depuis Google"
"Collect usage from OpenAI" = "Collecter l'utilisation depuis OpenAI"
"Collect usage from xAI" = "Collecter l'utilisation depuis xAI"
Expand Down Expand Up @@ -258,6 +263,7 @@ copilot_window_title = "Moniteur d'utilisation Copilot"
"Live preview" = "Aperçu en direct"
"Medium" = "Medium"
"Menu action" = "Action de menu"
"Mistral" = "Mistral"
"Monitor" = "Monitor"
"Mouse action" = "Action de la souris"
"Mouse enter" = "Mouse enter"
Expand Down
6 changes: 6 additions & 0 deletions src/localization/locales/ja.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ opencode_model = "OpenCode"
cursor_model = "Cursor"
grok_model = "Grok"
copilot_model = "Copilot"
mistral_model = "Mistral"
settings = "設定"
start_with_windows = "Windows と同時に開始"
language = "言語"
Expand Down Expand Up @@ -60,13 +61,16 @@ cursor_token_expired_body = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), th
grok_token_expired_title = "Grok 認証エラー"
grok_token_expired_body = "ターミナルで 'grok login' を実行し、サインインの案内に従ってください。その後、このアプリを更新または再起動してください。"
copilot_token_expired_title = "Copilot 認証エラー"
mistral_token_expired_title = "Mistral 認証エラー"
copilot_token_expired_body = "Copilot CLI('copilot' を実行して /login)または GitHub CLI('gh auth login')でサインインするか、GH_TOKEN を設定してください。その後、このアプリを更新または再起動してください。"
mistral_token_expired_body = "MISTRAL_API_KEY を設定するか、Mistral API キーを Windows の資格情報マネージャーに保存してください(console.mistral.ai の Studio › API キーで作成できます)。その後、このアプリを更新または再起動してください。"
codex_window_title = "Codex 使用量モニター"
antigravity_window_title = "Antigravity 使用量モニター"
opencode_window_title = "OpenCode 使用量モニター"
cursor_window_title = "Cursor 使用量モニター"
grok_window_title = "Grok 使用量モニター"
copilot_window_title = "Copilot 使用量モニター"
mistral_window_title = "Mistral 使用量モニター"

[translations]
"Use Windows default font" = "Windows の既定のフォントを使用"
Expand Down Expand Up @@ -133,6 +137,7 @@ copilot_window_title = "Copilot 使用量モニター"
"Codex" = "Codex"
"Collect usage from Anthropic" = "Anthropic から使用量を取得"
"Collect usage from GitHub" = "GitHub から使用量を取得"
"Collect usage from Mistral" = "Mistral から使用量を取得"
"Collect usage from Google" = "Google から使用量を取得"
"Collect usage from OpenAI" = "OpenAI から使用量を取得"
"Collect usage from xAI" = "xAI から使用量を取得"
Expand Down Expand Up @@ -260,6 +265,7 @@ copilot_window_title = "Copilot 使用量モニター"
"Live preview" = "ライブプレビュー"
"Medium" = "Medium"
"Menu action" = "メニュー操作"
"Mistral" = "Mistral"
"Monitor" = "Monitor"
"Mouse action" = "マウス操作"
"Mouse enter" = "Mouse enter"
Expand Down
6 changes: 6 additions & 0 deletions src/localization/locales/ko.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ opencode_model = "OpenCode"
cursor_model = "Cursor"
grok_model = "Grok"
copilot_model = "Copilot"
mistral_model = "Mistral"
settings = "설정"
start_with_windows = "Windows 시작 시 자동 실행"
language = "언어"
Expand Down Expand Up @@ -60,13 +61,16 @@ cursor_token_expired_body = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), th
grok_token_expired_title = "Grok 인증 오류"
grok_token_expired_body = "터미널에서 'grok login'을 실행하고 로그인 안내를 따르세요. 그런 다음 이 앱을 새로 고치거나 다시 시작하세요."
copilot_token_expired_title = "Copilot 인증 오류"
mistral_token_expired_title = "Mistral 인증 오류"
copilot_token_expired_body = "Copilot CLI('copilot' 실행 후 /login) 또는 GitHub CLI('gh auth login')로 로그인하거나 GH_TOKEN을 설정하세요. 그런 다음 이 앱을 새로 고치거나 다시 시작하세요."
mistral_token_expired_body = "MISTRAL_API_KEY를 설정하거나 Mistral API 키를 Windows 자격 증명 관리자에 저장하세요(console.mistral.ai의 Studio › API 키에서 만들 수 있음). 그런 다음 이 앱을 새로 고치거나 다시 시작하세요."
codex_window_title = "Codex 사용량 모니터"
antigravity_window_title = "Antigravity 사용량 모니터"
opencode_window_title = "OpenCode 사용량 모니터"
cursor_window_title = "Cursor 사용량 모니터"
grok_window_title = "Grok 사용량 모니터"
copilot_window_title = "Copilot 사용량 모니터"
mistral_window_title = "Mistral 사용량 모니터"

[translations]
"Use Windows default font" = "Windows 기본 글꼴 사용"
Expand Down Expand Up @@ -133,6 +137,7 @@ copilot_window_title = "Copilot 사용량 모니터"
"Codex" = "Codex"
"Collect usage from Anthropic" = "Anthropic에서 사용량 수집"
"Collect usage from GitHub" = "GitHub에서 사용량 수집"
"Collect usage from Mistral" = "Mistral에서 사용량 수집"
"Collect usage from Google" = "Google에서 사용량 수집"
"Collect usage from OpenAI" = "OpenAI에서 사용량 수집"
"Collect usage from xAI" = "xAI에서 사용량 수집"
Expand Down Expand Up @@ -260,6 +265,7 @@ copilot_window_title = "Copilot 사용량 모니터"
"Live preview" = "실시간 미리보기"
"Medium" = "Medium"
"Menu action" = "메뉴 동작"
"Mistral" = "Mistral"
"Monitor" = "Monitor"
"Mouse action" = "마우스 동작"
"Mouse enter" = "Mouse enter"
Expand Down
Loading