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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Notable changes to Claude Code Usage Monitor are documented here, newest first.
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), with
changes grouped into Added, Changed, Fixed, and Removed where applicable.

## [Unreleased]

### Added

- Add Mistral as a provider: shows Vibe Code credits and La Plateforme API credits (both monthly budgets) in the widget. Reads `MISTRAL_API_KEY` or the Vibe CLI's `~/.vibe/.env`.

## [2.23.6] - 2026-11-11

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Windows](https://img.shields.io/badge/platform-Windows-blue)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A lightweight, open-source Windows taskbar widget for monitoring Claude Code usage limits and reset times. It can also display usage for Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, and GitHub Copilot.
A lightweight, open-source Windows taskbar widget for monitoring Claude Code usage limits and reset times. It can also display usage for Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, GitHub Copilot, and Mistral.

See the [user guide](USER_GUIDE.md) for theme customisation and everyday settings,
or the [changelog](CHANGELOG.md) for version history and notable changes.
Expand All @@ -14,7 +14,7 @@ or the [changelog](CHANGELOG.md) for version history and notable changes.

- Displays current usage and time remaining until each limit resets
- Counts usage up from zero or down from the full allowance, whichever you prefer
- Supports Claude Code, Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, and GitHub Copilot
- Supports Claude Code, Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, GitHub Copilot, and Mistral
- Supports multiple accounts for Claude Code and Codex
- Lives in the Windows taskbar with quick controls in the system tray
- Supports multiple monitors and Windows startup
Expand Down 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 | Set `MISTRAL_API_KEY`, or sign in with the official Vibe CLI (the monitor reads `%USERPROFILE%\.vibe\.env`; set `VIBE_HOME` if the CLI uses another home), or the Windows Credential Manager entry `ai.mistral.vibe` written by `vibe --setup` (sign-in with the Vibe CLI). Enable Mistral in **Providers**. |

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

Expand All @@ -84,6 +85,8 @@ For OpenCode Go, set `OPENCODE_GO_WORKSPACE_ID` and `OPENCODE_GO_AUTH_COOKIE`, o

The workspace ID is part of the OpenCode Go console URL: `https://opencode.ai/console/<workspaceId>/go`. Copy the `__Host-console_session` cookie from an authenticated `opencode.ai` browser session, including its name as shown above. A full Cookie header containing `__Host-console_session` or the legacy `auth` cookie is also accepted unchanged; no empty `auth=;` prefix is needed. Bare legacy `auth` cookie values remain supported. These formats work for both `authCookie` and `OPENCODE_GO_AUTH_COOKIE`. Set `OPENCODE_GO_CONFIG_FILE` to use a different config path. The monitor reads usage from the console JSON API using this workspace ID and cookie.

For Mistral, the monitor reads `MISTRAL_API_KEY` from the environment first; if it is unset, it falls back to the official Vibe CLI's `.env` file, at `%VIBE_HOME%\.env` when `VIBE_HOME` is set and `%USERPROFILE%\.vibe\.env` otherwise. The monitor reads the account's two monthly budgets, Vibe Code credits and API credits, from `https://api.mistral.ai/v1/billing/budget`. Both reset at the end of the calendar month, so the widget shows them as two lines sharing the same month-end reset.

For Cursor, `CURSOR_SESSION_TOKEN` can override the automatically detected local session.

Grok Build usage comes from the session the CLI stores in `%USERPROFILE%\.grok\auth.json`, read through the same billing endpoint as the CLI's own `/usage` panel. Set `GROK_HOME` if the CLI keeps its home directory elsewhere. Only xAI sign-in entries are used; corporate identity-provider tokens and stored API keys are excluded. A bare `XAI_API_KEY` is not enough: the shared weekly allowance is only readable with a signed-in session. Grok reports one pool per billing period rather than a five-hour window, so the monitor shows it on the long-window row alongside the other providers, leaving the short-window row empty. On-demand spending replaces the pool on that row once any is used, as it already does for Claude Code and Codex.
Expand Down
7 changes: 7 additions & 0 deletions USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ Custom theme files are stored in:
These settings save automatically. The default theme adapts to enabled providers;
a custom theme must include layers for the providers you want to display.

Most providers only need their own sign-in. Mistral also needs an API key: the
monitor reads `MISTRAL_API_KEY`, or the Vibe CLI's `.env` file at
`%USERPROFILE%\.vibe\.env`, or `%VIBE_HOME%\.env` when `VIBE_HOME` is set, or the
Windows Credential Manager entry `ai.mistral.vibe` written by `vibe --setup`
(sign-in with the Vibe CLI). Its Vibe Code credits and API credits are the
account's two monthly budgets, both resetting at the end of the month.

## Show used or remaining allowance

1. Open **Settings > Display**.
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.
4 changes: 4 additions & 0 deletions src/localization/locales/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ opencode_window_title = "OpenCode-Nutzungsmonitor"
cursor_window_title = "Cursor-Nutzungsmonitor"
grok_window_title = "Grok-Nutzungsmonitor"
copilot_window_title = "Copilot-Nutzungsmonitor"
mistral_model = "Mistral"
mistral_token_expired_title = "Mistral-Authentifizierungsfehler"
mistral_token_expired_body = "Legen Sie die Umgebungsvariable MISTRAL_API_KEY fest oder melden Sie sich mit der offiziellen Vibe-CLI an, sodass ~/.vibe/.env MISTRAL_API_KEY enthält. Danach aktualisieren Sie die Anwendung oder starten Sie sie neu."
mistral_window_title = "Mistral-Nutzungsmonitor"

[translations]
"Use Windows default font" = "Windows-Standardschrift verwenden"
Expand Down
4 changes: 4 additions & 0 deletions src/localization/locales/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ opencode_model = "OpenCode"
cursor_model = "Cursor"
grok_model = "Grok"
copilot_model = "Copilot"
mistral_model = "Mistral"
mistral_token_expired_title = "Mistral Auth Error"
mistral_token_expired_body = "Set the MISTRAL_API_KEY environment variable, or sign in with the official Vibe CLI so ~/.vibe/.env contains MISTRAL_API_KEY. After that, refresh or restart this app."
mistral_window_title = "Mistral Usage Monitor"
settings = "Settings"
start_with_windows = "Start with Windows"
language = "Language"
Expand Down
4 changes: 4 additions & 0 deletions src/localization/locales/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ 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_model = "Mistral"
mistral_token_expired_title = "Error de autenticación de Mistral"
mistral_token_expired_body = "Establece la variable de entorno MISTRAL_API_KEY o inicia sesión con la CLI oficial de Vibe para que ~/.vibe/.env contenga MISTRAL_API_KEY. Después, actualiza o reinicia esta aplicación."
mistral_window_title = "Monitor de uso de Mistral"

[translations]
"Use Windows default font" = "Usar la fuente predeterminada de Windows"
Expand Down
4 changes: 4 additions & 0 deletions src/localization/locales/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ 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_model = "Mistral"
mistral_token_expired_title = "Erreur d'authentification Mistral"
mistral_token_expired_body = "Définissez la variable d'environnement MISTRAL_API_KEY, ou connectez-vous avec la CLI Vibe officielle afin que ~/.vibe/.env contienne MISTRAL_API_KEY. Ensuite, actualisez ou redémarrez cette application."
mistral_window_title = "Moniteur d'utilisation Mistral"

[translations]
"Use Windows default font" = "Utiliser la police par défaut de Windows"
Expand Down
Loading