Rocha101/claude-code-quickswitch
quickswitch
一個 Claude Code Mod,由 ccswitch 驅動,在狀態列加入一鍵切換 Claude 帳戶的功能,並顯示權杖狀態與工作階段重新整理。
關於這個 mod
quickswitch 是一個 Claude Code Mod(hooks/register.tsx),會把目前帳戶放在狀態列的模式標籤旁。點擊後會展開受管理帳戶清單與權杖到期狀態;選取帳戶會執行 ccswitch switch,再透過 session.start 和 turn.complete hooks 重新整理,ui.render 則繪製到 PromptHint 插槽。它需要 Claude Code 2.1.287+、ccswitch、jq 與 git,並提供 curl 安裝腳本以及手動設定 plugin-dir 的方式。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add Rocha101/claude-code-quickswitch claude plugin install quickswitch
原文 / README
quickswitch
Switch Claude accounts in one click — from the Claude Code status line.
Work seat, personal seat, the team account: one click on your email and pick.
English · Português
<img src="assets/demo.gif" alt="The account next to the mode label opens into a list of accounts with their token status" width="100%"> </div>Why
Hitting the usage limit on one seat while another sits idle is the worst. ccswitch already swaps Claude Code credentials without the log-out/log-in dance — quickswitch puts it one click away, right where you're looking.
What you get
Your current account lives in the status line, next to the mode label:
<img src="assets/closed.png" alt="auto mode on · ⇄ [email protected]" width="100%">Click it and the same spot turns into every account you manage, with how long each token has left:
<img src="assets/open.png" alt="the account list: active highlighted, expired dimmed" width="100%">- ● the active account, highlighted · ○ the others · expired tokens dimmed
- click one →
ccswitch switch→ a toast confirms; ✕ closes without switching - the list refreshes on session start, after each switch and every turn — switches made in another terminal show up too
- zero extra rows: no band, no panel, it is part of the status line
Install
You need ccswitch with your accounts added (ccswitch add).
curl -fsSL https://raw.githubusercontent.com/Rocha101/claude-code-quickswitch/main/install.sh | bash
Then open a new Claude Code session.
<details> <summary>Manual install</summary>git clone https://github.com/Rocha101/claude-code-quickswitch ~/.claude/mods/claude-code-quickswitch
Add the folder to CLAUDE_CODE_PLUGIN_DIRS in the env block of ~/.claude/settings.json (:-separated), or start Claude Code with claude --plugin-dir ~/.claude/mods/claude-code-quickswitch.
Requirements: Claude Code 2.1.287+ (mods), ccswitch, jq, git. Clicking needs a terminal that reports the mouse (Claude Code's fullscreen mode); without one, ctrl+x tab focuses it and Enter presses.
Good to know
A switch applies on restart. ccswitch swaps the stored credentials; a running Claude Code keeps the old session until it restarts. After switching: /exit, then claude -c to continue right where you were. The toast reminds you.
If you also print your email in a custom status line script, drop it — quickswitch already shows it.
How it works
A Claude Code mod (hooks/register.tsx, ~80 lines):
session.startandturn.completerunccswitch listand parse the accounts.ui.renderonPromptHintdraws the account (or the open list) in the hint slot under the prompt.- A press runs
ccswitch switch <n>and refreshes.
Contributing
claude plugin validate .
claude plugin test .
Issues and PRs welcome. If quickswitch rescued you from a rate limit, leave a star ⭐
See also: glance — images and rendered HTML inline in Claude Code.
