New
Apps 6,355Makers 6,334This week 13
Promote your app−30%
7views in
the last 30 days

Burnlog

Private leaderboard for AI token burn — CLI parses Claude Code logs, Next.js serves the board

Built with Claude Code/Kiro/Junie / JetBrains AI

by sharziki · Unclaimed · added Oct 29, 2026
no ratings0 comments

The public leaderboard for AI coding token usage — burnlog.net. A SXNA Labs product.

┌──────────────┐                                          ┌───────────┐
│  burnlog CLI │──┐                                       │           │
│  (log reader)│  │                                       │           │
└──────────────┘  │                                       │           │
                  │                                       │           │
┌──────────────┐  │    POST /api/ingest (bearer key)      │  web API  │
│ @sxnalabs/   │  ├──────────────────────────────────────▶│  (Next.js)│
│ burnlog-sdk  │  │                                       │           │
│ (in-agent)   │  │                                       │           │
└──────────────┘  │                                       │           │
                  │                                       │           │
┌──────────────┐  │                                       │           │
│ @sxnalabs/   │  │    GET /api/me/*  (bearer key)        │           │
│ burnlog-mcp  │──┘◀──────────────────────────────────────│           │
│ (readback)   │                                          └─────┬─────┘
└──────────────┘                                                │
                                                                ▼
                                                          ┌───────────┐
                                                          │ Postgres  │
                                                          └───────────┘

What it is

burnlog tracks every token you push through AI coding agents (Claude Code, Codex, custom agents, …) across all your projects, and ranks you against anyone else plugged in. Tokens only — never prompts, filenames, or working directories. See the privacy model for exactly what we do and don't store, and the security posture for deployment and control details.

Which agents: Claude Code · Codex · Cursor · Gemini CLI · aider · opencode — each page says what burnlog measures, how, and what it can't see.

Comparisons: vs ccusage · vs viberank · vs CCgather.

Start here

npx @sxnalabs/burnlog

Or don't open a terminal at all. Paste this at Claude Code, Cursor, Codex, Copilot, Windsurf, Gemini CLI, opencode, aider — anything that can fetch a URL:

Set up burnlog for me — the public leaderboard for AI coding token usage.

Fetch https://burnlog.net/agent-setup.md and follow it top to bottom. It is written to be executed, not summarised.

Rules: show me my own totals before any account exists, ask me before anything is published, and never upload prompts, code, file names, or repo names — token counts only.

burnlog.net/agent is that prompt with a copy button and a picker for your agent — it adds one line about burnlog wrap for the tools that keep no usage log.

The file it fetches is written for an agent to execute: the commands in order, what to ask before anything is published, and what it must never upload.

That's the whole thing. It finds your agents, shows you your own numbers before asking for anything, signs you in through the browser, uploads, and offers to auto-sync from then on. No config file, no account-first wall.

Two ways to plug in

Pick whichever matches how your tokens are produced — most people need one, and both ship in the same package.

You have… Use Package
Claude Code, Codex, opencode, or similar CLI CLI @sxnalabs/burnlog
Any other tool, or one that keeps no usage log wrap @sxnalabs/burnlog

An in-agent SDK (sdk/) and an MCP server for asking your agent about your own rank (mcp/) ship alongside it as @sxnalabs/burnlog-sdk and @sxnalabs/burnlog-mcp. Most people need neither.

CLI — for agents that write logs to disk

npm install -g @sxnalabs/burnlog
burnlog                      # scan, sign in, sync, install the hook
burnlog install              # auto-sync on every Claude Code session end

Reads ~/.claude/projects/*/*.jsonl, ~/.codex/sessions/**/*.jsonl, ~/.local/share/opencode/storage/message/**/*.json, etc. Nothing besides token counts leaves your machine. Run burnlog sync any time, or burnlog daemon for a background watcher. See cli/README.

wrap — for everything that doesn't write a usage log

Cursor, Gemini CLI, aider, your own scripts: plenty of tools never write token counts to disk. wrap counts them at the wire instead.

burnlog wrap -- aider
burnlog wrap -- python my_agent.py
burnlog wrap --only anthropic,openai -- npm run agent
burnlog wrap --list          # every provider it knows

It runs your command with the usual base-URL environment variables (ANTHROPIC_BASE_URL, OPENAI_BASE_URL, GOOGLE_GEMINI_BASE_URL, …) pointed at a loopback proxy, forwards each request upstream untouched, and reads the usage block out of the response — streaming or not.

Covers Anthropic, OpenAI, Google, Mistral, Cohere, OpenRouter, Groq, xAI, DeepSeek, Together, Fireworks, Perplexity, Cerebras, and Ollama. Anything else speaking an OpenAI-compatible API works through OPENAI_BASE_URL.

No certificates involved. burnlog deliberately does not MITM your HTTPS traffic — no local CA to install or trust. The request body is never inspected beyond reading model when the response doesn't name it.

Events land in ~/.burnlog/events/*.jsonl first, so a wrapped command keeps counting with no network and no API key. burnlog sync uploads them later. That file is also the open extension point — append a line from any language and it syncs:

burnlog log 42000 --model claude-opus-4-6 --source my-batch-job

SDK — for your own agents

npm install @sxnalabs/burnlog-sdk
import { Burnlog } from "@sxnalabs/burnlog-sdk";

const burnlog = new Burnlog({
  apiKey: process.env.BURNLOG_API_KEY!,
  source: "my-agent",
});

const res = await anthropic.messages.create({ /* ... */ });
burnlog.trackAnthropic(res);   // batches + flushes in the background

Zero runtime dependencies. track() never throws. See sdk/README.

MCP — query your rank from inside an agent

Drop this into ~/.claude.json (Claude Code) or .cursor/mcp.json:

{
  "mcpServers": {
    "burnlog": {
      "command": "npx",
      "args": ["-y", "@sxnalabs/burnlog-mcp"],
      "env": { "BURNLOG_API_KEY": "blg_your_key_here" }
    }
  }
}

Then ask your agent "what's my rank", "which team is over budget", "who's top of the leaderboard", or "start a weekend sprint against @kai". Tools: get_my_rank, get_my_stats, get_my_clubs, get_leaderboard, find_user, list_orgs, join_org, get_my_challenges, create_challenge, join_challenge. See mcp/README.

Challenges

A challenge is a window plus a scoring rule. Nothing is written per burn event, so standings can never disagree with the leaderboard and a challenge costs nothing to run. They settle themselves the first time anyone loads the page after the clock runs out — no cron, no queue.

burnlog challenge new "Weekend Sprint" --type sprint --days 3
burnlog challenge join <code>
burnlog challenge                      # live standings in the terminal
Type Metric Wins Durations
sprint tokens burned highest 3/7/14/30d
efficiency tokens per call (20+ calls) lowest 7/14d
provider % of burn on one provider highest 7/14d
streak consecutive burn days highest 14/30/60d
cost-cap calls under a token budget highest 7/14d

Every challenge has a shareable link at /c/<code> with a live countdown, an OG card, and a rematch button that carries the roster over.

Achievements

Thirteen unlockables, from First Burn to Billion Club, shown as a trophy case on every profile. They're recomputed from BurnEvent rather than counted incrementally, so they can't drift, and adding a new one to web/src/lib/achievements.ts backfills it for everybody automatically.

Embeds

![burnlog](https://burnlog.net/badge/<username)
<script src="https://burnlog.net/widget.js" data-user="<username>"></script>

The badge is an SVG in the shields.io house style; the widget is a dependency-free card (~4KB) with a 7-day sparkline that works on any site, light or dark. Profile and challenge links unfurl into generated OG cards on X, Slack, Discord, and iMessage.

Team budget API

Use the same API key from /settings to pull team usage into internal dashboards, CI, or finance checks:

curl -H "Authorization: Bearer $BURNLOG_API_KEY" \
  https://burnlog.net/api/me/clubs

Returns joined teams, member totals, 7-day and month-to-date burn, monthly token budget, budget percentage used, and ok / warning / over status.

Team owners can generate a team API key from a club page. Events sent with that key are attributed to the team budget as shared service/CI usage instead of personal CLI usage. Each plan caps active team keys; revoke old keys before minting replacements. Label keys by system, for example github-actions, cursor-agent, or prod-ci, so rotation is obvious later. Optionally set a monthly token cap per team API key; ingest rejects with api_key_budget_exceeded when that key would cross its cap. Owners can see month-to-date usage for each team key beside the cap.

Use the CLI as a CI budget gate:

BURNLOG_API_KEY=$BURNLOG_API_KEY burnlog budget --fail-on-over --json
BURNLOG_API_KEY=$BURNLOG_API_KEY burnlog budget --club sxna-ai-platform --fail-on-warning
BURNLOG_API_KEY=$BURNLOG_API_KEY burnlog report --club sxna-ai-platform --from 2026-06-01 --to 2026-06-30 --out burnlog.csv

Use a team API key in CI when the gate should only check that one team. User API keys check every team the user has joined. With a team API key, burnlog report can omit --club.

Plans set product caps without wiring billing yet:

Plan Members Team API keys
free 5 2
team 25 10
enterprise 500 50

After a paid pilot or invoice, admins can upgrade a team:

curl -X PATCH -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  -H "content-type: application/json" \
  -d '{"plan":"team"}' \
  https://burnlog.net/api/clubs/<club-id>/plan

If the club owner has a matching team lead email, paid plan upgrades mark that lead won; paid-to-free downgrades mark it lost. Status changes are written into club audit metadata. Plan changes that would put existing seats or team API keys over the target plan return plan_limit_conflict; resend with "force": true to override. Forced overrides, current counts, and target limits are recorded in audit metadata.

Owners and admins can inspect the last 100 sensitive team changes:

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  https://burnlog.net/api/clubs/<club-id>/audit

Audit events cover plan changes, budget/privacy/webhook changes, and team API key create/revoke actions.

Team owners can also set an HTTPS budget webhook on the club page. burnlog POSTs JSON when the monthly budget crosses 80% or 100%:

{
  "type": "club_budget",
  "clubName": "Platform",
  "threshold": 80,
  "usedTokens": 4200000,
  "budgetTokens": 5000000,
  "percentUsed": 84
}

Set BURNLOG_WEBHOOK_SECRET to sign webhook bodies. Receivers verify x-burnlog-signature by computing HMAC-SHA256 over x-burnlog-timestamp + "." + rawBody:

createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex")

After saving a webhook URL, owners can send a test payload from the club page. The same path is available as POST /api/clubs/<club-id>/webhook/test. Owners can also enable hard budget guard on the club page. When enabled, team API key ingest is rejected with budget_exceeded once the current request would push month-to-date usage over the monthly budget.

Team members can export club usage as CSV from the club page. Add from and to dates when finance needs a billing period:

curl -b "$AUTH_COOKIE" \
  "https://burnlog.net/api/clubs/<club-id>/report?from=2026-06-01&to=2026-06-30"

curl -H "Authorization: Bearer $BURNLOG_API_KEY" \
  "https://burnlog.net/api/clubs/<club-id>/report?from=2026-06-01&to=2026-06-30"

CSV includes weekly_tokens and mtd_tokens; mtd_tokens is calendar month-to-date in UTC, matching monthly budget alerts. Team-key service usage is split by API key label for new ingested events; older service events without a stored key id appear as Team API keys.

Estimated spend defaults to $0.00001 per token. Set BURNLOG_DOLLARS_PER_TOKEN for CSV exports and NEXT_PUBLIC_BURNLOG_DOLLARS_PER_TOKEN for browser estimates when your internal blended rate is different.

Team pilots

/teams has a small intake form for companies that want private workspaces, team API keys, budget alerts, or reports. Leads are stored in Postgres and can be exported as CSV with an admin token:

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  https://burnlog.net/api/team-leads > team-leads.csv

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  "https://burnlog.net/api/team-leads?format=json&status=qualified"

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  "https://burnlog.net/api/team-leads?format=json&source=linkedin"

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  https://burnlog.net/api/admin/summary

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  "https://burnlog.net/api/admin/clubs?plan=team"

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  "https://burnlog.net/api/admin/clubs?plan=team&format=csv" > team-accounts.csv

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  "https://burnlog.net/api/admin/clubs?plan=team&format=csv&from=2026-06-01&to=2026-06-30" > june-team-accounts.csv

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  "https://burnlog.net/api/admin/clubs?overLimit=true&format=csv" > over-limit-accounts.csv

curl -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  "https://burnlog.net/api/admin/clubs?budgetRisk=true&format=csv" > budget-risk-accounts.csv

curl -X PATCH -H "Authorization: Bearer $BURNLOG_ADMIN_TOKEN" \
  -H "content-type: application/json" \
  -d '{"email":"buyer@example.com","status":"qualified","adminNotes":"Security review next"}' \
  https://burnlog.net/api/team-leads

Set BURNLOG_ADMIN_TOKEN in production. Leave it blank to disable export. Operators can also open /admin and enter the same token on a trusted machine to triage leads, review account risk, pick invoice periods, export CSVs, and apply plan changes. The admin UI can filter account reloads and exports by plan, filter lead reloads/exports by status or source, and forget the stored token after use. Lead statuses: new, contacted, qualified, pilot, won, lost. The teams form stores utm_source or ref as lead source; otherwise it uses teams_page. Admin summary includes lead counts by status/source, plan counts, over-limit account count, forced plan override count/recent list, MTD tokens, and estimated MRR from known Team seats. Admin club list returns owner emails, seat counts, team key counts, matching lead status/notes by owner email, billing-period tokens/spend, budget percent/status, and per-club estimated MRR. It also flags accounts over current plan limits after forced changes. Use from / to for invoice periods; default is UTC month-to-date. Enterprise revenue is custom and not estimated.

Self-host the web app

git clone https://github.com/sharziki/burnlog
cd burnlog
cp web/.env.example web/.env
# fill in AUTH_SECRET, AUTH_GITHUB_ID, AUTH_GITHUB_SECRET
docker compose up -d

Open http://localhost:3000. Point any of the three surfaces at it by setting BURNLOG_API_URL=http://localhost:3000 (or baseUrl for the SDK).

Health check:

curl http://localhost:3000/api/health

Returns 200 when the web app can reach Postgres, 503 when the database is down. Docker images and compose files use this endpoint for web health.

Repo layout

burnlog/
├── web/      Next.js 15 + Prisma + NextAuth GitHub + Postgres
├── cli/      @sxnalabs/burnlog  — multi-adapter log reader
├── sdk/      @sxnalabs/burnlog-sdk  — in-agent tracker, zero deps
├── mcp/      @sxnalabs/burnlog-mcp  — MCP server for readback
└── .github/  CI + per-package release workflows

Ranks

Rank Tokens
Spark 0 – 100K
Ember 100K – 500K
Blaze 500K – 2M
Inferno 2M – 10M
Supernova 10M+

How token counts are collected

The CLI walks local log files written by your agents and extracts usage blocks. Dedup is keyed by a request id from the source (e.g. Anthropic requestId, Codex session id). Nothing else leaves your machine.

Agent Path Status
Claude Code ~/.claude/projects/*/*.jsonl live
OpenAI Codex ~/.codex/sessions/**/*.jsonl live
Hermes ~/.hermes/ stub
openclaw ~/.openclaw/ stub

For anything not on this list, reach for the SDK.

License

MIT © Sharvil Saxena / SXNA Labs.

Description taken from the repository README.

Ratings

–
0 ratings
5 0
4 0
3 0
2 0
1 0

Rate this app

Sign in to rate

Comments 0

Sign in to comment

No comments yet.

Related apps

#leaderboard · #tokens · #cli