Back to browse
GitHub Repository

Track OpenAI/Anthropic API costs locally with SQLite

0 starsPython

Token Cost Guard – Track AI API Costs Locally (Python CLI)

by AlexCalderAI·Feb 17, 2026·1 point·2 comments

AI Analysis

●●SolidSolve My ProblemNiche Gem
The Take

One-line instrumentation (client = track(OpenAI())) that logs every call to ~/.token-guard/guard.db is the simple, practical win here — you get per-model/day reports, CSV export and webhook alerts without shipping telemetry. It's a tidy, privacy-minded tool that nails the common pain of runaway bills, though it doesn't reinvent the space (a small GUI or automatic pricing sync would push it into 'banger' territory).

Target Audience

Backend developers, ML engineers, and teams using paid LLM APIs who want local, privacy-first cost tracking and alerts

Similar Projects

AI/ML●●Solid

Claude Code's $200 plan is a 17× subsidy on the raw API

150× token inflation finding — you pay to re-read, not generate.

Big BrainDark Horse
Hiteshjain118
92318d ago