Releases: pbek/tokstat
Releases · pbek/tokstat
tokstat v0.7.0
Changelog
Added
- Azure OpenAI provider support
- New provider for monitoring Azure-hosted OpenAI deployments
- API key authentication with resource name configuration
- Tracks token usage, request counts, and rate limits across deployments
- Supports
AZURE_RESOURCE_NAMEenvironment variable for resource name configuration - Login via
tokstat login azure --name my-azure - Available in both CLI and TUI dashboard
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.7.0tokstat v0.6.0
Changelog
Added
-
Account reordering in dashboard
- Press
Shift+Jto move selected account down in the list - Press
Shift+Kto move selected account up in the list - Account order is automatically saved and persists across sessions
- Press
-
Model multipliers panel in dashboard
- Links to the official GitHub documentation for the current model multiplier table
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.6.0tokstat v0.5.0
Changelog
Added
- Copy confirmation code during Copilot login
- Press
'c'during GitHub Copilot OAuth device flow to copy the user code to clipboard - Shows clear prompt with options: press
'c'to copy or Enter to continue - Works cross-platform (Linux X11/Wayland, macOS, Windows)
- Displays confirmation message when code is successfully copied
- Press
Changed
-
Improved "No providers configured" message
- Now mentions both CLI (
tokstat login) and dashboard (akey) options for adding accounts - Provides clearer guidance for new users on how to get started
- Now mentions both CLI (
-
Improved text input dialogs in dashboard
- Better visual design with colored borders and styled titles (cyan for rename, magenta for create)
- Added emoji icons (✏️ for rename, 📝 for create) for quick visual recognition
- Clear input field labels ("New name:", "Name:") with bold styling
- Helpful placeholder text when input is empty
- Single custom cursor indicator (▌) instead of dual cursors
- Shows current account name when renaming
- Added helpful tips in account creation dialog
- Improved key shortcut labels with green (Enter) and red (Esc) colors
- Consistent visual style across both rename and create dialogs
Fixed
- Fixed dashboard not fully redrawing after account creation
- Terminal screen is now properly cleared and redrawn after returning from external login flow
- No longer requires window resize to refresh the UI
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.5.0tokstat v0.4.0
Changelog
Added
- Quota History Tracking
- Store up to 100 quota snapshots per account when values change
- History panel displayed directly in the dashboard under usage gauges
- Shows timestamp and all quota values (tokens, requests, cost) for each change
- History persists to
~/.config/tokstat/quota_history.json - Automatically removes history when accounts are deleted
- History is updated on every quota refresh when changes are detected
Changed
- Dashboard Layout Redesign
- History panel now aligned to top, directly under usage gauges
- Dynamic layout calculation for info panel (7 lines) + gauges (3 lines each)
- History panel fills remaining vertical space
- Removed separate history toggle mode - history always visible
Fixed
- Fixed OpenRouter cost panel alignment in dashboard
- Cost gauge now properly aligns with Account Info panel for OpenRouter accounts
- Dynamic layout calculation based on which gauges are present (requests, tokens, cost)
- Ensures consistent visual alignment across all provider types
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.4.0tokstat v0.3.1
Changelog
Fixed
- Fixed CLI output formatting
- Removed extra space after stopwatch emoji in "Updated" timestamp line
- Improves visual consistency in the fancy CLI output
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.3.1tokstat v0.3.0
Changelog
Added
- Dashboard now works without any accounts configured
- Welcome screen displayed when no accounts exist
- Shows "Getting Started" guide with supported providers
- Prompts user to press
nto add their first account - Allows full TUI configuration from a clean state
Fixed
- Fixed Copilot quota reset date parsing
- Added support for simple date format (YYYY-MM-DD) in addition to RFC3339
- Reset date now properly displays for GitHub Copilot accounts
Changed
- Dashboard now displays quota reset date
- Added "Quota Resets" field to the Account Info section
- Shows the date when quota limits reset (YYYY-MM-DD format)
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.3.0tokstat v0.2.0
Changelog
Added
- Interactive account management directly from the dashboard
- Add new accounts with
nkey- Opens provider selector popup showing available providers (GitHub Copilot, OpenRouter)
- Navigate providers with ↑↓ arrow keys, Enter to select, Esc to cancel
- Optional custom name input: After selecting provider, enter an optional account name
- Default name auto-generated as
{provider}_{timestamp} - Type a custom name or press Enter to accept the default
- Esc cancels the entire account creation flow
- Default name auto-generated as
- Temporarily exits TUI to run the appropriate authentication flow
- GitHub Copilot: OAuth device flow with user code
- OpenRouter: API key input with validation
- Automatically reloads accounts list and refreshes quota data after successful creation
- New account becomes selected after creation
- Delete accounts with
dkey- Shows confirmation dialog displaying the account name to be deleted
- Press Enter to confirm deletion, Esc to cancel
- Automatically removes account credentials from secure storage
- Reloads accounts list and adjusts selection index after deletion
- Clears and refreshes quota data to reflect changes
- Add new accounts with
Changed
- Breaking: Changed keyboard shortcuts in dashboard
R(uppercase) now refreshes quota informationr(lowercase) now triggers rename mode
- Fixed alignment of right-side panels in dashboard - requests panel now properly aligned with account info panel
- Added "Requests" title/label to the requests panel for better clarity
- Updated dashboard with beautiful visual gauges
- All metrics (Requests, Tokens, Cost) now displayed as color-coded progress bars
- Consistent styling with the CLI output: Green (<50%), Yellow (50-80%), Red (>80%)
- Dark gray borders with colored progress indicators
- Shows remaining requests and percentages for all metrics
- Smart terminal detection with automatic fallback
- Detects when output is being piped (non-interactive)
- Automatically falls back to clean text-only output when piping
- Preserves all information in an easy-to-parse format
- No ANSI escape codes in piped output for better script compatibility
- Updated dashboard color scheme to use only predefined colors
- Header now uses multi-color scheme: LightMagenta (tokstat), Magenta (separator), LightCyan (subtitle)
- Header border changed to Magenta
- Selection highlight changed from Cyan to Magenta for consistency
- Removed all RGB color values for better terminal compatibility
- Completely redesigned the default
tokstatoutput (when run without subcommands)- Default output now uses beautiful colored CLI display
- Box-drawing characters for elegant account cards with magenta borders
- Visual progress bars for Requests, Tokens, and Cost metrics
- Color-coded indicators: Green (<50%), Yellow (50-80%), Red (>80%)
- Provider-specific emojis (🤖 for Copilot, 🌐 for OpenRouter, 🔌 for others)
- No alternate screen needed - displays inline with scrollback preserved
- Added
--jsonflag for scriptable JSON output - Use
tokstat --jsonto output account data as structured JSON - Perfect for scripting and automation (pipe to
jq, etc.) - Includes all account details: name, provider, usage, limits, timestamps
- Failed quota fetches include error messages in the JSON
- Empty accounts list outputs
[]for easy parsing
- Default output now uses beautiful colored CLI display
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.2.0tokstat v0.1.0
Changelog
Added
- Initial release of tokstat CLI tool for monitoring token quotas across AI providers
- Support for GitHub Copilot provider: OAuth device flow login, token usage tracking
- Support for OpenRouter provider: API key authentication, cost and credit limit monitoring
- Interactive terminal dashboard (TUI) for viewing quota information across all accounts
- CLI commands: login, list, dashboard, remove, refresh, version
- Shell completion support for bash, fish, and zsh
- Secure credential storage using system keyring
- Modular provider architecture for easy addition of new AI service integrations
- Comprehensive error handling and user-friendly output
- Added ability to rename accounts in the TUI dashboard using 'n' key shortcut
- Updated footer in dashboard to show all available shortcuts including the new rename option
Installation
Download the appropriate binary for your platform:
- Linux (x86_64):
tokstat-*-x86_64-unknown-linux-gnu.tar.gz - macOS (Apple Silicon):
tokstat-*-aarch64-apple-darwin.tar.gz
Or install via Nix:
nix build github:pbek/tokstat/v0.1.0