DEV Community

Junhua Tan
Junhua Tan

Posted on

I Built an Open-Source Tool to Track AI Coding Costs Across Claude Code, Codex & Cursor

The Problem

I was using Claude Code, Codex, and Cursor daily but had no idea how much I was spending on tokens. Bills kept surprising me.

The Solution

I built AIUsage — a local-first, open-source CLI that tracks everything.

Key Features

  • Token usage tracking with daily breakdowns
  • Cost estimation with configurable pricing
  • Model usage ranking
  • Multi-device sync via GitHub or S3
  • Desktop widget

How It Works


bash
npm install -g @juliantanx/aiusage
aiusage parse
aiusage serve

Why Local-First?

Your data never leaves your machine. No accounts, no API keys, no cloud servers.

Try It

[aiusage.jtanx.com](https://aiusage.jtanx.com)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)