# I built a local token cost tracker for Claude Code in Rust

> Source: <https://dev.to/zaydmulani09/i-built-a-local-token-cost-tracker-for-claude-code-in-rust-500h>
> Published: 2026-07-13 21:58:53+00:00

After one too many surprise Claude Code bills, I built agentwatch.

It's a local HTTP proxy written in Rust. Point your agent at localhost:7878, and it intercepts every request, parses the token usage, and shows a live Ratatui TUI dashboard of what you're spending — in real time.

Everything stays local. SQLite database, zero signup, single binary via cargo install agentwatch.

Supports Claude Code, Codex, and Gemini CLI.

github.com/zaydmulani09/agentwatch

## Top comments (0)

Subscribe

For further actions, you may consider blocking this person and/or [reporting abuse](/report-abuse)
