xclaude-cli 0.1.3 → 0.2.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 (3) hide show
  1. package/README.md +7 -4
  2. package/dist/xclaude.js +1059 -409
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,11 +29,11 @@ Update with `npm i -g xclaude-cli@latest`; xclaude checks npm once a day and pri
29
29
  |---|---|
30
30
  | `xclaude <account> [claude args…]` | Claude Code as that account; every argument goes to `claude` |
31
31
  | `xclaude [claude flags…]` | the same, after picking the account (↑/↓, 1–9, Enter; Esc cancels) |
32
- | `xclaude add <name> [--model M] [--effort E] [--args "…"]` | add an account, then log in with `/login` |
33
- | `xclaude set <name> [--model M] [--effort E] [--args "…"] [--unset model\|effort\|args]` | change an account's defaults; with no options, show them |
32
+ | `xclaude add <name> [--model M] [--effort E] [--args "…"] [--inherit on\|off]` | add an account, then log in with `/login`; first it asks whether the account takes `~/.claude`'s setup (`--inherit` answers up front) |
33
+ | `xclaude set <name> [--model M] [--effort E] [--args "…"] [--unset model\|effort\|args] [--inherit on\|off\|reset]` | change an account's defaults; with no options, show them. `--inherit on\|off` changes whether it takes `~/.claude`'s setup |
34
34
  | `xclaude set main --enable\|--disable` | use the login in `~/.claude` (plain `claude`'s) as the account `main` |
35
35
  | `xclaude ls` | accounts with their login, defaults and config dir |
36
- | `xclaude rm <name> [--keep-login] [-y]` | remove an account and log it out; its folder keeps only its links, so its old conversations still open their saved long outputs. Run it on the name again to delete that folder (only while it holds nothing but links) |
36
+ | `xclaude rm <name> [--keep-login] [-y]` | remove an account and log it out; its folder keeps its links, so its old conversations still open their saved long outputs, and files of its own, such as a `CLAUDE.md` you edited with `/memory`. Run it on the name again to delete that folder (only once it holds nothing but links) |
37
37
  | `xclaude rm --leftovers [-y]` | delete the leftover folders of all removed accounts, after a confirmation |
38
38
  | `xclaude tmux new\|attach\|ls\|kill` | Claude Code in tmux sessions, by label |
39
39
  | `xclaude shell install\|uninstall [--bash] [--zsh]` | completion (and the guard) in your shell |
@@ -66,7 +66,10 @@ xclaude's options (`--dir`, `--detach`, `--empty`) come right after the label, a
66
66
  ## What's shared
67
67
 
68
68
  - **Shared by all accounts:** conversations and their checkpoints (`projects`, `file-history`), prompt history, task lists, plans, running-session info, personal skills, agents, commands, rules, output styles, hooks and plugins, and `~/.claude/CLAUDE.md`.
69
- - **Per account:** the login, `.claude.json` (MCP servers, folder trust), `settings.json` (so plugins, hooks and the statusline are enabled per account), keybindings, background sessions and caches.
69
+ - **Per account:** the login, `.claude.json` (MCP servers, folder trust), `settings.json` (so plugins and the statusline can differ per account), keybindings, background sessions and caches. The MCP servers you added to `~/.claude.json` with `claude mcp add --scope user` still reach every account that takes `~/.claude`'s setup: each launch passes them with `--mcp-config`, and an account's own server of the same name wins (`xclaude <name> mcp list` shows only its own).
70
+ - **Asked once:** an account's first launch in a terminal (or `xclaude add`) shows what `~/.claude` would give it (settings, the plugins `~/.claude` has on, MCP servers) and asks whether it takes them. The answer is kept; `xclaude set <name> --inherit on|off` changes it. A launch without a terminal takes nothing until then and says once how to choose.
71
+ - **Taken from `~/.claude/settings.json`:** once the answer is yes, at every launch the account's `settings.json` takes what changed in `~/.claude/settings.json` since the last time: permission rules, hooks, auto mode and the rest, apart from login-bound settings (`env`, `apiKeyHelper` and the other credential helpers, `forceLoginMethod`, `forceLoginOrgUUID`) and `enabledPlugins`. What the account changed itself stays, so a rule it added or removed stays that way, and one you remove from `~/.claude/settings.json` goes from the accounts too. `~/.claude/settings.json` itself is never written. `xclaude set <name> --inherit off` stops it and takes back what the account took and hasn't changed; `--inherit reset` takes everything again.
72
+ - **Plugins:** a plugin installed under another login shows in an account's `/plugin` from its next launch: on when `~/.claude` has it on (in an account that takes `~/.claude`'s setup), off otherwise. Until you change such an entry, it follows `~/.claude` turning the plugin on or off; once you do, it's yours. Uninstalling a plugin removes it for every login. For the `~/.claude` login, turn on a plugin an account installed with `claude plugin enable <plugin>`.
70
73
 
71
74
  Sharing works by linking each account's directories into `~/.claude`, which plain `claude` keeps using as before. Don't open the same conversation in two terminals at once. Scripts can read `XCLAUDE_ACCOUNT` to show the account, for example in a statusline.
72
75