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.
npx codelens-aiSee 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.
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.
Claude Code
~/.claude/projects/OpenAI Codex
~/.codex/sessions/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.
ROI Grade
An A–F composite score from cost-per-commit and line survival. Know instantly if your AI spend is paying off.
Cost per Commit
See exactly what each AI-assisted commit costs in tokens — priced against each provider's published API rates.
AI Code ShareNew
What percentage of all merged lines this window did the AI actually write? Measured from git history — not surveys, not vibes.
Value LeakNew
The dollars and percent of spend that never became committed code. Find the sessions burning tokens without shipping anything.
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.
Line Survival Rate
What percentage of AI-written lines survive 24 hours without being rewritten? Measure code quality, not just quantity.
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.
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.
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.
Token Analytics
Deep token breakdown: efficiency rate, tokens per commit, cache savings, input vs output. Know where every token goes.
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.
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 session │ today $12.40 · 3 commits │ burn 2.6K/min │ 5h 84%Privacy First
All data stays on your machine. Zero telemetry, zero cloud. Reads only local session files and git history.
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
npx codelens-ai reportFrom terminal to insight in seconds
Three steps. Zero configuration. Complete visibility.
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.
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.
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.
What is your cost per commit?
Drag the sliders — this is the same effective-cost math codelens-ai runs on your real session data.
You're extracting ~3.5× your subscription in API-equivalent value.
npx codelens-aiGet 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.”
Up and running in seconds
One command. No config files. No API keys. No setup.
Reads ~/.claude/projects/ and ~/.codex/sessions/ — no keys, no config.
Previously claude-roi — same tool, new name
Or install globally:
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 MCPCLI 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 stdoutQuestions, 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