β release · OSS (MIT)

Know your AI coding budget — before month-end.

A local-only CLI that parses your Claude Code session logsand visualizes cost, tokens, and tool usage in one command.

koji-lens summary --since 30d
$ koji-lens summary --since 30d
koji-lens — analyzed 412 sessions
period: last 30d
==============================
TOTAL
sessions: 412
cost: $874.12
models: claude-opus-4-7×1562, claude-sonnet-4-6×60
note: API-rate equivalent
$npm install -g @kojihq/lens
  • 01How much did Claude Code cost you this month?
  • 02What was your biggest cost day, and what were you building?
  • 03Which tool calls are burning the most tokens?

koji-lens parses the Claude Code session logs stored locally on your machine and visualizes how you actually use AI coding — in a single command.

Two ways to use it

Two different pictures of the same command — depending on how you pay for Claude Code.

Claude Pro / Max subscriber

See what your $20 / $200 subscription is really worth.

You pay a flat $20/month for Pro (or $200 for Max). But are you using it like a $20 subscription, or like a $500 one? Anthropic doesn't show the answer anywhere.

$ koji-lens summary --since 30d
TOTAL
cost: $874.12 (API-equivalent)
models: claude-opus-4-7×1562, claude-sonnet-4-6×60
note: API-rate equivalent.
Subscribers pay a flat fee regardless.

That $874.12 is what 30 days of usage would have cost on the API. If you're a $20/month Pro user, you just got 40× your subscription back. That's information you can't get from the Claude Code dashboard or the Anthropic Console — only from your local logs.

API token-based user

Catch overspend before month-end.

You pay per token via the API. You suspect Claude Code is burning through Opus on tasks Sonnet could handle, but you want numbers, not hunches.

$ koji-lens summary --since 7d
TOTAL
cost: $187.45
cost by model:
claude-opus-4-7 $173.21 (92%)
claude-sonnet-4-6 $14.24 ( 8%)

Now you have evidence: 92% of your spend is Opus. Switch the easy turns to Sonnet, run the same command next week, and see the difference — improvement based on numbers, not intuition.

What you'll see in the first minute

One terminal command to grasp how your AI coding actually plays out.

How much you spent this month

Per-session cost in USD with a TOTAL aggregate. Reconciles cleanly against your end-of-month Anthropic bill.

Which work cost you the most

Cost trends over the last 7 / 30 days plus tool call distribution. Drill into outlier sessions in one click.

Always-visible state via statusline

First-class Claude Code statusLine integration. Spend trend (💚/💛/🚨), cache hit rate (💎), and agent state (⚡/💤/🛑) on a single line. Co-display with ccusage via one `--combined` flag.

A koji mascot fermenting in your statusline

Opt-in `--buddy` adds a koji-themed companion. Levels 1-10 by total session count (~3 years to Max), 50 sayings across 5 states. `--buddy-only` for a buddy-only display.

Your data stays on your machine, always

No cloud uploads. Prompt bodies are never written to SQLite. Safe to analyze your full log history.

Runs on Windows / macOS / Linux

Node.js 22+ CLI with built-in `koji-lens hook` (no per-OS shell scripts needed). `--buddy-locale en` switches sayings to English.

How koji-lens compares to /usage and ccusage

Comparison against the Claude Code /usage command, Anthropic Console, and the popular OSS tool ccusage.

→ Scroll horizontally

ItemOfficial (/usage / Anthropic Console)koji-lens
Time range aggregation24h / week (fixed)--since with 24h / 7d / 30d / arbitrary ISO date
Cross-cut by project / model / tool / subagent✓ (aggregates by path, model, tool name, parent-child structure)
Cost visibility for subscribersUsage only, no cost numbersShows API-equivalent cost as reference (with note)
Local-only (no data leaves your machine)Console / dashboard goes through the cloud✓ (parses JSONL locally, Free tier permanent)
Relationship with ccusageReads the same JSONL files. ccusage users don't need to import — full history is visible from day one. Co-display via `--combined` flag
JSON export / shell pipelining--format json / --summary-only / koji-lens export (CSV / JSON)
Statusline integration + koji mascot`koji-lens statusline` for a one-line view, `--buddy` for the Lv1-10 evolving koji mascot, `--combined` to co-display with ccusage

The official /usage ships in v2.1.105+. Anthropic Console shows monthly billed totals for API users. ccusage is a popular OSS tool for token / cost aggregation (13k+ stars). koji-lens reads the same JSONL files, so you can run both side by side without any data migration.

Drill down to individual sessions

koji-lens sessions lists individual sessions so you can spot outliers instantly. The same data is also viewable in the browser.

koji-lens sessions --since 24h --limit 5
$ koji-lens sessions --since 24h --limit 5
055a662d-... 8m 58s $9.63
44c29745-... 1h 7m 33s $32.75
28cf16fa-... 7h 38m 22s $420.66 ← outlier
agent-a94b... 1m 9s $0.29 ↳ subagent
22a919c7-... 12m 4s $20.7381
... (10 more)
# To see charts:
$ koji-lens serve
→ http://localhost:3210

The same data, in a browser.

Run koji-lens serve to launch a local web dashboard. The full picture in one screen, with charts and aggregate numbers.

http://localhost:3210
koji-lens web dashboard — total cost, KPI cards, per-session cost and tool usage charts in a single view
Screenshot from real data (last 30 sessions aggregated)

Get started in 3 steps

If you're already using Claude Code, it works out of the box — no extra setup.

  1. 1Install
    $npm install -g @kojihq/lens
  2. 2See your session summary
    $koji-lens summary
  3. 3Launch the dashboard
    $koji-lens serve

Know your AI coding budget — before month-end. And know it across all your machines.

Pricing

Pro plan launches in late May 2026.

If any of these sound familiar, Pro is for you

  • You don't know your cost until the Anthropic bill arrives
  • You can't see which project is eating your budget
  • Logs are scattered across multiple machines you use

→ Pro syncs all your machines into one timeline, tracks before/after deltas when you change your setup (e.g. Opus → Sonnet), and delivers monthly reports with real usage. Budget alerts included.(Launching late May 2026)

Sign up for launch notification

Free $0 · Pro Monthly $7 · Pro Annual $70

Free
$0
  • All local CLI features
  • Local web dashboard
  • Full Claude Code log support
Recommended
Pro Monthly
$7/month
  • All your machines in one timeline (multi-device sync)
  • Cloud sync (unlimited history)
  • CSV / JSON export
  • Weekly / monthly reports
Pro Annual
$70/year
~17% off vs monthly
  • Everything in Pro Monthly
  • Annual billing discount
Early access notification

Free is live now. Pro launches May 26.

Install the Free CLI today (jump to install) — it's the full thing, no waitlist needed. Or drop your email below and we'll send you an early-access notice when Pro ($7/month, $70/year) launches.

We'll only use your email for launch notifications. You can unsubscribe at any time.