Replaces the fish-only plugin with one portable binary — completions for bash/zsh/fish/PowerShell via `ccswitch completions <shell>`. Same UX (save/add/use/list/current/rm/isolate/seed/search + bare-name switch-and-launch). - Fixes the auth-loss bug: the OAuth token is per-account (org lives only in ~/.claude.json), so switching between same-login/different-org profiles left the sibling holding a rotated, dead refresh token. A switch now propagates the refreshed credential to every profile sharing the account. - Adds `save --force` / `add --force` to overwrite a profile without rm first. - macOS Keychain via `security` (shim); file-based creds on Linux/Windows. - Ports-and-adapters; 100% line / 98.86% region coverage; clippy + fmt clean. - Homebrew formula (auto-installs completions) + cask + release workflow. - Old fish plugin preserved under legacy-fish/ (also at lei-wego/ccswitch-fish). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
424 B
TOML
23 lines
424 B
TOML
[package]
|
|
name = "ccswitch"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Switch between multiple Claude Code accounts"
|
|
license = "MIT"
|
|
|
|
[[bin]]
|
|
name = "ccswitch"
|
|
path = "src/main.rs"
|
|
|
|
[lib]
|
|
name = "ccswitch"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
clap = { version = "4.5", features = ["derive"] }
|
|
clap_complete = "4.5"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
anyhow = "1.0"
|
|
thiserror = "2.0"
|