Dev.to
7/23/2026

AICostTracker: a local CLI for tracking AI API spending by project and model
Original: I built a local-first CLI to track what I'm actually spending on AI APIs
Short summary
A developer built AICostTracker, a local-first CLI that logs AI API calls and shows cost breakdowns by project and model. Data is stored in a portable JSONL file with no SaaS account required. Pricing is baked in for OpenAI, Anthropic, Google, and local Ollama models. The tool supports manual logging now with automatic call interception planned as a next step. Available via npm as @ozperium/aicost-tracker.
- •AICostTracker CLI logs AI API calls and summarizes costs by project and model
- •Data stored locally in JSONL format — no SaaS account, fully portable
- •Pricing baked in for OpenAI, Anthropic, Google, and Ollama models
Generated with AI, which can make mistakes.
Is this a good recommendation for you?


