Prevent Claude Code from using up its weekly quota in one go.
Peras is a small tool that helps set “limit thresholds” for Claude Code and Codex. Many people have encountered this situation: after running a long-running task throughout the night, they discover the next day that their weekly quota for Claude Pro/Max or ChatGPT packages is almost exhausted.
It will monitor the 5-hour and 7-day usage limits specified in your package and tell you when you will run out of resources at your current rate of consumption. You can set a threshold; for example, it may pause your usage when it reaches 85% of the weekly limit. Once this limit is exceeded, the next request made by the system will be denied, along with a clear explanation of why. You can always restore normal usage through the terminal or menu at any time. Additionally, this system can break down the usage data for each individual item, showing you how much of each resource has been consumed.
The command-line interface and hook functions are available for free, are open-source under the MIT license, and can run completely locally – you can install them with just one command: `npx`. There is also a native Mac menu-bar application available. Those who make extensive use of programming agents and often encounter weekly usage limits may want to give this option a try.