Developer builds open-source CLI tool to track AI API spending by project and model
A developer created AICostTracker, a local command-line tool that logs AI API usage and breaks down costs by project and model, after growing frustrated with opaque billing dashboards from providers like OpenAI. The tool runs entirely on the user's machine, storing data in a local JSONL file rather than a cloud service. It supports pricing for major AI providers including OpenAI, Anthropic, and Google, as well as local Ollama models. Users manually log each API call with details such as token counts and project name, then run a summary command to view spending patterns. The tool is available as an npm package on GitHub, with automatic API call interception planned as a future feature.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in