nawinsharma/tokenmeter — explained in plain English
Analysis updated 2026-05-18
Track exactly how much of a shared Anthropic API key you personally are spending.
See spend broken down by model and by time range on a dashboard.
Swap your real API key for a proxy key so real keys stay encrypted and hidden.
| nawinsharma/tokenmeter | 0xradioac7iv/tempfs | 7vignesh/pgpulse | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Bun and a local Postgres database, plus generating an encryption key and session secret.
Token Meter is a small proxy application that tracks how much you are actually spending on Anthropic Claude API calls. Instead of calling the Claude API directly, your app or your Claude Code SDK points at Token Meter's proxy address. The proxy quietly resolves your real, encrypted API key, forwards the request on to Anthropic, and streams the same response straight back to you, untouched. In the background, it records exactly how many tokens were used and prices that usage, so nothing about your actual request or response changes. The project is built with Next.js for the web app, Postgres as the database, Drizzle as the tool that manages the database tables, Better Auth for signing in, and Recharts for drawing usage charts. To run it yourself, you need the Bun JavaScript runtime and a local Postgres database. After installing dependencies and filling in a few environment variables, including an encryption key used to protect stored API keys, you seed the database with Anthropic's current model pricing and start the app. Once signed up, you add your real Anthropic API key, which gets encrypted and stored so only its last four characters are ever shown again. You then generate a separate proxy key, shown to you once, and use that instead of your real key when configuring the Anthropic SDK in your own code. From there, every request you make through the proxy shows up on a dashboard with spend over time, cost broken down by model, how often cached tokens were reused, and a list of recent requests, filterable by time range from the last day up to the last ninety days. Because usage recording happens separately from the actual API call, a database problem never causes an API request to fail.
A proxy that sits between your app and the Claude API, tracking and pricing every token you actually use on a dashboard.
Mainly TypeScript. The stack also includes Next.js, TypeScript, Postgres.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.