npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cc-lens

v0.3.3

Published

Claude Code Lens — visualize your usage, costs, and sessions from ~/.claude/

Readme

cc-lens CLI

Claude Code Lens (cc-lens)

Local analytics dashboard for Claude Code. No cloud, no telemetry, no API key, just your ~/.claude/ data, visualized.

npx cc-lens

The CLI finds a free local port, starts the dashboard, and opens it in your browser.

Quick Start

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 You Can See

Overview

  • Sessions, messages, token usage, estimated cost, and local storage.
  • Trend cards with sparklines.
  • Date presets for 7, 30, and 90 days, plus a custom date range picker.
  • Usage over time, model distribution, peak hours, project activity, token breakdown, and recent sessions.

Projects

Projects

  • Searchable, sortable project grid.
  • Per-project cards with sessions, duration, estimated cost, languages, git branches, MCP/agent badges, and top tools.
  • Project detail pages with sessions, cost over time, language distribution, branch activity, and tool usage.

Sessions

Session replay and chat

  • Searchable session table with badges for compaction, agents, MCP, web search/fetch, and extended thinking.
  • Full session replay reconstructed from JSONL.
  • Assistant responses rendered as GitHub-flavored Markdown.
  • Tool calls and tool results shown inline.
  • File read/write/update tool results parsed into readable cards.
  • Per-turn model, duration, token breakdown, and estimated cost.
  • Compaction events shown in context with a token accumulation chart.

Costs

Costs

  • Total estimated cost, cache savings, and estimated cost without cache.
  • Cost over time and cost by project.
  • Per-model token and cost breakdown.
  • Cache efficiency panel.
  • Pricing reference from lib/pricing.ts.

Tools & Features

Tools & features

  • Tool ranking across all sessions.
  • Tool categories for file I/O, shell, agents, web, planning, todos, skills, MCP, and other calls.
  • MCP server usage details.
  • Feature adoption across sessions.
  • Tool error analysis.
  • Claude Code version history.
  • Git branch analytics.

Activity

Activity calendar

  • GitHub-style activity calendar.
  • Current streak, longest streak, active days, and most active day.
  • Usage over time, peak hours, and day-of-week patterns.
  • Activity can be derived from session JSONL when the stats cache is incomplete.

Local Claude Code Files

Todos

  • History: Search and page through ~/.claude/history.jsonl.
  • Todos: Browse todos from ~/.claude/todos/ with search and status filters.
  • Plans: Read saved plans from ~/.claude/plans/ with inline Markdown rendering.
  • Memory: Browse and edit memory files across projects, with type filters and stale detection.
  • Settings: Inspect ~/.claude/settings.json, installed skills, plugins, MCP servers, and storage usage.

Export & Import

Export

  • Export a portable .ccboard.json file containing stats, session metadata, facets, and recent command history.
  • Preview export counts before downloading.
  • Optionally filter exports by session start date.
  • Drop an export file to preview an additive merge from another machine.

Import is intentionally 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.

Navigation

Global search (Command K)

  • Global search: Cmd+K, Ctrl+K, or /.
  • Session list keyboard navigation: j / k to move, Enter to open, Esc to clear.
  • Page shortcuts: g plus a page key, for example g s for sessions, g p for projects, g c for costs.
  • Responsive layout with desktop sidebar, collapsible navigation, mobile bottom nav, and mobile menu.
  • Light and dark themes.

Multiple Claude Profiles

By default, cc-lens reads ~/.claude/. To point it at another Claude Code config directory, set CLAUDE_CONFIG_DIR:

# Default profile
npx cc-lens

# Work profile
CLAUDE_CONFIG_DIR=~/.claude-work npx cc-lens

On Windows PowerShell:

$env:CLAUDE_CONFIG_DIR="C:\Users\you\.claude-work"; npx cc-lens

The active config directory is shown in the CLI banner on launch.

Run From Source

Prerequisites

  • Node.js 18+
  • Claude Code with local data in ~/.claude/

Development

npm install
npm run dev

Open http://localhost:3000, or the port shown in your terminal.

Production Build

npm run build
npm start

Lint

npm run lint

Data Sources

cc-lens reads local Claude Code files directly:

  • ~/.claude/projects/<slug>/*.jsonl: session JSONL and replay data
  • ~/.claude/stats-cache.json: aggregate stats when available
  • ~/.claude/usage-data/session-meta/: session metadata fallback
  • ~/.claude/history.jsonl: command history
  • ~/.claude/todos/: todo files
  • ~/.claude/plans/: saved plan files
  • ~/.claude/projects/*/memory/: project memory files
  • ~/.claude/settings.json: settings, skills, plugins, and MCP config

Dashboard data refreshes every 5 seconds while the app is open.

Privacy

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.

Cost Estimates

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.

Star History