AI assistants like Claude Code and ChatGPT have become indispensable, yet their usage remains a mystery. Most developers track code commits and deployments meticulously, but rarely examine the tool consuming the most hours. Without visibility into message volume, model preferences, or prompt caching benefits, cost optimization is guesswork at best.
A new suite of four tiny, open-source tools changes that by analyzing local usage data entirely offline. Each tool reads files already on your system and produces actionable insights—without accounts, API keys, or telemetry. The developer behind these utilities built them after realizing their own Claude Code spending was dominated by unexpected factors, proving that blind optimization can backfire.
The surprising cost driver in AI assistant usage
Before measuring actual usage, a common assumption is that prompt quality directly impacts expenses. Tightening system messages or compressing context appears logical, but data from personal transcripts revealed a far different reality. Analysis of ~/.claude logs showed:
- cacheRead operations accounted for 72% of spend
- cacheWrite contributed approximately 19%
- input processing represented just 0.3% of total cost
This distribution contradicts conventional advice. Optimizing static prompts would yield minimal savings while potentially disrupting cache efficiency. The real leverage points involve cache management—establishing milestones, clearing contexts before bloating, and maintaining static reference files like CLAUDE.md.
Important note: These percentages reflect one user’s experience. Actual figures vary by plan type and usage patterns. The critical insight remains: you cannot optimize what you haven’t measured.
Four privacy-first tools to illuminate your usage
Each tool serves a distinct purpose while maintaining strict local processing. All are MIT-licensed and available on GitHub.
1. tokenops — Break down Claude Code spending by component and model
This CLI tool analyzes ~/.claude transcripts to generate a detailed cost breakdown. Unlike generic advice, it provides data-validated recommendations prioritized by actual dollar impact.
# Test with synthetic data first
npx @greymoth/tokenops demo
# Install globally
npm i -g @greymoth/tokenops
# Generate a full report
tokenops report
# Receive prioritized cost-saving actions
tokenops advise
# Create a shareable comparison card
tokenops card --anonThe --anon flag obscures project names for safe sharing. Start with the demo to evaluate functionality before analyzing personal data.
2. ccwrapped — Generate a visual "Wrapped" summary of your Claude Code activity
Transform raw usage data into an SVG card resembling Spotify Wrapped. The output displays total messages, estimated value from caching, top models, and key projects—ideal for personal reflection or public sharing.
# Generate and open the SVG
ccwrapped --wrapped
# Create a shareable version with anonymized project names
ccwrapped --wrapped --anonOne user’s card revealed approximately 194,379 messages with six-figure estimated savings from caching—a figure that surprised even its owner.
3. inkdex — Track web-based AI assistant usage in your browser
Not all workflows happen in terminals. This Manifest V3 extension monitors ChatGPT and Claude web sessions locally, storing data in browser storage rather than sending it online. The result is a Wrapped-style summary accessible within your browser.
No account setup or permissions beyond local storage are required. The extension remains functional even when offline.
4. ghwrapped — Analyze any public GitHub profile visually
This tool diverges from personal data entirely. By using only publicly available repository information, it generates analogous Wrapped cards for GitHub profiles—useful for evaluating potential collaborators or open-source maintainers.
Simply provide a username to receive a formatted SVG summary.
Verifying the "100% local" claim
Trust must be earned, especially regarding data privacy. The developer encourages verification through multiple methods:
- Examine the source code in each repository’s
bin/directory for terminal commands that could trigger network activity. - Search for common networking keywords in the codebase to confirm no external calls occur:
grep -rEi 'fetch|http|net\.|request|axios' .- Test functionality offline by unplugging your network connection and running the tools. Local execution should proceed normally.
This approach transforms trust from blind faith to verifiable proof—exactly the standard expected for tools handling usage data.
Your turn: Measure, share, and optimize
The developer’s challenge is simple but revealing: install one tool, run it on your data, and share the results. The process takes minutes and often uncovers unexpected patterns about how AI assistants are actually used.
Start with the most relevant tool for your workflow:
npm i -g @greymoth/ccwrapped
ccwrapped --wrapped --anonDrop your anonymized card in the comments or tag the project’s maintainer. The insights gained from real usage data may redefine how you approach AI assistant spending entirely.
AI summary
Claude Code ve ChatGPT kullanımınızı yerel olarak analiz edin. Harcamalarınızdaki gizli kalıpları keşfedin ve bütçenizi optimize edin.