Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By PsychQuantv1.0.0MITIn 1 marketplace
Claude Code 多帳號管理:switch(切換帳號)、list(列出帳號)、current(目前帳號)、setup(設定新帳號)
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude Code 多帳號管理工具。解決使用 CLAUDE_CONFIG_DIR 切換帳號時 /ide 無法偵測 VS Code 的問題。
當使用 CLAUDE_CONFIG_DIR 環境變數切換 Claude Code 帳號時,VS Code 的 Claude Code 擴充套件仍然固定將 IDE 連接資訊寫入 ~/.claude/ide/。這導致 CLI 的 /ide 命令找不到 VS Code。
透過 symlink 讓所有帳號目錄的 ide/ 都指向預設的 ~/.claude/ide/:
~/.claude/ide/ ← VS Code 擴充套件寫入(固定)
~/.claude-account1/ide/ → symlink to ~/.claude/ide/
~/.claude-account2/ide/ → symlink to ~/.claude/ide/
/claude-switch:list列出所有可用的 Claude Code 帳號。
/claude-switch:list
輸出範例:
📋 Claude Code 帳號列表
========================
⬜ default (預設)
路徑: /Users/che/.claude
✅ kiki830621 ← 目前使用中
IDE: ✅ symlink 已設定
路徑: /Users/che/.claude-kiki830621
/claude-switch:current顯示目前使用的帳號及其狀態。
/claude-switch:current
/claude-switch:setup <account-name>建立新帳號目錄並自動設定 IDE symlink。
/claude-switch:setup work
/claude-switch:setup personal
/claude-switch:switch <account-name>切換到指定帳號(輸出需要執行的 shell 命令)。
/claude-switch:switch kiki830621
將以下函數加入 ~/.zshrc 或 ~/.bashrc:
# Claude Code 帳號切換
claude-switch() {
local account="$1"
local config_dir="$HOME/.claude-$account"
if [ -z "$account" ]; then
echo "Usage: claude-switch <account-name>"
echo " claude-switch default # 切換回預設帳號"
return 1
fi
if [ "$account" = "default" ]; then
unset CLAUDE_CONFIG_DIR
echo "Switched to default Claude account"
return 0
fi
if [ ! -d "$config_dir" ]; then
echo "Account not found: $config_dir"
echo "Run: /claude-switch:setup $account"
return 1
fi
# 確保 IDE symlink 存在
if [ ! -L "$config_dir/ide" ]; then
ln -s "$HOME/.claude/ide" "$config_dir/ide" 2>/dev/null
fi
export CLAUDE_CONFIG_DIR="$config_dir"
echo "Switched to Claude account: $account"
}
# 自動補全
_claude_switch_completion() {
local accounts=("default")
for dir in "$HOME"/.claude-*; do
if [ -d "$dir" ]; then
accounts+=("$(basename "$dir" | sed 's/^\.claude-//')")
fi
done
COMPREPLY=($(compgen -W "${accounts[*]}" -- "${COMP_WORDS[COMP_CWORD]}"))
}
complete -F _claude_switch_completion claude-switch
使用方式:
claude-switch kiki830621 # 切換到 kiki830621 帳號
claude-switch work # 切換到 work 帳號
claude-switch default # 切換回預設帳號
/plugin install claude-switch@PsychQuant/psychquant-claude-plugins
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub psychquant/psychquant-claude-plugins --plugin claude-switchPlugins from other owners that cover similar ground