Self-hosted Claude Code leaderboard for teams

Each laptop's Claude Code sends its token counts to one Python file you run. Everyone keeps their own Claude account, and the board ranks output tokens live.

Free and MIT licensed. Version 1.0.0 needs Python 3.10 or newer and nothing from pip.

The leaderboard and a card per person

Pick today, 7 days, 30 days, this month or all time. The page checks for new usage every second, and a click on a name opens that person's card.

Read the README

How usage reaches the board

Claude Code has OpenTelemetry metrics built in. The installer backs up ~/.claude/settings.json and adds a few env keys; each laptop then posts its counts with a personal token.

  • The server keeps hourly totals: tokens by type and model, cost, sessions and active time.
  • Re-running the installer replaces the imported history, so nothing counts twice.
Read how it works

Usage numbers only

Token counts, model names, estimated cost, session counts and active time leave each laptop. Prompts, code and file names stay on it.

between metric sends

5 s

of history at install

30 days

totals per person

1 h

Admin page, photos, themes and two languages

Adds people to the leaderboard

It writes each person's install message. Rename people, rotate tokens or remove one computer's history.

The admin page: a form to add a participant and the participant list with total output and status

Shows the leaderboard in a dark theme

It follows the system setting until someone picks light or dark.

The podium in the dark theme

Shows the leaderboard in Bahasa Indonesia

English or Indonesian: set LB_LANG to en or id.

Lets each person add a photo

People upload their own picture, with a crop and zoom step.

Runs on Linux, macOS or Docker with Python 3.10

One Python file on the standard library, SQLite storage and no build step. Keep it up with systemd, Docker's restart policy, or run.sh from cron.

For private access, Cloudflare Tunnel and Access need no open ports, and people log in with their work email. Without Cloudflare, an admin passphrase and a secret viewer link do the job.

Read the Cloudflare guide

Questions and limits

To try it with made-up data first, run python3 manage.py demo on an empty database.

Do we need a shared Claude organization?

No. It works when everyone uses their own personal Claude account. You need no shared organization and no admin API key.

Does usage on claude.ai count?

No. Only Claude Code produces these metrics; the desktop chat and claude.ai do not show up.

Can someone send fake usage numbers?

Yes, with their own token. It is a friendly leaderboard, not billing.

Is the cost on the leaderboard what we pay?

It is Claude Code's own estimate at API prices. People on a subscription pay their plan, so read the figure as a guide.

What does the leaderboard cost?

Nothing. It is MIT licensed and runs on your own server.

Does the server need Docker?

No. python3 server.py runs it on Python 3.10 or newer; Docker Compose is one option.

Can Windows laptops join the leaderboard?

Yes, through PowerShell. That installer is tested less than the macOS and Linux one, so bug reports help.

Set it up in 3 steps

1

Start the leaderboard server

Set LB_ADMIN_KEY to a long random string, then run it. The board opens on port 8790.

2

Add people to the leaderboard

Open /admin, enter your admin key, add a participant and copy the command it shows.

3

Connect each laptop's Claude Code

Each person runs their command once in a terminal, then restarts Claude Code.