Claude Code usage
Claude Lens
Local dashboard visualising Claude Code sessions, token costs, cache performance and tool calls.
Install
npx @foyzulkarim/claude-lens@latestgit clone https://github.com/foyzulkarim/claude-lens.gitFrom the README
claude-lens A local-first observability dashboard for Claude Code sessions — token usage, cost, cache performance, tool calls, and trends across all your projects. The dashboard reads directly from your ~/.claude transcripts; nothing leaves your machine. Presentation https://foyzulkarim.github.io/claude-lens/claude-lens-v2-presentation.html#1 Dashboard Quick start This runs the app and opens it in your browser (defaults to ~/.claude for data, and picks a free port starting at 4128 if that one's busy). To run straight from a branch or commit instead of the published release, use npx github:foyzulkarim/claude-lens[#ref]. Local setup npm start runs the built CLI (dist/cli.js). If you're developing, use npm run dev instead (see below). CLI options - --port — preferred port (default 4128); if taken, the next free port is used. - --no-open — don't auto-open a browser tab. - --roots — one or more directories to scan for Claude Code project transcripts instead of the default ~/.claude/projects. Development Starts the backend (Fastify + /api/* + /ws) on port 4128 and the Vite dev server on 4129. Set CLAUDE_LENS_PORT_BASE=N to shift the whole block: backend N, Vite N+1, E2E N+2, Storybook N+3. Other useful scripts: How it works - Ingest pipeline: discovers and tails your ~/.claude/projects//*.jsonl transcripts incrementally, parsing them into an in-memory store of API calls, turns, and sessions. A /ws connection pushes lightweight invalidation events so the UI refetches automatically as new activity comes in — no data over the socket, no manual refresh. - Tiered accuracy: every metric carries a 🟢 observed, 🟡 estimated, or 🔴 locked label. The default install shows 🟡 everywhere; the "Cost capture" section below explains how to unlock 🟢. - One process, one…
Details
- Repository
- foyzulkarim/claude-lens
- Language
- TypeScript
- License
- MIT
- Last updated
- 5 August 2026
- Topics
- analyticsclaudeclaude-codedashboard
FAQ
What is Claude Lens?
Local dashboard visualising Claude Code sessions, token costs, cache performance and tool calls. It is a usage for Claude Code, from foyzulkarim/claude-lens on GitHub.
How do I install Claude Lens?
Run npx @foyzulkarim/claude-lens@latest, then follow the setup in the README.
Is Claude Lens popular?
foyzulkarim/claude-lens has 253 GitHub stars and 33 forks. It was last updated on 5 August 2026.
More usage & cost trackers
tare
303kelviq/tare
Audits Claude Code session logs to explain where your usage and limits went.
Clauditor
430IyadhKhalfallah/clauditor
Stop Claude Code from burning through your quota in 20 minutes. Auto-rotates oversized sessions and preserves context.
Clawmetry
436vivekchand/clawmetry
See your agent think. Zero-config observability & governance for 30 AI agent runtimes: Claude Code, OpenAI Codex, Hermes, OpenClaw & 26 more. Live token costs, sessions, tool calls, crons.
Klaatcode
353KlaatAI/klaatcode
Open-source AI coding agent for the terminal. Claude Code-grade accuracy with smart model routing — uses the right AI model for each task, cutting costs 10x. Supports Claude, GPT, Gemini, DeepSeek & more.
OrcaReplay
295Continuum-AI-Corp/OrcaReplay
OrcaReplay — Time travel for AI agents. Record, replay, fork, and debug any agent run with any model. Built by the OrcaRouter.ai team.
CursorLens
402HamedMP/CursorLens
An open-source dashboard for Cursor.sh IDE. Log AI code generations, track usage, and control AI models (including local ones). Run locally or use upcoming hosted version.
Browse the most popular Claude Code mods, all usage & cost trackers, or the skills and MCP server directories.