clausona 0.0.0-stage → 0.14.0-beta
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.
- package/LICENSE +21 -0
- package/README.md +541 -2
- package/clausona.js +899 -0
- package/package.json +33 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 larcane97
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,542 @@
|
|
|
1
|
-
#
|
|
1
|
+
# clausona
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Switch between Claude Code and OpenAI Codex CLI accounts without logging out while keeping the same conversation. Each account stays signed in separately and shares a single setup. Dynamic routing optimizes usage across your accounts by starting each run on one with room, and clausona shows which skills, MCP servers and hooks each account loads. Under the hood, it's just a shell hook and symlinks, with no daemon or proxy.**
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/hesreallyhim/awesome-claude-code"><img src="https://img.shields.io/badge/Mentioned%20in-Awesome%20Claude%20Code-fc60a8?style=for-the-badge&logo=awesomelists&logoColor=white" alt="Mentioned in Awesome Claude Code" /></a>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/larcane97/clausona/releases/latest"><img src="https://img.shields.io/github/v/release/larcane97/clausona?include_prereleases&label=release" alt="Latest release" /></a>
|
|
11
|
+
<a href="https://github.com/larcane97/clausona/actions/workflows/ci.yml"><img src="https://github.com/larcane97/clausona/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
|
|
12
|
+
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-blue" alt="Platforms: macOS, Linux, Windows" />
|
|
13
|
+
<a href="https://github.com/larcane97/clausona/blob/v0.14.0-beta/LICENSE"><img src="https://img.shields.io/github/license/larcane97/clausona" alt="MIT license" /></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://raw.githubusercontent.com/larcane97/clausona/v0.14.0-beta/assets/demo.gif" alt="clausona listing Claude Code and Codex accounts with their plan quota, switching to the work account so that plain claude starts signed in as it, switching back, and opening the dashboard" width="800" />
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
clausona is a profile manager for the Claude Code and OpenAI Codex CLIs. Every account gets a
|
|
21
|
+
config directory for its sign-in. Skills, hooks, plugins and settings are shared across them, so
|
|
22
|
+
`csn use work` is all it takes to move to another account.
|
|
23
|
+
|
|
24
|
+
Conversation history stays with the account unless you choose to share it. Once it's shared, a
|
|
25
|
+
conversation started under one account can be resumed under another.
|
|
26
|
+
|
|
27
|
+
clausona also shows how much of each account's weekly plan limit remains side by side, along with the remaining 5-hour limit on plans that have one.
|
|
28
|
+
|
|
29
|
+
Step-by-step guides, including how to do it by hand:
|
|
30
|
+
[multiple Claude Code accounts](https://larcane97.github.io/clausona/guides/multiple-claude-code-accounts/),
|
|
31
|
+
[multiple Codex CLI accounts](https://larcane97.github.io/clausona/guides/multiple-codex-cli-accounts/),
|
|
32
|
+
and [the same in Korean](https://larcane97.github.io/clausona/ko/). Another guide covers
|
|
33
|
+
[the skills, MCP servers and hooks each account loads](https://larcane97.github.io/clausona/guides/claude-code-skills-mcp-hooks/).
|
|
34
|
+
|
|
35
|
+
## Why
|
|
36
|
+
|
|
37
|
+
I've been using Claude Code with a personal and a work account, and I got tired of setting up
|
|
38
|
+
plugins and permissions for both. So I made a simple tool for it.
|
|
39
|
+
|
|
40
|
+
If you have Claude Code or OpenAI Codex CLI accounts for personal use, work or different orgs,
|
|
41
|
+
switching between them on one machine is tedious:
|
|
42
|
+
|
|
43
|
+
- **Switching is manual.** You log out and back in, or juggle `CLAUDE_CONFIG_DIR` (Claude) or `CODEX_HOME` (Codex) yourself.
|
|
44
|
+
- **Settings don't carry over.** A second account gets a separate config directory. Your plugins, permissions, settings and skills have to be set up from scratch, every time.
|
|
45
|
+
|
|
46
|
+
clausona fixes both. One command switches profiles, and your setup comes along.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
csn use work # switch to the work account
|
|
50
|
+
csn use codex:personal # switch to your personal Codex account too
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
You don't sign in again, and you don't reinstall plugins.
|
|
54
|
+
|
|
55
|
+
> `csn` is a shorthand alias for `clausona`, registered automatically on install.
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
- **One-command switching** — `clausona use <name>` and you're on a different account
|
|
60
|
+
- **Shared environment** — plugins (and the MCP servers they bring), skills, and settings.json with its hooks and permissions (Claude), and config.toml (MCP servers included), skills, and hooks (Codex) are symlinked across profiles within each tool. Set up once, use everywhere. MCP servers added with `claude mcp add` stay per account — [see the FAQ](#do-my-mcp-servers-plugins-and-settings-carry-over-when-i-switch).
|
|
61
|
+
- **Shared history, if you want** — `clausona config <profile> --merge-sessions` shares conversation history with your primary directory, so `claude --resume` and `claude --continue` (and `codex resume` on macOS and Linux) find conversations from every account that shares it
|
|
62
|
+
- **Plan quota at a glance** — weekly limit usage for every account, and the 5-hour session limit on plans that have one, read live from each tool's own usage endpoint (Claude and Codex)
|
|
63
|
+
- **Routing** — `clausona run --route main` starts on whichever account still has room, going by the same plan-quota readings. With a directory rule or a default route, a plain `clausona run claude` (or `codex`) picks the account on its own ([docs](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md))
|
|
64
|
+
- **Extensions** — the skills, MCP servers and hooks Claude Code and Codex load in a project, for every account, on the dashboard's Extensions screen or from `clausona skills`, `clausona mcp` and `clausona hooks`. Turn one off or delete it, behind a backup, and `undo` puts it back ([docs](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/extensions.md))
|
|
65
|
+
- **Two accounts at once** — `clausona run claude:personal` starts one session under another profile without switching, so two terminals can run two accounts side by side
|
|
66
|
+
- **Parallel agent fleets** — plugins from this repo let one Claude Code or Codex session run parallel agents in [Superset](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/superset-fleet.md), [herdr](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/herdr-fleet.md), [Orca](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/orca-fleet.md) or plain [tmux](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/tmux-fleet.md), each on its own account or API model, then check and clean up after them. Install only the one for the tool you use
|
|
67
|
+
- **API profiles** — a profile can point at an API endpoint instead of a subscription login: the Anthropic API, a gateway, or a model you serve yourself
|
|
68
|
+
- **Pure CLI passthrough** — no wrapping, no proxying, no background process. `claude` and `codex` run directly and unmodified. Compatible with oh-my-claudecode, Cline, codex plugins, and any other tool in your stack.
|
|
69
|
+
- **Lightweight** — a single shell hook and a few symlinks. No daemon, no server, and no startup overhead: `claude` and `codex` start from a small cached script, and clausona itself runs only when something changed — a profile switch, a plugin install — or for a profile it can't cache, such as an API profile ([details](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/how-it-works.md#the-launch-cache)).
|
|
70
|
+
- **Usage tracking** — per-profile cost and token usage, tracked locally (Claude Code only for now)
|
|
71
|
+
- **Interactive dashboard** — TUI for managing profiles and routes, viewing usage, and running health checks
|
|
72
|
+
|
|
73
|
+
## Install
|
|
74
|
+
|
|
75
|
+
**Requirements:** Node.js >= 20, and at least one of:
|
|
76
|
+
|
|
77
|
+
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code)
|
|
78
|
+
- [OpenAI Codex CLI](https://github.com/openai/codex)
|
|
79
|
+
|
|
80
|
+
**Platforms:** macOS/Linux (zsh or bash) and Windows (PowerShell 5.1+)
|
|
81
|
+
|
|
82
|
+
macOS/Linux:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
curl -fsSL https://github.com/larcane97/clausona/releases/latest/download/install.sh | bash
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Piping to `bash` does not read your shell profile, so if Node comes from a version
|
|
89
|
+
manager (nvm, fnm, asdf), activate it before running the command.
|
|
90
|
+
|
|
91
|
+
Windows PowerShell:
|
|
92
|
+
|
|
93
|
+
```powershell
|
|
94
|
+
irm https://github.com/larcane97/clausona/releases/latest/download/install.ps1 | iex
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
With npm, on any of these platforms:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm install -g clausona
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
npm does not touch your shell profile, so add the shell hook yourself, then open a new shell. The
|
|
104
|
+
hook is what makes a plain `claude` or `codex` start on the profile you switched to, and it defines
|
|
105
|
+
`csn`. On zsh or bash, add this line to `~/.zshrc` or `~/.bashrc`:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
eval "$(clausona shell-init)"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
On PowerShell, add this line to the profile file that `$PROFILE.CurrentUserAllHosts` names:
|
|
112
|
+
|
|
113
|
+
```powershell
|
|
114
|
+
Invoke-Expression (& clausona shell-init | Out-String)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
To remove a copy installed with npm, run `clausona uninstall` first, then `npm uninstall -g clausona`.
|
|
118
|
+
|
|
119
|
+
**Updating.** When a newer release is out, the dashboard (`csn`) says so in its header and lists
|
|
120
|
+
**Update** above Profiles; choose it and answer `Y`, and csn restarts on the new version. From a
|
|
121
|
+
script or another shell, `clausona update` does the same (`--yes` skips the question). Other
|
|
122
|
+
commands you run in a terminal, such as `clausona list`, ask after their output:
|
|
123
|
+
`Update now? (Y/n)`. Any key but `y` or Enter, or no answer within ten seconds, and they leave it
|
|
124
|
+
for a week, as they do after a no on the dashboard or to `clausona update`. They learn about a
|
|
125
|
+
release from a check that runs in the background at most once a day, so no command waits for
|
|
126
|
+
GitHub; a yes asks GitHub again first, so it installs the latest release. However you update,
|
|
127
|
+
the download is checked against the release's published SHA-256 before the installed copy is
|
|
128
|
+
replaced. Only a copy the installer put in place updates itself. For a copy installed with npm,
|
|
129
|
+
`clausona update`, the dashboard and the question after commands say to run
|
|
130
|
+
`npm install -g clausona@latest` instead. Any other copy is pointed at the installer.
|
|
131
|
+
|
|
132
|
+
**After upgrading, open a new shell** — or re-run the hook in each shell that is already open:
|
|
133
|
+
`eval "$(clausona shell-init)"` on zsh/bash, `Invoke-Expression (& clausona shell-init | Out-String)`
|
|
134
|
+
on PowerShell. A shell keeps the hook it loaded when it started, and an older hook can apply less
|
|
135
|
+
than the version you just installed: one from before API profiles sets only the config directory,
|
|
136
|
+
with no endpoint and no key.
|
|
137
|
+
|
|
138
|
+
## Quick Start
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
clausona init # discover existing Claude Code and Codex accounts
|
|
142
|
+
clausona use work # switch to a profile (bare name if unique)
|
|
143
|
+
clausona use claude:work # switch claude account (use prefix when both tools have "work")
|
|
144
|
+
clausona add codex:work # add a codex profile
|
|
145
|
+
clausona use codex:personal # switch codex account
|
|
146
|
+
clausona list # see all profiles with plan quota and weekly usage
|
|
147
|
+
clausona # open the interactive dashboard
|
|
148
|
+
|
|
149
|
+
clausona add claude:gw --api --base-url https://openrouter.ai/api # a profile backed by an API endpoint
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
clausona starts from an account that is already signed in, Claude Code or Codex: `clausona init`
|
|
153
|
+
registers the accounts it finds and refuses when there are none, and until it has run the other
|
|
154
|
+
commands say "clausona is not initialized". On a machine where neither has been signed in, run
|
|
155
|
+
`claude login` or `codex login` once first. [API profiles](#api-profiles) are added next to a Claude
|
|
156
|
+
Code account, so they need `claude login` once even if you will use only API profiles.
|
|
157
|
+
|
|
158
|
+
## Plan quota
|
|
159
|
+
|
|
160
|
+
`clausona list` and the dashboard show how much of each account's plan limits are
|
|
161
|
+
already spent, so you can pick a profile that still has headroom.
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
PROFILE ACCOUNT 5H 7D
|
|
165
|
+
claude:work you@example.com 6% 23m 46% 13h
|
|
166
|
+
claude:personal you@personal.com 0% 100% 4d
|
|
167
|
+
codex:work you@example.com none 12% 5d
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`5H` is the rolling session window, `7D` the weekly one, each followed by how long
|
|
171
|
+
until it resets. A plan without a 5-hour limit, such as a verified Claude Ultra plan or some
|
|
172
|
+
Codex plans, shows `none` under `5H`, and when no account has a 5-hour limit the column is left
|
|
173
|
+
out. The dashboard shows the same reading with a gauge and the precise
|
|
174
|
+
reset time, plus the most-consumed per-model limit.
|
|
175
|
+
|
|
176
|
+
Readings come from each tool's own usage endpoint, authenticated with the credential that
|
|
177
|
+
tool already stored for that profile. For subscription profiles clausona holds no token of
|
|
178
|
+
its own. Results are cached for 5 minutes; `--refresh` forces a re-read and `--no-quota`
|
|
179
|
+
skips the network entirely.
|
|
180
|
+
|
|
181
|
+
How lapsed tokens are renewed, and what a dash in the table means:
|
|
182
|
+
**[docs/plan-quota.md](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/plan-quota.md)**.
|
|
183
|
+
|
|
184
|
+
## Routing
|
|
185
|
+
|
|
186
|
+
You can let clausona choose the account. A route is a named group of accounts and a rule for
|
|
187
|
+
picking one of them by plan quota:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
clausona route add main # every Claude Code account, taking turns
|
|
191
|
+
clausona route explain main # who would be picked now, and why
|
|
192
|
+
clausona run --route main -- -p "run the tests"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The run says on stderr which account it got:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
▸ claude:work route main, next in turn, 34% of 7D used
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
<p align="center">
|
|
202
|
+
<img src="https://raw.githubusercontent.com/larcane97/clausona/v0.14.0-beta/assets/routing.gif" alt="clausona route explain main listing three Claude Code accounts with their 5-hour and weekly usage, personal over 80% and work picked next; clausona run --route main saying it took claude:work and opening Claude Code, whose /status shows the work account; the same command again taking claude:team, the next in turn" width="800" />
|
|
203
|
+
</p>
|
|
204
|
+
|
|
205
|
+
By default an account at 80% or more of its 5-hour or weekly limit is used only when no other
|
|
206
|
+
account in the route is under 80%. Then the one with the most left is picked, even at 99%. Only
|
|
207
|
+
when every account is at 100%, or skipped because it is signed out or its quota could not be
|
|
208
|
+
read, does clausona say when each one resets or why it was skipped, and exit with code 75
|
|
209
|
+
instead of starting a session. With `--wait` it waits for the soonest reset instead, up to 5
|
|
210
|
+
hours or the cap you give, and then runs. That suits scripts and cron:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
clausona run --route main --wait=2h -- -p "run the nightly review"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
When the tool's arguments name a model, as in `-- --model opus`, an account's limit on that
|
|
217
|
+
model counts too, so an account whose Opus limit is used up is not picked for an Opus run.
|
|
218
|
+
|
|
219
|
+
A route is for Claude Code unless you say otherwise. `--tool codex` makes a Codex route, and
|
|
220
|
+
`--tool all` makes one that takes the accounts of both tools. `clausona route` on its own opens
|
|
221
|
+
the Routes screen, where you can look through your routes and create or edit one in a form. It
|
|
222
|
+
is also on the dashboard, under Profiles.
|
|
223
|
+
|
|
224
|
+
You can also skip `--route` and let the directory decide:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
clausona route dir ~/work work # in ~/work and below, clausona run claude takes route work
|
|
228
|
+
clausona route default main # everywhere else, it takes route main
|
|
229
|
+
clausona route explain # what a run here would take, and why
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
With neither, `clausona run claude` runs the active profile, as it always has.
|
|
233
|
+
|
|
234
|
+
An API profile can join a route too, once it has a spend limit. It is billed per use, so a route
|
|
235
|
+
takes it only by its exact name, never through `*`. Its usage is its spend against the limit, read
|
|
236
|
+
from the provider (OpenRouter, or a LiteLLM proxy):
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
clausona route budget claude:gw --usd 20 --per month # or use the limit set on the key itself
|
|
240
|
+
clausona route set main --add claude:gw
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
A budget stops new routed sessions, not one already running; the limit on the provider key is
|
|
244
|
+
what blocks requests.
|
|
245
|
+
|
|
246
|
+
Patterns like `*@example.com`, fallbacks, the strategies, waiting in scripts, budgets, and the
|
|
247
|
+
JSON that scripts and agents read: **[docs/routing.md](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md)**.
|
|
248
|
+
|
|
249
|
+
## API profiles
|
|
250
|
+
|
|
251
|
+
A profile can be backed by an API endpoint instead of a subscription login — the Anthropic
|
|
252
|
+
API, a gateway such as OpenRouter, or a model you serve yourself. It sits beside your
|
|
253
|
+
subscription profiles in `clausona list`, switches the same way, and shares the same
|
|
254
|
+
plugins and settings. In this version API profiles are for Claude Code only.
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
# a hosted gateway
|
|
258
|
+
clausona add claude:gw --api \
|
|
259
|
+
--base-url https://openrouter.ai/api \
|
|
260
|
+
--model z-ai/glm-5.3
|
|
261
|
+
|
|
262
|
+
# a model you serve yourself
|
|
263
|
+
clausona add claude:local --api \
|
|
264
|
+
--base-url http://localhost:8000 \
|
|
265
|
+
--model glm-5.3 \
|
|
266
|
+
--set CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144 \
|
|
267
|
+
--set API_TIMEOUT_MS=600000
|
|
268
|
+
|
|
269
|
+
clausona use claude:gw
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The key is never passed as an argument. By default it is read from a prompt that does not
|
|
273
|
+
echo it, or from stdin, and stored in the macOS Keychain or `~/.clausona/secrets.json`; with
|
|
274
|
+
`--key-from env:NAME` or `--key-from command:"op read …"` clausona records only where to find
|
|
275
|
+
it and reads it at each launch.
|
|
276
|
+
|
|
277
|
+
**An `api-key` profile's first `claude` session asks about the key — answer Yes.** Claude
|
|
278
|
+
Code shows "Detected a custom API key in your environment" with the cursor on
|
|
279
|
+
"No (recommended)", so pressing Enter answers No, and that profile then ignores its key.
|
|
280
|
+
`/config` → "Use custom API key" changes the answer later. A `bearer` profile is not asked.
|
|
281
|
+
|
|
282
|
+
The model, where the key lives, per-profile settings, changing the endpoint, and what
|
|
283
|
+
clausona hides or clears from the environment: **[docs/api-profiles.md](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/api-profiles.md)**.
|
|
284
|
+
|
|
285
|
+
## Extensions
|
|
286
|
+
|
|
287
|
+
`csn skills`, `csn mcp` and `csn hooks` list the skills, MCP servers and hooks that Claude Code
|
|
288
|
+
and Codex load, for every account, seen from one project. The dashboard's Extensions screen
|
|
289
|
+
shows the same. Secret values are never shown.
|
|
290
|
+
|
|
291
|
+
<p align="center">
|
|
292
|
+
<img src="https://raw.githubusercontent.com/larcane97/clausona/v0.14.0-beta/assets/extensions.gif" alt="The dashboard's Extensions screen listing the skills Claude Code loads in ~/app, grouped by project, Global, Cloud and plugins; sentry-cli, unused for four months, turned off in this project after a dialog that asks first, then put back with u; then the MCP servers and which account starts each one" width="800" />
|
|
293
|
+
</p>
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
csn skills ls --scope project # the skills this project defines
|
|
297
|
+
csn skills ls --scope unused --tool claude # Claude skills not used in 90 days
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
`ls` lists one scope, by default what loads in this project; `show <name>` tells everything
|
|
301
|
+
about one item, such as which accounts have an MCP server and whether it is on here. Both only
|
|
302
|
+
read files.
|
|
303
|
+
|
|
304
|
+
`off`, `on`, `rm` and `undo` change things, each after a confirm step and behind a backup:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
csn skills rm old-one --dry-run # what deleting it would change
|
|
308
|
+
csn mcp off github --account work # off in this project, for one account
|
|
309
|
+
csn skills undo # put back the last skills change
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
The screen does the same with keys. Add `--json` for scripts and coding agents.
|
|
313
|
+
|
|
314
|
+
Scopes, tags, every option, what each change writes, the JSON fields and recipes for agents:
|
|
315
|
+
**[docs/extensions.md](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/extensions.md)**.
|
|
316
|
+
|
|
317
|
+
## Commands
|
|
318
|
+
|
|
319
|
+
`<profile>` accepts either a bare name (e.g. `work`) when it is unique across all tools, or a `tool:name` prefix (e.g. `claude:work`, `codex:work`) when disambiguation is needed.
|
|
320
|
+
|
|
321
|
+
| Command | Description |
|
|
322
|
+
| ------------------------------------------------------------------- | ---------------------------------------------------- |
|
|
323
|
+
| `clausona` | Interactive TUI dashboard |
|
|
324
|
+
| `clausona init` | Discover and register Claude Code and Codex accounts |
|
|
325
|
+
| `clausona add <profile> [--from <path>] [--merge-sessions]` | Add a profile manually |
|
|
326
|
+
| `clausona add <profile> --api --base-url <url> [...]` | Add an [API profile](#api-profiles) |
|
|
327
|
+
| `clausona remove <profile>` | Remove a profile. Its config directory and history stay, so delete that directory before adding the name again |
|
|
328
|
+
| `clausona use [profile]` | Switch active profile |
|
|
329
|
+
| `clausona run <profile> [-- args...]` | Run the tool's CLI with a specific profile (a leading `--` is dropped) |
|
|
330
|
+
| `clausona run --route <name> [-- args...]` | Run on the account a [route](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md) picks |
|
|
331
|
+
| `clausona route add\|set\|rename\|remove\|edit\|list\|explain\|pick …` | Manage [routes](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md) |
|
|
332
|
+
| `clausona route dir\|default …` | Pick a route by directory, or by default, for a plain `clausona run claude` ([dir rules](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md#dir-rules-and-defaults)) |
|
|
333
|
+
| `clausona route budget [<profile>] …` | List or set API profiles' spend limits, so they can join routes ([budgets](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md#api-profiles-in-routes)) |
|
|
334
|
+
| `clausona route` | Open the [Routes screen](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md#the-routes-screen) (in a terminal) |
|
|
335
|
+
| `clausona list [--json] [--refresh] [--no-quota] [--no-renew]` | List all profiles with plan quota and usage |
|
|
336
|
+
| `clausona usage [profile] [--period=today\|week\|month\|all]` | View cost and token usage |
|
|
337
|
+
| `clausona current [--json]` | Show active profile |
|
|
338
|
+
| `clausona config <profile> --merge-sessions \| --separate-sessions` | Configure session mode |
|
|
339
|
+
| `clausona config <profile> --model <id>` | Change a profile's [model](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/api-profiles.md#the-model) |
|
|
340
|
+
| `clausona config <profile> --set KEY=VALUE \| --unset KEY \| --edit` | Set [advanced settings](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/api-profiles.md#advanced-settings) per profile |
|
|
341
|
+
| `clausona config <profile> --base-url <url> \| --auth <scheme> \| --label <name>` | [Change an API profile's endpoint](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/api-profiles.md#changing-the-endpoint) |
|
|
342
|
+
| `clausona config <profile> --key \| --key-from <source>` | Change an API profile's key, or where it is read from |
|
|
343
|
+
| `clausona config <profile> --show [--json]` | Print a profile's settings (`--json` adds the catalog) |
|
|
344
|
+
| `clausona doctor [--json]` | Check profile health |
|
|
345
|
+
| `clausona skills ls\|show\|off\|on\|rm` | Skills each project loads; turn them off or delete them |
|
|
346
|
+
| `clausona mcp ls\|show\|off\|on\|rm` | MCP servers each project loads; turn them off or delete them |
|
|
347
|
+
| `clausona hooks ls\|show\|off\|on\|rm` | Hooks each project runs; turn them off or delete them |
|
|
348
|
+
| `clausona repair <profile>` | Fix broken shared links |
|
|
349
|
+
| `clausona login <profile>` | Re-authenticate a profile |
|
|
350
|
+
| `clausona update [--yes]` | Update to the latest release (asks first; `--yes` skips) |
|
|
351
|
+
| `clausona star` | Star clausona on GitHub (through `gh`, or in your browser) |
|
|
352
|
+
| `clausona uninstall` | Uninstall clausona completely |
|
|
353
|
+
|
|
354
|
+
## How it works
|
|
355
|
+
|
|
356
|
+
`clausona use` only records which profile is active. The shell hook the installer adds wraps
|
|
357
|
+
`claude` and `codex`: on each launch it points the tool at the active profile's config
|
|
358
|
+
directory (`CLAUDE_CONFIG_DIR` or `CODEX_HOME`) for that one run, then runs the real,
|
|
359
|
+
unmodified binary. Your interactive shell is left as it was.
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
clausona use work
|
|
363
|
+
↓
|
|
364
|
+
claude ← wrapper applies the work profile's env, then runs claude
|
|
365
|
+
↓
|
|
366
|
+
_track-usage ← on exit, records any new cost/token usage
|
|
367
|
+
|
|
368
|
+
clausona use codex:personal
|
|
369
|
+
↓
|
|
370
|
+
codex ← wrapper applies the personal profile's env, then runs codex
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Each profile is its own config directory. Its sign-in and session history stay in it; the rest
|
|
374
|
+
links back to your primary directory, so what you set up once is there for every account:
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
~/.claude-work/ (new claude profile)
|
|
378
|
+
├── .claude.json ← own account metadata and `claude mcp add` servers (NOT shared)
|
|
379
|
+
├── .credentials.json ← own OAuth tokens outside macOS, and on macOS when the
|
|
380
|
+
│ Keychain refuses them (NOT shared)
|
|
381
|
+
├── projects/ ← own session history (NOT shared by default)
|
|
382
|
+
├── plugins/ ← own directory: each entry links to ~/.claude/plugins/, except
|
|
383
|
+
│ the two JSON files that hold paths, kept as per-profile copies
|
|
384
|
+
│ that a plugin install in any profile reaches
|
|
385
|
+
├── settings.json → ~/.claude/settings.json (symlink to primary)
|
|
386
|
+
└── ...
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
What Claude Code keeps for one account or org, such as its policy limits, remote managed settings,
|
|
390
|
+
MCP sign-in cache and background daemon, stays with each profile too ([the full
|
|
391
|
+
list](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/how-it-works.md#what-a-claude-profile-shares)). So do the daemon's scheduled tasks and
|
|
392
|
+
Remote Control folders: those set up on the primary stay with the primary, and a profile sets its
|
|
393
|
+
own.
|
|
394
|
+
|
|
395
|
+
Codex profiles share only their configuration: `config.toml`, `hooks.json`, `AGENTS.md`, `rules/`,
|
|
396
|
+
`skills/`, `plugins/`, `prompts/` and a few more. Everything else Codex keeps in its home, such as its
|
|
397
|
+
app-server daemon and its memories, stays with each account ([the full list](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/how-it-works.md#what-a-codex-profile-shares)).
|
|
398
|
+
|
|
399
|
+
clausona has no telemetry and no server of its own. Its network calls are each profile's
|
|
400
|
+
plan-quota lookup — and a lapsed token's renewal — against that profile's own provider, which
|
|
401
|
+
`clausona list --no-quota` skips, and the dashboard's check of GitHub for a newer clausona release.
|
|
402
|
+
|
|
403
|
+
Session separation, Windows links, how credentials are kept apart, what `doctor` and `repair`
|
|
404
|
+
look at, and where clausona stores its data: **[docs/how-it-works.md](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/how-it-works.md)**.
|
|
405
|
+
|
|
406
|
+
## How clausona compares
|
|
407
|
+
|
|
408
|
+
| | clausona | [claude-swap](https://github.com/realiti4/claude-swap) | [codex-auth](https://github.com/Loongphy/codex-auth) | [aisw](https://github.com/burakdede/aisw) | [claude-code-profiles](https://github.com/quinnjr/claude-code-profiles) |
|
|
409
|
+
| --- | --- | --- | --- | --- | --- |
|
|
410
|
+
| Claude Code | ✓ | ✓ | — | ✓ | ✓ |
|
|
411
|
+
| Codex CLI | ✓ | — | ✓ | ✓ | — |
|
|
412
|
+
| How it switches | a config directory per account | swaps the login inside one `~/.claude` | copies `auth.json` into `~/.codex` | writes each tool's own credential store, plus a config-dir shell hook | a config directory per profile, through a `claude()` wrapper |
|
|
413
|
+
| History kept per account, plugins and settings shared | ✓ | partly: `cswap run` sessions share settings and skills, not plugins | — (one `~/.codex` for all accounts) | — | skills only |
|
|
414
|
+
| Plan quota for every account | ✓ | ✓ | ✓ | — | — |
|
|
415
|
+
|
|
416
|
+
Compared from each project's README and docs in September 2026; — means we found no mention of
|
|
417
|
+
it. Corrections are welcome.
|
|
418
|
+
|
|
419
|
+
See the [guides site](https://larcane97.github.io/clausona/guides/claude-code-account-switchers/) for a fuller comparison covering ccam, ClaudeCodeMultiAccounts, ccswitch and Orca.
|
|
420
|
+
|
|
421
|
+
clausona is built around one idea: keep accounts apart where they have to be — sign-in and
|
|
422
|
+
history — and shared everywhere else, for Claude Code and Codex alike.
|
|
423
|
+
|
|
424
|
+
## FAQ
|
|
425
|
+
|
|
426
|
+
### How do I use two Claude Code accounts on one machine?
|
|
427
|
+
|
|
428
|
+
Sign in to the first account as usual (`claude login`) and run `clausona init` to register it.
|
|
429
|
+
Then `clausona add claude:work` creates a second profile and opens Claude Code's own sign-in
|
|
430
|
+
for it. From then on, `csn use work` and `csn use personal` choose which account `claude`
|
|
431
|
+
starts with. Each account keeps its own sign-in and history; plugins and settings are shared.
|
|
432
|
+
|
|
433
|
+
### How do I switch Codex CLI accounts without logging out?
|
|
434
|
+
|
|
435
|
+
`clausona add codex:work` creates a second Codex home (`~/.codex-work`) with its own
|
|
436
|
+
`auth.json`, signed in through Codex's own login. `csn use codex:work` makes `codex` start with
|
|
437
|
+
that account, and `csn use codex:personal` switches back. `config.toml`, skills and plugins stay
|
|
438
|
+
shared with your main `~/.codex`, and `codex resume` shows only the active account's sessions.
|
|
439
|
+
|
|
440
|
+
### Do my MCP servers, plugins and settings carry over when I switch?
|
|
441
|
+
|
|
442
|
+
Plugins — and the MCP servers they bring — `settings.json`, skills, commands and agents do:
|
|
443
|
+
they are linked to your primary config directory, so what you install under one account is
|
|
444
|
+
there under every account of that tool. MCP servers added with `claude mcp add` are the
|
|
445
|
+
exception: Claude Code keeps those in each config directory's own `.claude.json`, which
|
|
446
|
+
clausona does not share. Add them to each profile, or put
|
|
447
|
+
them in a project's `.mcp.json`. Sign-ins are never shared, and session history stays with each
|
|
448
|
+
account unless you merge sessions (below).
|
|
449
|
+
|
|
450
|
+
### Can I continue a conversation under another account?
|
|
451
|
+
|
|
452
|
+
Yes, once the accounts share history: `clausona config claude:work --merge-sessions` (or
|
|
453
|
+
`--merge-sessions` on `clausona add` and `clausona init`). For Claude Code that copies the account's
|
|
454
|
+
existing conversations into the primary's history first, so none are lost. Then `claude --resume`
|
|
455
|
+
lists conversations from every account that shares history, and `claude --continue` picks up the
|
|
456
|
+
latest one in the current folder, whichever account started it. For Codex on macOS and Linux,
|
|
457
|
+
`codex resume` and `codex resume --last` find threads from every such account, goals included; the
|
|
458
|
+
account's earlier Codex conversations are set aside in a backup rather than copied, and come back
|
|
459
|
+
with `--separate-sessions`. On Windows Codex's thread store stays with each account, so a thread
|
|
460
|
+
from another account is resumed by its id. `--separate-sessions` turns sharing off.
|
|
461
|
+
|
|
462
|
+
### Can I see Claude and Codex plan limits for all my accounts at once?
|
|
463
|
+
|
|
464
|
+
Yes. `clausona list` and the dashboard show every account's 7-day usage, and its 5-hour usage on
|
|
465
|
+
plans that have one, with the time until each resets, read from each tool's own usage endpoint with the credential that tool
|
|
466
|
+
already stored. Accounts you have not used today still report, because clausona renews a lapsed
|
|
467
|
+
access token when it needs to.
|
|
468
|
+
|
|
469
|
+
### Can clausona pick the account with quota left?
|
|
470
|
+
|
|
471
|
+
Yes. `clausona route add main` makes a route of every Claude Code account (`--tool codex` for
|
|
472
|
+
Codex, `--tool all` for both), and `clausona run --route main` starts on the next one in turn
|
|
473
|
+
that is under 80% of its limits.
|
|
474
|
+
With `--strategy headroom` it takes the account with the most room instead. After
|
|
475
|
+
`clausona route default main`, a plain `clausona run claude` does the same. See
|
|
476
|
+
[Routing](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/routing.md).
|
|
477
|
+
|
|
478
|
+
### Can I run two accounts at the same time?
|
|
479
|
+
|
|
480
|
+
Yes. `csn use` sets the account new `claude` and `codex` launches start with, and
|
|
481
|
+
`clausona run claude:personal` starts one session under another profile without changing that.
|
|
482
|
+
So one terminal can run your work account while another runs `clausona run claude:personal`.
|
|
483
|
+
|
|
484
|
+
### Can each Superset, herdr, Orca or tmux agent run on a different account?
|
|
485
|
+
|
|
486
|
+
Yes. Start each one with `clausona run <profile> -- <args>`: as a custom agent's command in
|
|
487
|
+
Superset → Settings → Agents, or in any herdr pane, Orca terminal or tmux window. To have one
|
|
488
|
+
session split a job across several such agents, watch them and clean up after them, install the
|
|
489
|
+
plugin for your tool:
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
claude plugin marketplace add larcane97/clausona
|
|
493
|
+
claude plugin install superset-fleet@clausona # or herdr-fleet, orca-fleet, tmux-fleet
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
In Codex, add the shared rules too: `codex plugin marketplace add larcane97/clausona`, then
|
|
497
|
+
`codex plugin add fleet-core@clausona` and the runner's plugin. See the
|
|
498
|
+
[Superset](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/superset-fleet.md), [herdr](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/herdr-fleet.md),
|
|
499
|
+
[Orca](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/orca-fleet.md) and [tmux](https://github.com/larcane97/clausona/blob/v0.14.0-beta/docs/usecases/tmux-fleet.md) pages. If you
|
|
500
|
+
installed `clausona@clausona` before, run `claude plugin install superset-fleet@clausona` once
|
|
501
|
+
after updating it.
|
|
502
|
+
|
|
503
|
+
### How is this different from setting `CLAUDE_CONFIG_DIR` myself?
|
|
504
|
+
|
|
505
|
+
A shell alias per account gives you separate sign-ins, but each directory starts empty: plugins,
|
|
506
|
+
settings and skills have to be installed again in every one, and they drift apart afterwards.
|
|
507
|
+
clausona links them to one primary directory, shows every account's plan quota in one place,
|
|
508
|
+
and `clausona doctor` and `repair` spot and link the directories a newer Claude Code version
|
|
509
|
+
adds.
|
|
510
|
+
|
|
511
|
+
### Does clausona wrap or proxy `claude` and `codex`?
|
|
512
|
+
|
|
513
|
+
No. The shell hook sets the profile's environment for one run and executes the real `claude` or
|
|
514
|
+
`codex` binary, unmodified. There is no daemon and no proxy. If you export `CLAUDE_CONFIG_DIR` or
|
|
515
|
+
`CODEX_HOME` yourself, clausona steps aside for that shell.
|
|
516
|
+
|
|
517
|
+
### Can I use an API key, OpenRouter, or a self-hosted model as a profile?
|
|
518
|
+
|
|
519
|
+
Yes, for Claude Code: `clausona add claude:gw --api --base-url <url>` creates a profile backed
|
|
520
|
+
by any endpoint that speaks the Anthropic Messages format. It switches like any other profile.
|
|
521
|
+
See [API profiles](#api-profiles). Codex API profiles are not supported yet.
|
|
522
|
+
|
|
523
|
+
### Does it work on Windows?
|
|
524
|
+
|
|
525
|
+
Yes, with PowerShell 5.1 or later. Shared directories use junctions. Turn on Developer Mode so
|
|
526
|
+
shared files can be symbolic links: without it, files the tools save whole (`settings.json`,
|
|
527
|
+
`CLAUDE.md`, `keybindings.json`, and Codex's `config.toml` and `hooks.json`) stay a copy per
|
|
528
|
+
account, and `clausona doctor` says so. Other files fall back to hard links.
|
|
529
|
+
|
|
530
|
+
## Listed in
|
|
531
|
+
|
|
532
|
+
[Awesome Claude Code](https://github.com/hesreallyhim/awesome-claude-code), [Awesome AI Plugins](https://github.com/hashgraph-online/awesome-ai-plugins), [Awesome CLI Coding Agents](https://github.com/bradAGI/awesome-cli-coding-agents)
|
|
533
|
+
|
|
534
|
+
## Contributing
|
|
535
|
+
|
|
536
|
+
Issues and pull requests are welcome at [github.com/larcane97/clausona](https://github.com/larcane97/clausona).
|
|
537
|
+
|
|
538
|
+
If clausona saves you a few logins a day, a ⭐ on the repo helps other people find it.
|
|
539
|
+
|
|
540
|
+
## License
|
|
541
|
+
|
|
542
|
+
MIT
|