How I Track Claude, Codex, and Gemini Quotas from One Script

Dev.to AI
Generative AI AI Tools

(If you're trying to decide which model to switch to when one runs dry, I benchmarked 15 models on 38 real coding tasks with full cost-per-task breakdowns.) I run three AI coding CLIs daily. None of them tell me whether I'm about to hit a rate limit. I periodically get locked out mid-task and spend ten minutes figuring out which tool ran out, when it resets, and whether I should switch models or wait. I built a script that collects quota data from all three, writes it to a single JSON file, and runs on an hourly cron.