Sidebar analytics — daily and per-project token breakdown with visual progress bars
Per-project & per-day model breakdown — see which models were used and how much each cost
LLM cost comparison — compare what your token usage would cost across models using live OpenRouter pricing, with provider filtering, sort direction, and age filters
Quota tracking — monitors your z.ai quota
Configurable auto-refresh — data updates automatically (default 5 minutes, customizable in settings)
Enter your provider API key (stored securely in VS Code SecretStorage)
TokenLens: Refresh
Manually refresh token usage data
TokenLens: Settings
Open the settings panel (API key, refresh interval, database path)
Data Source
Token Lens reads usage data from the local Kilo SQLite database and your z.ai account quota via the z.ai API. The database location defaults to $XDG_DATA_HOME/kilo/kilo.db (~/.local/share/kilo/kilo.db, or %LOCALAPPDATA%\kilo\kilo.db on Windows) and can be changed via the token-lens.databasePath setting or the in-sidebar settings panel.
Getting Started
Install the extension from the VS Code Marketplace
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
Run TokenLens: Set API Key and paste your z.ai API key