Nano Metrics - VSCode Extension

Track Claude Code inside VS Code. Nano Metrics shows what Claude Code is doing right now, and what it costs: live tokens, estimated cost and burn rate, context window fill, plan usage limits (5-hour and weekly), tool calls, subagents and edited files, per chat and for the whole project. Alerts tell you when a chat's context is nearly full or today's spend passes your budget.
It is also a lightweight system and project monitor: CPU, memory, temperature, network, top apps, listening ports and the dev servers, watchers and language servers your workspace runs, all in the sidebar.
Works with the Claude Code CLI and the Claude Code VS Code extension. Runs fully locally: no account, no telemetry, no network requests.

Features
Claude Code activity tracking

Watch your AI pair programmer work, without leaving the sidebar. The Claude tab follows every recent Claude Code session in your workspace:
- Live status - Working, Your turn (Claude finished and waits for your prompt), Waiting on a tool (a permission prompt or a long run) or Idle. The tab shows a dot when a session needs you, so you notice from any tab
- What it's doing right now - the current tool call, and the last prompt you sent
- Context meter - how full the context window was on the latest request
- Tokens, cost and burn rate - total tokens, the estimated cost (what the usage would be billed through the Anthropic API) and $/hr. Override prices with
nanometrics.claudePricing
- Code stats - tool calls, files edited, lines added / removed and failed tool calls
- Activity chart - tool calls per minute over the last 30 minutes, coloured by kind (explore, edit, run, web, agents)
- Hot files - the most edited files, click to open
- Subagents and workflows - every agent the session spawns, with running/done status, tool calls, tokens and cost; their usage is included in the session totals
- Plan progress and recent activity - Claude's task list with done/total, and the last actions with timestamps
- Research trail - every web search Claude ran and page it fetched (click to open the page)
- Models and cache - tokens and cost per model when you switch models, plus the cache hit rate and how much caching saved
- Errors - failed tool calls with their error message
- Token graph - tokens per minute over the last hour, across every session in the workspace
- Last 7 days - estimated spend per day in this workspace, and today's total
- Project totals - estimated cost, tokens and tool calls across every chat in this project, with the mix of tool kinds
- Chats - the last week's chats with their context fill, tool calls and cost; Resume opens a terminal with
claude --resume
- Claude Code load - CPU and memory of the running
claude processes against total system usage, and tokens per minute
- Checkpoints and undo - every recent prompt that changed files, with one-click Undo that restores those files to how they were before it (asks first, lists every file)
- Stuck-loop detector - flags a chat that keeps failing the same command or keeps editing one file while errors continue
- Your-turn ping - a notification (and optional sound) when Claude finishes or needs approval, so you can step away while it works
- Alerts - a heads-up when a new chat starts, when a chat's context passes 80%, and when today's spend passes your budget
- Plan usage - your Claude plan's 5-hour and weekly limits as bars, with the time each one resets: the same numbers as
/usage in Claude Code, read from Claude Code's local cache. No setup. The /usage button opens Claude Code with /usage filled in to refresh them. Hidden when there is nothing to show
- A CC row in the Explorer panel and a summary card on the Project tab show what Claude is doing at a glance
It reads Claude Code's local session transcripts (~/.claude/projects). Nothing is uploaded.
System dashboard
- Live CPU and memory gauges with history graphs
- Per-core load heatmap and CPU temperature (where available)
- Network throughput (download / upload) for the default interface
- Top apps by CPU or memory, with helper processes folded into one row
- Load average, disk and swap usage, battery and GPU info
- Optional service monitoring: MySQL, Postgres, MongoDB, Redis, Docker, Nginx, Apache, Elasticsearch, RabbitMQ, Kafka, OracleDB, SQL Server, Neo4j, Cassandra, MariaDB, CouchDB, InfluxDB, ClickHouse, Memcached, etcd, Consul, ZooKeeper, Prometheus, Grafana, MinIO, HAProxy, Traefik, Ollama

Project monitor
See what your open project is costing you, right next to your code:
- Every process tied to the workspace — anything running in VS Code terminals, processes whose working directory is inside the project, and the language servers / linters extensions run for this window
- Process trees with combined CPU and memory, so
npm run dev shows the real cost of everything it spawned
- Listening ports for each process — click to open
localhost:<port> in the browser
- Stop a process tree with one click
- Git branch and one-click
package.json scripts (npm, yarn, pnpm or bun)
Everywhere else
Compact NanoMetrics panel in the Explorer — CPU, memory, temperature (macOS), network, project and Claude Code at a glance
CPU and memory in the status bar, highlighted when usage crosses your warning threshold
Uses your VS Code theme colors, light or dark
Installation
- Open Visual Studio Code
- Go to Extensions (or press
Ctrl+Shift+X)
- Search for "Nano Metrics"
- Install the extension
Usage
- Click the Nano Metrics icon in the Activity Bar for the full dashboard, or use the NanoMetrics panel in the Explorer
- Switch between the System, Project and Claude tabs
- Click the status bar item to jump to the dashboard
- Search for "Nano Metrics" in VS Code settings to tune it
| Setting |
Default |
Description |
nanometrics.refreshInterval |
2000 |
Refresh interval in milliseconds |
nanometrics.showStatusBar |
true |
Show CPU and memory in the status bar |
nanometrics.warningThreshold |
85 |
Usage % highlighted as a warning |
nanometrics.showGraph |
true |
Show history graphs |
nanometrics.enableNetwork / enableDisk |
true |
Network and disk sections |
nanometrics.enableGpu / enableBattery |
false |
GPU and battery sections |
nanometrics.statusBarStyle |
full |
compact shortens the status bar to e.g. 12·45% |
nanometrics.claudePricing |
{} |
Override model prices (USD per 1M tokens) for the cost estimate |
nanometrics.claudeContextWarning |
80 |
Warn once per chat when its context passes this %; 0 turns it off |
nanometrics.claudeDailyBudget |
0 |
Warn once a day when today's estimated spend (USD) passes this; 0 turns it off |
nanometrics.notifyClaudeSession |
true |
Notify when a new Claude Code chat starts in the workspace |
nanometrics.claudeTurnNotify |
unfocused |
Your-turn ping: unfocused, always or off |
nanometrics.claudeTurnSound |
false |
Play a short sound with the your-turn ping (macOS, Linux) |
nanometrics.claudeLoopWarning |
true |
Warn when a chat looks stuck in a loop |
nanometrics.enable<Service> |
false |
Monitor a background service |
Process working directories and ports are read with lsof on macOS and /proc on Linux. On Windows the project monitor relies on terminals and command lines.
Privacy and open source
Nano Metrics runs entirely on your machine. Nothing is sent anywhere: no telemetry, no analytics, no account, no server. The extension makes no network requests at all.
What it reads, locally:
- System stats (CPU, memory, disks, network, battery, GPU) from your operating system
- Processes, working directories and listening ports (
ps, lsof on macOS, /proc on Linux)
- Your workspace's
package.json scripts and current git branch
- Claude Code's session transcripts in
~/.claude/projects, read only, to show what Claude is doing, tokens and estimated cost
- The plan limits Claude Code last saved for
/usage in ~/.claude.json, read only. Nano Metrics never reads your login token and never asks Anthropic for anything
What it writes: nothing. It doesn't change your Claude Code settings or any of your files.
Links open in your browser only when you click them: localhost ports, the claude.ai usage page (only if the Claude Code extension isn't installed) and GitHub. The /usage button hands /usage to Claude Code, which then checks your limits itself.
The code is open source under the MIT License. Don't take our word for it: read every line on GitHub, and build the extension from source if you prefer.
Contribution
Feel free to contribute to this project by reporting issues or submitting pull requests. Visit our GitHub repository to get involved. Your feedback and contributions mean a lot as we continue to enhance and improve Nano Metrics. This project is under active development, and your input is invaluable.
If Nano Metrics helps you, consider supporting its development:
License
This project is licensed under the MIT License - see the LICENSE file for details.
🚀 Happy coding !!!
| |