From d7ac8d8dc277bf1e8140f902fd371f6b2c056b94 Mon Sep 17 00:00:00 2001 From: mysqto Date: Sun, 5 Jul 2026 21:45:06 +0800 Subject: [PATCH] docs: full walkthrough from install to daily switching Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a3b86ec..d043026 100644 --- a/README.md +++ b/README.md @@ -50,16 +50,77 @@ Requires [`jq`](https://jqlang.github.io/jq/). | `ccswitch current` / `whoami` | Show the active account | | `ccswitch rm ` | Delete a profile | -Typical first run: +## Walkthrough + +A complete run, from a fresh install to switching daily. + +### 1. Save the account you're already signed into ```fish -claude # log in as your first account -ccswitch save personal -claude /logout # or log out via the app, then log in as the other account -ccswitch save work -ccswitch work # from now on, switch freely +claude auth status # confirm who you're logged in as +ccswitch save personal # snapshot the active account as "personal" ``` +```fish +ccswitch list +# * personal you@gmail.com +``` + +The `*` marks the currently active account. + +### 2. Add a second account + +`ccswitch add` signs you in to another account and saves it in one step: + +```fish +ccswitch add work # runs `claude auth login`, then saves it as "work" +``` + +
+Prefer to do it by hand? + +```fish +claude auth login # sign in as the other account (or switch org via /login) +ccswitch save work +``` +
+ +Both are now saved: + +```fish +ccswitch list +# personal you@gmail.com +# * work you@company.com (Acme) +``` + +### 3. Switch and work — the daily loop + +```fish +ccswitch work # become "work" and start a claude session +ccswitch personal -c # become "personal", continue the last conversation +ccswitch use work # just switch, don't launch anything +ccswitch current # you@company.com (Acme) +``` + +One command becomes an account and drops you into a session. Switching also +re-snapshots the account you're leaving, so rotating tokens never go stale. + +### 4. Run two accounts at the same time + +Steps 1–3 swap one machine-global account (sequential — one at a time). To keep +**two live sessions as different accounts concurrently**, use isolated profiles +with shared memory: + +```fish +ccswitch seed # once: copy your ~/.claude memory + history into shared/ +ccswitch isolate work # terminal 1 — sign in once as work +ccswitch isolate personal # terminal 2 — sign in once as personal, at the same time +``` + +Each isolated session has its own credential but shares project memory and +history. Re-running `ccswitch isolate ` reuses the earlier login. (If you +skip `seed`, the first `isolate` warns that memory is empty and asks to confirm.) + ### Same login, multiple orgs If one login (e.g. a Claude Team account) belongs to several organizations,