Skip to content
Back to search

cc-lens

Local analytics dashboard for Claude Code. No cloud, no telemetry.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/arindam200--cc-lens/badge.svg)](/listings/arindam200--cc-lens)

HTML

<a href="/listings/arindam200--cc-lens"><img src="/api/listings/arindam200--cc-lens/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Run directly with `npx`:

npx cc-lens

On first run, `cc-lens` prepares a small runtime cache in `~/.cc-lens/`. After that, launches are faster.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 173 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ![cc-lens CLI](./public/cc-lens.png)
  2. # Claude Code Lens (cc-lens)
  3. Local analytics dashboard for Claude Code. No cloud, no telemetry, no API key, just your `~/.claude/` data, visualized.
  4. ```bash
  5. npx cc-lens
  6. ```
  7. The CLI finds a free local port, starts the dashboard, and opens it in your browser.
  8. > [!NOTE]
  9. > **cc-lens 0.4.0 is out**
  10. >
  11. > Adds Insights, budgets, team adoption, terminal digest, Wrapped, and expanded project docs.
  12. >
  13. > [View the v0.4.0 release notes](https://github.com/Arindam200/cc-lens/releases/tag/v0.4.0)
  14. ## Quick Start
  15. Run directly with `npx`:
  16. ```bash
  17. npx cc-lens
  18. ```
  19. On first run, `cc-lens` prepares a small runtime cache in `~/.cc-lens/`. After that, launches are faster.
  20. ## What You Can See
  21. | | |
  22. | --- | --- |
  23. | <h3 align="center">Overview</h3><picture><source media="(prefers-color-scheme: dark)" srcset="./public/dashboard-dark.png" /><source media="(prefers-color-scheme: light)" srcset="./public/dashboard-white.png" /><img alt="Dashboard overview" src="./public/dashboard-dark.png" width="420" height="236" /></picture><br />Track sessions, messages, tokens, cost, storage, trends, models, peak hours, projects, and recent activity. | <h3 align="center">Sessions</h3><img alt="Session replay and chat" src="./public/session-chat.png" width="420" height="236" /><br />Search sessions, replay JSONL conversations, inspect Markdown replies, tool calls, costs, tokens, and compactions. |
  24. | <h3 align="center">Costs</h3><img alt="Costs" src="./public/costs.png" width="420" height="236" /><br />Review estimated spend, cache savings, project costs, model breakdowns, token usage, and pricing references. | <h3 align="center">Insights</h3><img alt="Insights" src="./public/insights.png" width="420" height="236" /><br />Find cache, model, compaction, plan-fit, budget, and savings opportunities from local usage patterns. |
  25. | <h3 align="center">Projects</h3><img alt="Projects" src="./public/projects.png" width="420" height="236" /><br />Browse projects by sessions, duration, spend, languages, branches, MCP usage, agents, and top tools. | <h3 align="center">Project Trends</h3><img alt="Project trends" src="./public/projects-trend.png" width="420" height="236" /><br />Analyze project sessions, spend, language mix, branch activity, model usage, tools, and activity over time. |
  26. | <h3 align="center">Tools & Features</h3><img alt="Tools and features" src="./public/tools.png" width="420" height="236" /><br />Compare tool rankings, categories, skill (slash-command) usage, MCP servers, feature adoption, errors, versions, and git branch usage. | <h3 align="center">Activity</h3><img alt="Activity calendar" src="./public/activity.png" width="420" height="236" /><br />View activity calendars, streaks, active days, peak hours, day-of-week patterns, and usage consistency. |
  27. | <h3 align="center">Tasks</h3><img alt="Tasks" src="./public/tasks.png" width="420" height="236" /><br />Browse Claude Code todos with search, status filters, task metadata, project context, and local file provenance. | <h3 align="center">Workspace</h3><img alt="Workspace" src="./public/workspace.png" width="420" height="236" /><br />Inspect workspace state, memory, settings, installed skills, plugins, MCP servers, and local storage usage. |
  28. | <h3 align="center">Wrapped</h3><img alt="Wrapped" src="./public/wrapped.png" width="420" height="236" /><br />Create a yearly card with sessions, usage, spend, favorite tools, active projects, and local highlights. | <h3 align="center">Export & Import</h3><img alt="Export" src="./public/export.png" width="420" height="236" /><br />Export portable `.cclens.json` files with stats, metadata, facets, history, previews, and date filters. |
  29. Import is preview-only right now. It shows which sessions are new or already present, but it does not write merged data back into `~/.claude/`, to avoid corrupting live Claude Code files.
  30. ## Multiple Claude Profiles
  31. By default, `cc-lens` reads `~/.claude/`. To point it at another Claude Code config directory, set `CLAUDE_CONFIG_DIR`:
  32. ```bash
  33. # Default profile
  34. npx cc-lens
  35. # Work profile
  36. CLAUDE_CONFIG_DIR=~/.claude-work npx cc-lens
  37. ```
  38. On Windows PowerShell:
  39. ```powershell
  40. $env:CLAUDE_CONFIG_DIR="C:\Users\you\.claude-work"; npx cc-lens
  41. ```
  42. The active config directory is shown in the CLI banner on launch.
  43. ## CLI Options
  44. ```bash
  45. npx cc-lens [options]
  46. ```
  47. | Option | Default | Description |
  48. | --- | --- | --- |
  49. | `--host <host>` | `127.0.0.1` | Address to bind. Loopback only by default. Set `0.0.0.0` to expose the dashboard on your LAN. Also settable with the `CC_LENS_HOST` env var. |
  50. | `--port <port>` | `3000` | Port to listen on. Auto-increments if the port is taken. Also settable with the `PORT` env var. |
  51. | `--help`, `-h` | | Print usage and exit. |
  52. | `--version`, `-v` | | Print the version and exit. |
  53. The dashboard serves your private Claude Code history, so it binds to loopback (`127.0.0.1`) by default. `cc-lens` does not read the shell's `HOSTNAME` variable, so it works the same on WSL, containers, and CI. Override the host only if you understand the exposure.
  54. ```bash
  55. # Bind to a fixed port
  56. npx cc-lens --port 4000
  57. # Expose on the local network (opt-in)
  58. npx cc-lens --host 0.0.0.0
  59. ```
  60. There are also `cc-lens push` and `cc-lens digest` subcommands for team mode; see [Team mode](./docs/TEAM.md).
  61. ## Run From Source
  62. ### Prerequisites
  63. - Node.js 20+
  64. - Claude Code with local data in `~/.claude/`
  65. ### Development
  66. ```bash
  67. npm install
  68. npm run dev
  69. ```
  70. Open [http://localhost:3000](http://localhost:3000), or the port shown in your terminal.
  71. ### Production Build
  72. ```bash
  73. npm run build
  74. npm start
  75. ```
  76. For the packaged standalone bundle used by the CLI:
  77. ```bash
  78. npm run build:dist
  79. ```
  80. ### Checks
  81. ```bash
  82. npm run lint
  83. npm test
  84. ```
  85. ## Project Docs
  86. - [Roadmap](./docs/ROADMAP.md): planned improvements and non-goals.
  87. - [Known limitations](./docs/LIMITATIONS.md): accuracy, compatibility, and runtime caveats.
  88. - [Compatibility](./docs/COMPATIBILITY.md): supported local files and reporting guidance.
  89. - [Contributing](./docs/CONTRIBUTING.md): local setup, PR expectations, and manual test notes.
  90. - [Team mode](./docs/TEAM.md): shared-folder team analytics, push hub setup, and terminal team digests.
  91. - [Privacy](./docs/PRIVACY.md): what data is read, exported, or edited.
  92. - [Security](./docs/SECURITY.md): private vulnerability reporting and review checklist.
  93. ## Data Sources
  94. `cc-lens` reads local Claude Code files directly:
  95. - `~/.claude/projects/<slug>/*.jsonl`: session JSONL and replay data
  96. - `~/.claude/stats-cache.json`: aggregate stats when available
  97. - `~/.claude/usage-data/session-meta/`: session metadata fallback
  98. - `~/.claude/history.jsonl`: command history
  99. - `~/.claude/todos/`: todo files
  100. - `~/.claude/plans/`: saved plan files
  101. - `~/.claude/projects/*/memory/`: project memory files
  102. - `~/.claude/settings.json`: settings, skills, plugins, and MCP config
  103. Dashboard data refreshes every 5 seconds while the app is open.
  104. ## Privacy
  105. Claude Code Lens runs locally and reads files from your machine. It does not require a login, API key, hosted backend, or telemetry service. Your Claude Code history stays on your computer.
  106. ## Cost Estimates
  107. Claude Code stores token counts and model identifiers, not final billing totals. `cc-lens` estimates cost using the pricing table in `lib/pricing.ts`. If provider pricing changes, update that file to keep estimates current.
  108. To override or add rates without editing source, create `~/.cc-lens/pricing.json`. Entries are merged over the defaults, so you can override a single model or add new ones. Values are in dollars per million tokens:
  109. ```json
  110. {
  111. "claude-opus-4-8": { "input": 5.0, "output": 25.0, "cacheWrite": 6.25, "cacheRead": 0.5 }
  112. }
  113. ```
  114. ## Star History
  115. <a href="https://www.star-history.com/?repos=Arindam200%2Fcc-lens&type=date&legend=top-left">
  116. <picture>
  117. <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Arindam200/cc-lens&type=date&theme=dark&legend=top-left" />
  118. <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Arindam200/cc-lens&type=date&legend=top-left" />
  119. <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Arindam200/cc-lens&type=date&legend=top-left" />
  120. </picture>
  121. </a>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.