Rocha101/claude-code-quickswitch
quickswitch
一个 Claude Code mod,由 ccswitch 驱动,在状态栏中加入一键切换 Claude 账户的功能,并显示 Token 状态和刷新 session。
关于这个 mod
quickswitch 是一个 Claude Code mod(hooks/register.tsx),会在状态栏的模式标签旁显示当前账户。点击后展开受管理账户列表及 Token 过期状态;选择一个账户会运行 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.
