Skip to content

Add agent-bill to Monitoring & Analytics - #241

Open
yange0793-dot wants to merge 1 commit into
RoggeOhta:mainfrom
yange0793-dot:add-agent-bill
Open

Add agent-bill to Monitoring & Analytics#241
yange0793-dot wants to merge 1 commit into
RoggeOhta:mainfrom
yange0793-dot:add-agent-bill

Conversation

@yange0793-dot

Copy link
Copy Markdown

What

agent-bill — a zero-dependency Node CLI that turns local Claude Code + Codex session logs into a token & cost bill: breakdowns by model / day / project, a per-session ranking (--sessions), and a self-contained dark-theme HTML report (--html).

Why it belongs here (quality standards)

  • Directly related to Codex CLI: parses ~/.codex/sessions/** natively (incremental last_token_usage accumulation, which handles the mid-session resets of total_token_usage) alongside ~/.claude/projects/** — both tools in one report.
  • Clear unique value vs. existing entries (ccusage, tokscale, abtop): the two tools define cached tokens in opposite ways — Codex's input_tokens includes cache hits (subset semantics), Claude Code's input_tokens excludes them (separate counters). agent-bill normalizes both into non-cached / cache-read / cache-write at the parser layer, pinned by tests, so cost estimates aren't silently wrong for one of the two tools. It also never prices unrecognized models — tokens are counted, the model is named in the report, no invented costs.
  • Zero npm dependencies, zero network requests — reads local JSONL files, prints a report; auditable in one sitting.
  • Actively maintained: v0.4.1 released today, CI on every push, MIT.
npx github:yange0793-dot/agent-bill

One entry, no other lists cross-posted in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant