roeimichael

CAT - Per-tool-call context window analyzer for Claude Code

12
1
100% credibility
Found Apr 09, 2026 at 12 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

Context Analyzer Terminal monitors token usage per tool call in Claude Code sessions, detects anomalies with baselines and alerts, and provides a live dashboard for optimization.

How It Works

1
🔍 Spot the Problem

You're using your AI coding buddy and see your conversation space filling up mysteriously after certain commands.

2
📥 Get CAT

Grab the free helper tool that watches exactly which commands guzzle your space.

3
⚙️ Set It Up

Run a quick setup so it quietly watches your AI sessions without getting in the way.

4
🚀 Start Watching

Turn on the live view to see your sessions, costs over time, and any surprises popping up.

5
⚠️ Get Smart Alerts

Right away, it spots wasteful commands, explains why, and suggests fixes in plain words.

6
📈 Review and Tweak

Check the dashboard for patterns, get tips, and adjust your commands to save space.

🎉 Save Time and Money

Your AI chats run smoother, cost less, and you know exactly how to keep things efficient.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 12 to 12 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is ContextAnalyzerTerminal?

ContextAnalyzerTerminal (CAT) is a Python analyzer that hooks into Claude Code to track context window usage per-tool-call, revealing exactly which Bash run or file read spiked your tokens. It correlates hook events with statusline snapshots, builds rolling baselines, and flags anomalies with plain-language root causes via optional Claude Haiku classification. Users get a live TUI dashboard, CLI commands like `status` and `anomalies`, and real-time statusline badges plus notifications.

Why is it gaining traction?

Claude Code's /cost lacks per-tool attribution or trends – CAT delivers that instantly, with proactive alerts suggesting /compact or RTK compression for 60-90% savings on Bash output. The fire-and-forget hooks, webhook support, and Rich-powered dashboard make monitoring effortless without workflow disruption. Python, FastAPI backend, and SQLite keep it lightweight for terminal-heavy devs.

Who should use this?

Claude Code users grinding long sessions with heavy tool use – backend devs debugging repos via Bash/Grep, AI agents spawning subagents, or anyone burning through 200K windows on file reads. Perfect for optimizing Anthropic costs in code generation workflows where context bloat kills productivity.

Verdict

Grab it if you're deep in Claude Code; the per-tool-call breakdowns alone justify the 5-minute setup despite 12 stars and 1.0% credibility score. Docs shine, tests solid via pytest/Ruff, but watch for edge cases in multi-session chaos – mature enough for daily drives.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.