Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Token LensNew to Visual Studio Code? Get it now.
Token Lens

Token Lens

timx

|
10 installs
| (1) | Free
Track LLM token usage and costs in the status bar with detailed analytics in the sidebar
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Token Lens

VS Code Version License: MIT VS Code Marketplace

Token Lens overview

Master your LLM spend with usage insights tailored to your coding style.

Features

  • Status bar indicator — color-coded usage at a glance (normal, warning ≥50%, error ≥80%)
  • Rich tooltip — usage bar, percentage, and time until reset
  • Sidebar analytics — daily and per-project token breakdown
  • LLM cost comparison — compare usage costs to understand model spend at a glance
  • Auto-refresh — data updates every 5 minutes

Supported Providers

  • z.ai

Commands

Command Description
TokenLens: Set API Key Enter your provider API key (stored securely)
TokenLens: Refresh Manually refresh token usage data

Getting Started

  1. Install the extension from the VS Code Marketplace
  2. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  3. Run TokenLens: Set API Key and paste your API key
  4. Token usage appears in the status bar immediately
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft