cc-lens CLI
Claude Code Lens (cc-lens)
Local Claude Code analytics: a dashboard of sessions, tokens, cost and projects from your ~/.claude data, no cloud
- 601 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads local data and session conversations from the Claude Code directory
- Starts a local web server that a flag can expose to the whole network
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/claude-code-lens-cc-lensDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads local data and session conversations from the Claude Code directory
- Starts a local web server that a flag can expose to the whole network
This is third-party code. Review the repository files before installing.
What it does
cc-lens starts a local dashboard that reads Claude Code data from the ~/.claude directory and shows it in the browser. The command finds a free port, starts a server and opens the page. The dashboard shows sessions, messages, tokens and estimated cost, breakdowns by project, model, tool and MCP server, an activity calendar and peak hours. You can replay session conversations from JSONL, inspect tool calls and context compactions. There is export to a cclens.json file; import is preview-only for now and does not write anything back.
Who it is for. For developers and founders who want to see how and where Claude Code is spent.
Good fit when
- You want to understand Claude Code cost and tokens per session
- You want a breakdown by project, model and tool
- You want to replay and inspect a past session
Not a fit when
- You do not use Claude Code and there is no ~/.claude directory
- You need shared cloud analytics for a team
Example request
Start the local dashboard and show project costs for the last monthLimitations
Cost figures are an estimate from usage data, not an exact bill. By default the server binds to the loopback address only; exposing it to the LAN is a flag. Import runs in preview mode and does not merge data into the live Claude Code directory, to avoid corrupting files.
How to disable. Stop the cc-lens process. No permanent install is required; optionally remove the ~/.cc-lens cache.
FAQ
Does the data leave my machine?
No, cc-lens reads only the local ~/.claude directory and runs without cloud, telemetry or keys.
How do I view a second Claude Code profile?
Set the CLAUDE_CONFIG_DIR variable to the target directory before launching.
Discussion
No questions or reviews yet.
Related
CLI toolsTerminal manager for Claude Code sessions: live status per session, token cost by model and project, and summaries saved on exit.
A local dashboard over the .claude folder shows where Claude Code context goes and draws the chain of subagent calls over time.
claudetop shows session cost, cache hit rate, plan limit windows and overspend alerts in the Claude Code status line
A Python CLI that turns Claude Code JSONL transcripts into readable HTML and Markdown with search, filters and a timeline.
A Claude Code plugin: a status line with context, 5-hour and 7-day limits, cost and usage of Codex, Gemini and z.ai
Token and cost reports for Claude Code, Codex, Gemini CLI and other agents from local logs, by day, month and session
README in short
The README describes a local analytics dashboard for Claude Code that reads the ~/.claude directory and shows stats in the browser. It launches with npx cc-lens; the server finds a port and opens the page itself. The dashboard covers sessions, cost, tokens, projects, models, tools, MCP, activity and a Wrapped section. There is export to cclens.json and preview import. Profile selection via CLAUDE_CONFIG_DIR and host and port flags are supported. MIT licensed.