@youdie006/swapdex 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -8
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  </div>
10
10
 
11
- One command to flip your Claude Code or Codex CLI from your work account to your
12
- personal one, and back. No re-login, no browser, no copying tokens around.
13
- 100% local. Never touches the network.
11
+ One command to flip your Claude Code, Codex, Gemini CLI, or Antigravity from
12
+ your work account to your personal one, and back. No re-login, no browser, no copying
13
+ tokens around. 100% local. Never touches the network.
14
14
 
15
15
  <div align="center">
16
16
  <img src="https://raw.githubusercontent.com/youdie006/swapdex/main/docs/demo.gif" alt="swapdex demo: ls, use personal, status, restore, doctor" width="760" />
@@ -20,7 +20,8 @@ personal one, and back. No re-login, no browser, no copying tokens around.
20
20
 
21
21
  ## Why
22
22
 
23
- If you run Claude Code or Codex under more than one account -- a work seat and a
23
+ If you run Claude Code, Codex, Gemini CLI, or Antigravity under more than one
24
+ account -- a work seat and a
24
25
  personal subscription, a client's org and your own -- switching means logging
25
26
  out and back in every time. swapdex snapshots each logged-in account once, then
26
27
  swaps between them in place: the running CLI picks up the new account on your
@@ -133,12 +134,14 @@ been using each tool lately, so you know when to switch to a fresher account:
133
134
  ```
134
135
  Local usage - this machine, approximate (not the billed quota):
135
136
  claude-code 5h: 8.2M tok / 12 sess 7d: 61.4M tok / 88 sess
136
- codex 5h: 1.1M tok / 3 sess 7d: 9.7M tok / 24 sess
137
+ @work 5h: 6.0M tok 7d: 40.1M tok
138
+ @personal 5h: 2.2M tok 7d: 19.3M tok
137
139
  ```
138
140
 
139
- It sums tokens from `~/.claude` and `~/.codex` transcripts, which are not tagged
140
- by account, so this is a machine-wide activity gauge rather than a per-account
141
- balance -- deliberately a hint, not a quota-dodging auto-rotator.
141
+ Once a switch history exists, tokens are attributed to the profile active at
142
+ each event's timestamp (the same honest join `sessions` uses); anything before
143
+ your first switch stays untagged. Still deliberately a hint, not a
144
+ quota-dodging auto-rotator.
142
145
 
143
146
  ## How it works
144
147
 
@@ -147,6 +150,8 @@ Each CLI keeps its login in a small on-disk file:
147
150
  - Claude Code: `~/.claude/.credentials.json` plus the `oauthAccount` block inside
148
151
  `~/.claude.json`
149
152
  - Codex: `~/.codex/auth.json`
153
+ - Gemini CLI: `~/.gemini/oauth_creds.json` plus `~/.gemini/google_accounts.json`
154
+ - Antigravity: `~/.gemini/antigravity-cli/antigravity-oauth-token`
150
155
 
151
156
  `add` copies the current login into a private store at
152
157
  `~/.local/share/swapdex`. `use` writes a saved snapshot back into place
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youdie006/swapdex",
3
- "version": "0.4.2",
4
- "description": "Switch between multiple Claude Code and Codex login accounts, locally and safely.",
3
+ "version": "0.6.0",
4
+ "description": "Switch between multiple Claude Code, Codex, Gemini, and Antigravity login accounts, locally and safely.",
5
5
  "bin": {
6
6
  "swapdex": "bin/swapdex.js"
7
7
  },
@@ -18,6 +18,8 @@
18
18
  "cli",
19
19
  "claude",
20
20
  "codex",
21
+ "gemini",
22
+ "antigravity",
21
23
  "accounts",
22
24
  "credentials"
23
25
  ],