The expense report your AI proxy skipped
Turns the Redis usage firehose from CLIProxyAPI into queryable SQLite records and a built-in dashboard for cost, tokens, and model breakdowns.

What it does CPA Usage Keeper is a bookkeeping layer for CLIProxyAPI. It consumes usage events from CPA’s Redis queue, writes them to SQLite, and serves a built-in web dashboard that breaks down request volume, token spend, cache hits, success rates, and per-model costs. It also syncs metadata—API keys, auth files, and provider configs—so the numbers stay aligned with whatever CPA is currently routing.
The interesting bit The project treats SQLite as a production analytics store rather than a toy, which keeps deployment weight minimal while still supporting filtering, pagination, export, hourly heatmaps, and quota refresh across multiple AI providers. It is essentially purpose-built glue code, but it is thorough glue: it even embeds into CPAMC as a plugin for unified management.
Key highlights
- Consumes CPA Redis usage events into SQLite with automatic metadata sync for keys, auth files, and providers.
- Built-in dashboard covers usage trends, cost estimation, model composition, API key breakdowns, and request-level event inspection.
- Supports time-range filtering, customizable columns, CSV export, and hourly heatmaps for forensic budget analysis.
- Optional password protection, SQLite backups, and subpath deployment for reverse-proxy setups.
- Ships as a single Go binary with Docker, Docker Compose, Homebrew, and systemd packaging.
Caveats
- Requires an existing CLIProxyAPI backend; it is not a standalone proxy and cannot generate usage data on its own.
- The README is mostly a deployment manual, so deeper architectural or behavioral details are sparse.
Verdict Worth a look if you already run CLIProxyAPI and need to answer “which key burned through the quota last Tuesday.” Skip it if you are not running CPA or need a general-purpose API gateway analytics tool.
Frequently asked
- What is Willxup/cpa-usage-keeper?
- Turns the Redis usage firehose from CLIProxyAPI into queryable SQLite records and a built-in dashboard for cost, tokens, and model breakdowns.
- Is cpa-usage-keeper open source?
- Yes — Willxup/cpa-usage-keeper is open source, released under the MIT license.
- What language is cpa-usage-keeper written in?
- Willxup/cpa-usage-keeper is primarily written in Go.
- How popular is cpa-usage-keeper?
- Willxup/cpa-usage-keeper has 854 stars on GitHub.
- Where can I find cpa-usage-keeper?
- Willxup/cpa-usage-keeper is on GitHub at https://github.com/Willxup/cpa-usage-keeper.