cd /news/developer-tools/i-built-a-local-token-cost-tracker-f… · home topics developer-tools article
[ARTICLE · art-58059] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

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

A developer built agentwatch, a local HTTP proxy written in Rust that tracks token costs for AI coding agents like Claude Code, Codex, and Gemini CLI. The tool intercepts requests, parses token usage, and displays a live dashboard using Ratatui, with all data stored locally in SQLite and no signup required.

read1 min views1 publishedJul 13, 2026
I built a local token cost tracker for Claude Code in Rust
Image: Dev.to

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)


For further actions, you may consider blocking this person and/or [reporting abuse](/report-abuse)
── more in #developer-tools 4 stories · sorted by recency
── more on @agentwatch 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-a-local-toke…] indexed:0 read:1min 2026-07-13 ·