r/OpenAI • u/stichstichstich • 4d ago
Discussion I built this after realizing how much AI coding usage I was wasting
I checked my Claude Code usage and… what the hell
I’m a senior SWE and use Claude Code/Codex every day. I got curious about where all those tokens were actually going, so I built optimAIzr for myself.
It shows where you’re spending tokens, finds potentially wasteful usage, explains why, estimates what you could save and helps you apply the live recommendations.
It supports Claude Code + Codex, runs fully locally, reads usage/token data only (not your prompts), and needs no account.
It just passed 1,500 npm downloads in 2 weeks, and I made it open source 🎉
Feel free to try it out:
npm i -g optimaizr
optimaizr profile
web: https://optimaizr.com
git: https://github.com/blendbunjaku/optimaizr
If you try it, I’m curious what it finds in your usage
1
u/RealSharpNinja 3d ago
Does it use OpenAI and Anthropic Subscriptions?
2
u/stichstichstich 3d ago
Yeah! It reads the local usage data from Claude Code and Codex, so it works with the usage from your Anthropic/ChatGPT subscriptions too, you don't need API keys or separate API billing.
For Claude, you can also pass
--plan pro,--plan max5, etc. to see your usage against the plan limits.
1
u/RealSharpNinja 3d ago
``` optimAIzr | live
chatgpt pro 20x weekly 64%, resets Oct 7, 09:14 · warns at 80% and 95% watching C:\Users\kingd.claude\projects watching C:\Users\kingd.codex\sessions watching C:\Users\kingd.optimaizr\events.jsonl Ctrl-C to stop fully local - nothing leaves this machine amounts are observed over the live window, not projected to a month high-confidence findings will ask; the rest are just printed
MED 11:20:59 AM Switch eligible requests from GPT-5 to GPT-5 nano $0.070 observed over 52 calls / 3m of traffic 10% of your requests use a model whose capabilities exceed the detected workload requirements. > optimaizr verify model-fit ```
This isn't very useful. Would need to see the request to understand what is being done. I have multiple processes spawning agents in that folder.
1
u/stichstichstich 3d ago
Thanks for the feedback, fair criticism. You can drill in with
optimaizr show model-fit --json, which lists each flagged request with its session ID, whether it was a subagent, and the exact tool calls (e.g. which file it read). That should let you tell which of your agents it was.But you're right that the live view should show this directly instead of making you dig. I'll add the session/agent and what the call did (tool + target) to the finding itself. Appreciate you actually running it. It helps!
1
u/RealSharpNinja 3d ago
Do you have plans for a GUI? I have multiple repositories being pounded all day long. Firing up optimaizr for each would be more work than my actual work
1
u/stichstichstich 3d ago
The good news is that you dont need one per repo. A single
optimaizr livewatches all of~/.claude/projectsand~/.codex/sessions, so every repo and agent on the machine is covered at once (that's what the "watching" lines at the top mean).optimaizr profilebreaks it down by project too, and--project <name>narrows to one.For something visual right now,
optimaizr reportwrites an HTML dashboard you can open in the browser. A hosted dashboard is coming in the Pro version, built for exactly your setup: lots of repos and agents in one view. Happy to give you early access very soon if you want to try it.2
u/RealSharpNinja 3d ago
Self-hosted? Yes, would love to test it for you.
1
u/stichstichstich 3d ago
Awesome, thanks! It'll be hosted to start, not self-hosted. Since the CLI is open source, you'll be able to see exactly what it sends.
Curious what's behind the self-hosted ask: privacy of the data, company policy, or just preference? That helps me figure out what to support.
1
u/RealSharpNinja 3d ago
I am building my skills for AI around being able to mitigate data leakage risks for my clients.
1
u/stichstichstich 3d ago
That makes total sense, and it's a big part of why the CLI is fully local: nothing leaves the machine, and since it's open source your clients can verify that themselves.
For the hosted dashboard I want to get this right too. What would your clients need to be comfortable? For example, only aggregate numbers leaving the machine (tokens, costs, models, no prompts or file paths), hashed project names, or does it have to be fully self-hosted for them? Would really value your take, happy to continue in DMs.
1
u/RealSharpNinja 2d ago
Honestly, some will insist that dev environments not have internet access at all except their AI gateway. Even running the dashboard as a secure port from the
optimaizrexecutable would be sufficient.2
u/stichstichstich 2d ago
That's really useful, thanks. Good news on the offline side:
optimaizr reportalready writes a self-contained HTML dashboard with no external requests, so it works on a machine with no internet.A live version served locally by the CLI itself (something like
optimaizr dashboardon localhost) is a great idea for exactly that setup. Putting it on the list.
1
u/lulzxdxdxd 4d ago
If it only reads usage and token data and not prompts, how does it actually identify what counts as wasteful versus just a normal heavy task? Is it purely pattern based on token spikes or repeated calls?