An open-source CLI for subscription users
Use spare allowance.
Before it resets.
Surplus checks your usage pace before a new coding session. When there's room in your included allowance, it applies the stronger settings you chose.
DEMO SAMPLE DATA
No provider account was queried.
PREMIUM · opus
40.0% weekly remaining · reset in 1440m
On pace to leave ~25% unused at reset;
premium fits.
A small local decision
A small decision at launch.
Surplus reads the usage window the provider exposes, checks your reserve and reset time, then decides whether to apply your stronger settings.
-
01
Read what the provider reports
Usage and policy state stay on your device. Surplus checks reported allowance, reset time and included-usage permission locally at launch and makes no model call to measure them.
-
02
Check the pace and reserve
Surplus projects how much allowance would remain at reset. Stronger settings need room above your reserve, with at least 25% left in each reported usage window.
-
03
Keep your normal choices
Missing or stale data, explicit model choices and non-interactive sessions keep the provider's usual settings.
A 5% reserve and 5% expected-use budget are part of the weekly check. These are routing thresholds, not a cap on a running session. Surplus cannot promise a model-specific quota or prevent paid overage.
Try sample values
Would Surplus upgrade?
Try the Codex policy with sample values. This demo uses weekly average pace and a 1.3× assumed burn rate for stronger settings. It never contacts a provider.
Needs 25% or more, including the configured reserve and expected-use budget.
When reported, this window needs at least 25% headroom.
Pace can open a window earlier. The first 24 hours use the near-reset fallback.
Open source · MIT
Install once.
Use your usual commands.
Requires macOS or Linux, Node.js 22.21+ or 24.10+, and zsh or bash. Start a new terminal after setup.
npm install --global surplus-cli
surplus installSetup adds shell wrappers and provider hooks. Explicit model choices pass through. Running sessions are not switched, and billing settings stay unchanged.
Read the security notesBuilt in the open
Help test the
assumptions.
Subscription limits change. The pace model makes assumptions. Reports from different clients and a full reset cycle are more useful than a star count.
Read the contribution guide ↗Try an installation
Tell us your OS, Node version, client version, and which step worked or failed.
Report installation friction ↗Check a provider
Help reproduce changes in reported usage windows, subscription authentication, or model capabilities.
Report compatibility ↗Test a policy boundary
Start with reserves, reset times, stale data, or forecasts. Include a reproducible case and expected behavior.
Explore the tests ↗Keep credentials, auth files, prompts, and private project details out of reports.
Questions
What people ask.
Why change the effort or model at all, and is high always better?
Allowance expires at the reset, so unused allowance is wasted. Surplus applies the stronger setting only when the pace projection says allowance would otherwise go unused or the near-reset rule applies. Higher effort spends more of the same allowance. An explicit model or effort flag, or a provider model variable, always passes through unchanged.
What happens during a burst of heavy sessions?
Every interactive launch eligible for automatic routing is checked again. Launches with an explicit model or effort override, and non-interactive launches, pass through unchanged, and a running session is never switched. Premium needs at least 25% of the week left, at least 25% of the five-hour window where reported, and, for pace-based routing, a projection that still leaves at least 15% unused at the reset. The near-reset strategy does not require this projection threshold. While premium is already active, the weekly floor relaxes to 20% and the pace-based projected-unused floor to 10% (the five-hour floor stays 25%), so a burst tends to stay premium until one of them is hit. For Claude that happens only once a refreshed statusline sample reflects the burn, so launches before it still go premium only while an estimated debit of 1% of the week per premium launch (configurable, 0 disables) leaves room. A newer reading, a new reset window, or another account clears the estimate.
Why can a burst overshoot on Claude?
Claude launches read the last sample a running session saved, accepted for up to 120 minutes, so several launches before the next refresh would see the same number. Surplus holds back an estimated 1% of the week per premium Claude launch (premiumLaunchDebitPercent, 0 disables) until the next reading, which is only a guess, not a measurement. Codex is read at each launch. surplus forecast claude 20 keeps premium off unless the reserve plus 20% of the week is left. It does not change the pace projection, and it needs a saved Claude reading, which a running session's statusline writes. With defaults that reserve is 25%, the same as the normal floor, so it only matters once premium is already active. Details in the README ↗
How much headroom do I have for an unexpectedly busy day?
Surplus does not predict spikes. It keeps fixed floors: at least 25% of the week left and, for pace-based routing, a projection at premium burn (1.5x Claude, 1.3x Codex) that leaves at least 15% unused at the reset. The near-reset strategy does not require this projection threshold. Once premium is active, the weekly floor relaxes to 20% and the pace-based projected-unused floor to 10%. Whatever sits above those floors is your cushion. For a known heavy stretch, surplus forecast claude 30 reserves more until the reset. Automatic busy-day headroom is not built yet.
What data does Surplus keep, and can it stop charges?
Surplus sends no analytics or usage events, and keeps its state in local XDG directories. It cannot prevent charges from paid-overage settings already enabled in a provider account, and it never changes billing settings.
From the changelog
What shipped.
v0.5.0 holds back an estimated share of the week for each premium Claude launch, so a burst shrinks its own headroom. v0.4.1 adds the Surplus agent skill. v0.4.0 adds Hermes Agent and Pi subscription routing.