New in v0.9 — MCP server, billing blocks & statusline

Stop guessing.
Start measuring.

The open-source ROI dashboard that ties your Claude Code and OpenAI Codex token spend to actual git output — one command, all local.

~ terminal
$
$npx codelens-ai
Product Demo

See exactly where your tokens go

A local-first dashboard that breaks every dollar of your Claude Code and Codex spend into auditable, per-agent insights.

Live product demo · tap the speaker to unmute
$0.00
Avg Cost / Commit
0%
AI Code Share
0%
Line Survival Rate
0%
Token Efficiency
0
Commits Shipped
0.0×
Plan Value Extracted
Multi-Agent

Two agents. One dashboard.

CodelensAI reads both your Claude Code and OpenAI Codex sessions. When both are present, switch tabs to compare them side by side — every metric recomputes for the selected agent.

All AgentsClaude CodeOpenAI Codex
$350.82
Total spend
179
Commits shipped
$1.96
Cost / commit

Claude Code

Opus · Sonnet · Haiku
$243.75
spend
104
commits
$2.34
/ commit
~/.claude/projects/

OpenAI Codex

GPT-5.x Codex · GPT-5.x
$107.07
spend
75
commits
$1.43
/ commit
~/.codex/sessions/
Key Features

Everything you need to quantify your AI investment

From per-agent ROI grades to token-level analytics — complete, auditable visibility into your Claude Code and Codex spend.

Multi-Agent Dashboard

Claude Code and OpenAI Codex in one place. When both have sessions, switch between All Agents, Claude Code, and OpenAI Codex tabs — every metric recomputes so you can compare them side by side.

All AgentsClaude CodeOpenAI Codex
Claude Code$243.75104 commits
OpenAI Codex$107.0775 commits

ROI Grade

An A–F composite score from cost-per-commit and line survival. Know instantly if your AI spend is paying off.

A

Cost per Commit

See exactly what each AI-assisted commit costs in tokens — priced against each provider's published API rates.

Today
$0.00
Week
$120.41
Month
$350.82

AI Code ShareNew

What percentage of all merged lines this window did the AI actually write? Measured from git history — not surveys, not vibes.

AI-written 64%Human 36%

Value LeakNew

The dollars and percent of spend that never became committed code. Find the sessions burning tokens without shipping anything.

7%
of spend leaked
$24.56 that never
became a commit

Model Comparison

Compare cost and efficiency across Opus, Sonnet, Haiku, GPT-5.x Codex, and more. New model IDs are auto-priced from LiteLLM's public price map — no code change needed.

Opus 4.8
$158
GPT-5 Codex
$107
Sonnet
$79

Line Survival Rate

What percentage of AI-written lines survive 24 hours without being rewritten? Measure code quality, not just quantity.

90%
of AI lines survive 24h

Effective Cost

On a flat plan? Pass --plan / --codex-plan to reframe spend against the fee you actually pay: effective $/commit, $/surviving line, and how many times over you've earned back your subscription.

2.9×
plan value extracted
$0.67
effective / commit
$0.028
/ surviving line

Attribution & Coverage

Every commit gets a high / medium / low confidence score from file overlap and timing — and Co-authored-by agent trailers confirm attribution as near-ground-truth. Auditable, not a black box.

High 11%Medium 79%Organic 10%

Productivity Heatmap

A GitHub-style hour-by-day grid of when your AI-assisted commits land. Discover your most productive coding hours.

Agent Autonomy

An A–F autonomy grade blending autopilot ratio (actions per prompt), self-heal score (test/lint usage), toolbelt coverage, and commit velocity. See how independently your agent really works.

A
Autopilot Ratio
2.34x
Self-Heal Score
100%
Toolbelt Coverage
23%
Commit Velocity
2

Token Analytics

Deep token breakdown: efficiency rate, tokens per commit, cache savings, input vs output. Know where every token goes.

Input 18%Output 82%

Session Analysis

Spot orphaned sessions — 10+ messages that produced zero commits — plus per-repo project ROI and a sortable table of every session with its matched commits.

4%
sessions orphaned

Reports & StatuslineNew

codelens-ai report prints an ROI scorecard — or exports a self-contained Markdown/HTML one-pager. Add the live statusline to Claude Code for an always-on ROI HUD.

$4.20 sessiontoday $12.40 · 3 commitsburn 2.6K/min5h 84%

Privacy First

All data stays on your machine. Zero telemetry, zero cloud. Reads only local session files and git history.

All data stays on your machine
New · CLI Toolkit

Way more than a dashboard

ROI reports, ccusage-style usage tables, 5-hour billing blocks, a live Claude Code statusline, and an MCP server — all in the same zero-config command.

ROI scorecard — terminal, Markdown, or HTML

~ codelens-ai report
$npx codelens-ai report
CodelensAI · ROI Report — last 30 days
─────────────────────────────────────────
ROI Grade A
Spend (API-equiv) $350.82
Commits shipped 179 · $1.96/commit
AI code share 64% of merged lines
Line survival (24h) 90%
Value leak 7% ($24.56) never committed
Plan utilization 2.9× your subscription
 
→ add --md or --html for a one-pager your manager can read
How It Works

From terminal to insight in seconds

Three steps. Zero configuration. Complete visibility.

01

Install & Run

Run npx codelens-ai in any git repo where you've used Claude Code or OpenAI Codex. No config files, no API keys, no setup required.

02

Analyze

CodelensAI reads your local Claude Code and Codex session files and correlates them with your git history by file overlap, timing, and Co-authored-by trailers — every commit is attributed to at most one session.

03

Optimize

Get an interactive dashboard with per-agent tabs, ROI grade, cost-per-commit, AI code share, value leak, and effective cost vs your plan — the insights to cut wasted spend.

Try The Math

What is your cost per commit?

Drag the sliders — this is the same effective-cost math codelens-ai runs on your real session data.

$350
180
Your subscription
$1.94
API-equiv / commit
$0.56
effective / commit
A
ROI grade
3.5× plan utilization

You're extracting ~3.5× your subscription in API-equivalent value.

$npx codelens-ai

Get your real numbers — measured from your actual sessions and git history.

“I was spending hundreds on Claude Code and Codex with no idea if it was worth it. CodelensAI answers that in one command — in my dashboard, my terminal, my statusline, and now even in-chat over MCP.”
Akshat Sahu
Creator of CodelensAI
0+
Weekly Downloads
v0.9.11
Current Version
0+
Releases Shipped
MIT
Open Source License
Get Started

Up and running in seconds

One command. No config files. No API keys. No setup.

~ terminal
$npx codelens-ai

Reads ~/.claude/projects/ and ~/.codex/sessions/ — no keys, no config.

Previously claude-roi — same tool, new name

Or install globally:

npmnpm install -g codelens-ai
pnpmpnpm add -g codelens-ai
yarnyarn global add codelens-ai

Then level up:

$ npx codelens-ai statusline --installAdd the live ROI statusline to Claude Code
$ claude mcp add codelens -- npx -y codelens-ai mcpLet Claude query your usage & ROI in-chat via MCP

CLI Options

--source codexAnalyze a single agent: claude | codex | all
--plan max20Claude subscription mode — effective $/commit vs your flat plan
--codex-plan plusChatGPT/Codex subscription mode: free … pro
--days 90Look back 90 days (default: 30)
--project techopsFilter to a specific project / repo
--offlineSkip the network pricing refresh — fully offline analysis
--jsonOutput all metrics as JSON to stdout
FAQ

Questions, answered

CodelensAI is a free, open-source CLI that measures your AI coding ROI. It correlates Claude Code and OpenAI Codex token spend with your actual git output — commits shipped, cost per commit, AI code share, line survival — and serves a local dashboard, terminal reports, and an MCP server. One command: npx codelens-ai.

CodelensAI is free and open source.

Built by developers, for developers.

MIT Licensed · 33+ releases · Claude Code + OpenAI Codex · MCP built in