Repository navigation
v0.52.0
Four new ways for ccswap to pick accounts, borrowed from magpie's account picker (#48). Only the consume-first tie-break changes anything by default; the other three are settings you turn on.
- A warning before quota goes unused. Turn on
usage.wasteWarningandccswap autowarns when an account's weekly window resets soon with a lot left. The menu bar shows a notification, and the terminal prints a line likeAccount 1 (...) resets in 3h with 58% unused. The defaults are within 6 hours of the reset and at least 40% left; change them withusage.wasteWarningHoursandusage.wasteWarningPct. Each account is warned once per reset, even after a restart. - A home account.
ccswap config set autoswitch.homeAccount <num|email>names the account you prefer, such as a Teams seat. Auto-switch still moves off it when it hits a limit, but goes back once it is 10 points below every limit (your hysteresis setting), so you don't drift away from it. While you're on it,consume-firstwon't move you off. If a liveccswap runsession or something else blocks the return,ccswap autoreportshome-blockedonce. ccswap runcan pick the account. Withrun.autoPickon, a bareccswap runin a directory with no mapping starts on the account with the fewest live sessions that is under the auto-switch threshold. It skips API-key accounts and accounts whose login needs fixing. With--require-session, it refuses to start rather than fall back to the default login.- Consume-first ignores resets a few minutes apart. Resets in the same clock hour now count as a tie, decided by remaining quota. Consume-first no longer moves to a nearly spent account just because its week resets four minutes sooner.
Email lookups in switch, remove and config set now ignore case.