github errhythm/ccswap v1.3.0

one hour ago

Features

  • ccswap list --sort reset|5h|7d orders each provider's accounts by their next reset, soonest first, so you can see which quota to spend before it expires. reset uses whichever of the 5h and weekly resets comes first, while 5h and 7d use only that window. The option works for Claude, Codex and Antigravity, and with --json (#62).
  • With ccswap statusline on, ccswap now stores the 5h/7d usage Claude Code passes to the statusline after every reply. auto, list and the menu bar show the active account's usage seconds after each reply, without a request to the usage endpoint. A reading counts only when ccswap can tell it belongs to the active saved account: it is skipped in the 120 s after a switch, and when its reset times don't match that account's. Any later fetch replaces these numbers (#58).
  • New notify.command setting: every auto-switch engine (Claude, Codex, Antigravity) runs this shell command on each event listed in notify.events (default: switch,account-quarantined,all-exhausted,error). The command receives the event's JSON on stdin, and CCSWAP_EVENT, CCSWAP_PROVIDER, CCSWAP_TITLE and CCSWAP_MESSAGE in its environment. It runs in the background and is killed, along with its children, after 30 s. A failing command never stops switching. all-exhausted and error are sent at most once an hour for the same message. See auto-switching (#59).
ccswap config set notify.command 'terminal-notifier -title "$CCSWAP_TITLE" -message "$CCSWAP_MESSAGE"'

Fixes

  • Switching Claude accounts now keeps the current /design-login grant (designOauth) instead of restoring the slot's older or missing copy (#61).
  • Antigravity's background /usage polling of the active account now runs in a private home with the file backend, so a slow Keychain can no longer open a Google sign-in window in your browser. Token refreshes during that polling are written back to Antigravity's own login. Thanks @mvanhorn (#60).

Don't miss a new ccswap release

NewReleases is sending notifications on new releases.