Codelens AI
Local-first ROI analytics for Claude Code, OpenAI Codex, and GitHub Copilot
Install
claude mcp add codelens -- npx -y codelens-ai mcpInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →Codelens AI
Agent Productivity-to-Cost Correlator — Is your AI coding agent actually shipping code?
Codelens AI ties AI coding agent token usage to actual git output. It reads your local Claude Code, OpenAI Codex CLI, and GitHub Copilot session files (standalone CLI plus VS Code Chat/agent mode), correlates them with git commits, and serves a dashboard answering: "Am I getting ROI from my AI coding agents?" When more than one agent has sessions, the dashboard adds All Agents / Claude Code / OpenAI Codex / GitHub Copilot tabs so you can compare them side by side.
- One command, zero config
- All data stays local
- Supports Claude Code, OpenAI Codex CLI, and GitHub Copilot CLI + VS Code in one dashboard
- Works with any git repo where you've used any of these agents
Installation
Previously published as
claude-roi. That package is deprecated — usenpx codelens-aigoing forward. Theclaude-roicommand still works as a backward-compatible alias.
Option 1: Run directly (no install)
npx codelens-ai
Option 2: Install globally
# npm
npm install -g codelens-ai
# pnpm
pnpm add -g codelens-ai
# yarn
yarn global add codelens-ai
Then run anywhere:
codelens-ai
Option 3: Clone and run from source
git clone https://github.com/Akshat2634/Codelens-AI.git
cd Codelens-AI
# Install dependencies (pick one)
npm install
# or
pnpm install
# or
yarn install
# Run it
node src/index.js
Troubleshooting: npx codelens-ai runs an old version
npx codelens-ai (no version pin) can resolve to an old copy instead of the
latest release — either a stale entry in npx's local cache, or a global
install already on your $PATH that npx reuses without checking the
registry. Old enough versions predate whole subcommands, so you'll see a
confusing error like:
error: too many arguments. Expected 0 arguments but got 1.
Every current release prints an "Update available" hint when this happens, but if you're stuck on a version from before that check existed, fix it with one of:
npx codelens-ai@latest report # pin the version explicitly
npm uninstall -g codelens-ai # remove a shadowing global install
# or
npm install -g codelens-ai@latest # ...or just update it
Prerequisites
- Node.js >= 22.12 — Download (Node >= 22.15 to also read Codex's zstd-compressed archive rollouts)
- Git — installed and configured with
user.nameanduser.email - At least one supported agent with local session data:
- Claude Code — Claude Code sessions at
~/.claude/projects/ - OpenAI Codex CLI — Codex sessions at
~/.codex/sessions/($CODEX_HOMEis honored) - GitHub Copilot — Copilot CLI sessions at
~/.copilot/session-state/($COPILOT_HOMEis honored), and official GitHub Copilot Chat/agent sessions in VS Code's localworkspaceStorage/
- Claude Code — Claude Code sessions at
Quick Start
npx codelens-ai
This parses your ~/.claude/projects/, ~/.codex/sessions/, ~/.copilot/session-state/, and VS Code workspace-session data, analyzes your git repos, and opens a dashboard at http://localhost:3457.
What It Measures
Similar plugs
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…
Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Production-grade engineering skills for AI coding agents.
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…