Skip to content

feat: add live refresh for live,switch,remove commands#66

Merged
Loongphy merged 22 commits intomainfrom
feat/switch-poll-refresh
Apr 21, 2026
Merged

feat: add live refresh for live,switch,remove commands#66
Loongphy merged 22 commits intomainfrom
feat/switch-poll-refresh

Conversation

@Loongphy
Copy link
Copy Markdown
Owner

@Loongphy Loongphy commented Apr 19, 2026

New Commands

  • add --live mode for list, switch, and remove
  • add switch --live --auto for automatic account switching

What --live Means

  • --live keeps the TUI open and refreshes the current view in place
  • it is designed for real-time monitoring of API quota and usage status, especially the 5h and weekly windows
  • in switch --live, you can keep watching the latest account state and switch accounts from the same long-running view without leaving the picker
  • this makes --live a better fit for keeping a terminal open as a longer-term account dashboard

Note

--auto cannot be used by itself. It must be used together with --live, as switch --live --auto.

switch --live --auto Auto Switch Rules

  • switch away from the active account when it becomes an error account or an exhausted account
  • Error account: the usage API returns a non-200 status
  • Exhausted account: the 5h or weekly usage window reaches 0 remaining

TUI

  • rework the interactive TUI flow
  • add native Windows TUI support

Deprecated

  • remove list --debug; use --live instead

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 19, 2026

Open in StackBlitz

@loongphy/codex-auth-darwin-arm64

npx https://pkg.pr.new/@loongphy/codex-auth-darwin-arm64@66

@loongphy/codex-auth-darwin-x64

npx https://pkg.pr.new/@loongphy/codex-auth-darwin-x64@66

@loongphy/codex-auth-linux-arm64

npx https://pkg.pr.new/@loongphy/codex-auth-linux-arm64@66

@loongphy/codex-auth-linux-x64

npx https://pkg.pr.new/@loongphy/codex-auth-linux-x64@66

@loongphy/codex-auth-win32-arm64

npx https://pkg.pr.new/@loongphy/codex-auth-win32-arm64@66

@loongphy/codex-auth-win32-x64

npx https://pkg.pr.new/@loongphy/codex-auth-win32-x64@66

@loongphy/codex-auth

npx https://pkg.pr.new/@loongphy/codex-auth@66

commit: 4c6e05b

@Loongphy Loongphy changed the title feat: add live refresh to switch selector feat: add live refresh for live,switch,remove commands Apr 20, 2026
@Loongphy Loongphy merged commit 7e84e6c into main Apr 21, 2026
11 checks passed
@Loongphy Loongphy deleted the feat/switch-poll-refresh branch April 21, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant