claude-use 6.2.2 → 7.1.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.
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
- # claude-use
1
+ # agent-shim
2
2
 
3
- [![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white)](https://github.com/ExaDev/claude-use) [![npm](https://img.shields.io/badge/npm-CB3837?logo=npm&logoColor=white)](https://www.npmjs.com/package/claude-use) [![Release](https://img.shields.io/github/v/release/ExaDev/claude-use)](https://github.com/ExaDev/claude-use/releases/latest) [![CI](https://img.shields.io/github/actions/workflow/status/ExaDev/claude-use/ci.yml?branch=main)](https://github.com/ExaDev/claude-use/actions) [![Homebrew](https://img.shields.io/badge/Homebrew-FBB040?logo=homebrew&logoColor=white)](https://github.com/ExaDev/homebrew-claude-use) [![Scoop](https://img.shields.io/badge/Scoop-205081?logo=data:image/svg%2Bxml%3Bbase64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTExIDJoMnY5aC0yek0xMiAyMmE3IDcgMCAwIDAgNy03SDVhNyA3IDAgMCAwIDcgN3oiIGZpbGw9IiNmZmYiLz48L3N2Zz4K&logoColor=white)](https://github.com/ExaDev/scoop-claude-use)
3
+ [![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white)](https://github.com/ExaDev/agent-shim) [![npm](https://img.shields.io/badge/npm-CB3837?logo=npm&logoColor=white)](https://www.npmjs.com/package/agent-shim) [![Release](https://img.shields.io/github/v/release/ExaDev/agent-shim)](https://github.com/ExaDev/agent-shim/releases/latest) [![CI](https://img.shields.io/github/actions/workflow/status/ExaDev/agent-shim/ci.yml?branch=main)](https://github.com/ExaDev/agent-shim/actions) [![Homebrew](https://img.shields.io/badge/Homebrew-FBB040?logo=homebrew&logoColor=white)](https://github.com/ExaDev/homebrew-agent-shim) [![Scoop](https://img.shields.io/badge/Scoop-205081?logo=data:image/svg%2Bxml%3Bbase64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTExIDJoMnY5aC0yek0xMiAyMmE3IDcgMCAwIDAgNy03SDVhNyA3IDAgMCAwIDcgN3oiIGZpbGw9IiNmZmYiLz48L3N2Zz4K&logoColor=white)](https://github.com/ExaDev/scoop-agent-shim)
4
4
 
5
5
  A profile manager and launcher for [Claude Code](https://claude.com/claude-code) that lets one person run multiple logins from one machine while controlling — precisely, and per working directory — what gets shared between them.
6
6
 
7
- [![npm downloads chart, log scale](https://shieldcn.dev/chart/npm/claude-use.svg?bg=transparent&logo=false&yScale=log)](https://www.npmjs.com/package/claude-use)
7
+ [![npm downloads chart, log scale](https://shieldcn.dev/chart/npm/agent-shim.svg?bg=transparent&logo=false&yScale=log)](https://www.npmjs.com/package/agent-shim)
8
8
 
9
9
  ## The problem
10
10
 
11
11
  Claude Code keeps everything it knows in one place: `~/.claude`. Skills, memory, conventions, but also every conversation transcript, session file, and task list you've ever produced, across every project you've ever touched. If you want a second login (a personal account alongside a work one, say) or you want to keep one client's work cleanly separated from another's, there's no built-in way to say "share the skills and conventions, but not the history" — it's all one directory, all or nothing.
12
12
 
13
- `claude-use` solves this with two independent things:
13
+ `agent-shim` solves this with two independent things:
14
14
 
15
15
  - **An identity** is a login. It's the thing that owns credentials and daemon state, and it's what you switch between with `claude @work` or `claude @personal`.
16
16
  - **A configuration profile** is a reusable, named bundle of sharing rules — what's visible, what isn't. It exists independently of any identity, and which one applies can depend entirely on which directory you're working in.
@@ -20,32 +20,43 @@ Keeping these separate matters because they answer different questions. "Which l
20
20
  ## Install
21
21
 
22
22
  ```bash
23
- curl -fsSL https://github.com/ExaDev/claude-use/releases/latest/download/install.sh | sh
23
+ curl -fsSL https://github.com/ExaDev/agent-shim/releases/latest/download/install.sh | sh
24
24
  ```
25
25
 
26
- This installs `claude-use` alone into `~/.local/bin`; your existing `claude` command is left untouched. `claude-use run [args...]` reaches the same identity-resolve, farm-resync, spawn pipeline a `claude`-named binary would, so every feature already works with no further setup. Run `claude-use shim enable` once for the shorter `claude @<name>` form (`shim disable` reverses it).
26
+ This installs `agent-shim` alone into `~/.local/bin`; your existing `claude` command is left untouched. `agent-shim run [args...]` reaches the same identity-resolve, farm-resync, spawn pipeline a `claude`-named binary would, so every feature already works with no further setup. Run `agent-shim shim enable` once for the shorter `claude @<name>` form (`shim disable` reverses it).
27
27
 
28
- Also available: npm (`npm install -g claude-use`, needs Node 22.18 or later, or 24 and above), Homebrew (`brew install ExaDev/claude-use/claude-use`), Scoop on Windows, a scoped GitHub Packages alias, and installing straight from the git repository with no registry at all. Each channel's exact commands, the platform support matrix, and the one architecture (macOS x64) that needs a different install path are in [docs/installation.md](docs/installation.md).
28
+ Also available: npm (`npm install -g agent-shim`, needs Node 22.18 or later, or 24 and above), Homebrew (`brew install ExaDev/agent-shim/agent-shim`), Scoop on Windows, a scoped GitHub Packages alias, and installing straight from the git repository with no registry at all. Each channel's exact commands, the platform support matrix, and the one architecture (macOS x64) that needs a different install path are in [docs/installation.md](docs/installation.md).
29
+
30
+ ## Renamed from claude-use
31
+
32
+ agent-shim was called `claude-use` until it was renamed. Everything written for the old name keeps working, and `agent-shim doctor` lists what still uses it:
33
+
34
+ - The `claude-use` command is installed beside `agent-shim` by every channel and runs the same program.
35
+ - `CLAUDE_USE_*` environment variables are read wherever `AGENT_SHIM_*` is; the current name wins when both are set.
36
+ - An existing `~/.claude-use` is used in place when there is no `~/.agent-shim`. Do not move it: macOS Claude Code keys each identity's Keychain login on the exact path of its configuration directory (`<root>/identities/<name>`), so relocating the root signs every identity out. A fresh installation uses `~/.agent-shim`.
37
+ - A committed `.claude-use.json` or `.claude-use.local.json` is read when the directory has no `.agent-shim.json` or `.agent-shim.local.json`; `configure` keeps writing into the legacy local file while it is the only one.
38
+ - A farm manifest written under the old name is read, and replaced by the current one on the next resync.
39
+ - npm: `claude-use` is still published, identical to `agent-shim` and exposing both commands, so `npm install -g claude-use` keeps tracking releases. Homebrew moves an installed `claude-use` formula to `agent-shim` on upgrade.
29
40
 
30
41
  ## Quick start
31
42
 
32
43
  ```bash
33
- claude-use identity add personal # create your first identity (a fresh login)
34
- claude-use run @personal # log in and start using it
44
+ agent-shim identity add personal # create your first identity (a fresh login)
45
+ agent-shim run @personal # log in and start using it
35
46
  ```
36
47
 
37
- Want the shorter `claude @personal` instead? Run `claude-use shim enable` once — see [Install](#install).
48
+ Want the shorter `claude @personal` instead? Run `agent-shim shim enable` once — see [Install](#install).
38
49
 
39
50
  That's it — with no further configuration, everything in `~/.claude` that isn't credentials or daemon runtime is classified into categories (see below) and shared according to sensible defaults. Add a second identity, add configuration profiles, and add directory rules only once you actually need more control than that.
40
51
 
41
52
  ## Concepts
42
53
 
43
- `claude-use` separates two things most ad hoc multi-account setups conflate:
54
+ `agent-shim` separates two things most ad hoc multi-account setups conflate:
44
55
 
45
- - **An identity** is a login: the thing that owns credentials and daemon state, selected with `claude-use run @<name>` or, once `claude-use shim enable` has run, `claude @<name>`.
46
- - **A configuration profile** is a reusable, named bundle of sharing rules, independent of any identity, resolved per working directory via directory rules or a committed `.claude-use.json`.
56
+ - **An identity** is a login: the thing that owns credentials and daemon state, selected with `agent-shim run @<name>` or, once `agent-shim shim enable` has run, `claude @<name>`.
57
+ - **A configuration profile** is a reusable, named bundle of sharing rules, independent of any identity, resolved per working directory via directory rules or a committed `.agent-shim.json`.
47
58
 
48
- A third, optional thing sits on top of identities: **a pool** is a named list of them. Select `pool:<name>` where an identity name goes (`claude @pool:subs`) and claude-use picks the member whose unused quota is closest to expiring, skipping any that are refused right now, using the usage it already records. See [docs/configuration-model.md](docs/configuration-model.md#pools-picking-an-account-at-launch).
59
+ A third, optional thing sits on top of identities: **a pool** is a named list of them. Select `pool:<name>` where an identity name goes (`claude @pool:subs`) and agent-shim picks the member whose unused quota is closest to expiring, skipping any that are refused right now, using the usage it already records. See [docs/configuration-model.md](docs/configuration-model.md#pools-picking-an-account-at-launch).
49
60
 
50
61
  Every top-level entry in `~/.claude` is classified into one of five categories, shipped as a default map (`config/categories.default.json`):
51
62
 
@@ -57,9 +68,9 @@ Every top-level entry in `~/.claude` is classified into one of five categories,
57
68
  | `knowledge` | Yes | `skills`, `agents`, `rules`, `memory`, `commands`, `plugins`, `hooks`, `AGENTS.md`, `CLAUDE.md`, `README.md` |
58
69
  | `settings` | Yes | `settings.json`, `settings.local.json` |
59
70
 
60
- Sharing composes through a cascade (shipped defaults, then a user-global override, then the active configuration profile, then directory rules for `$PWD`, shallowest to deepest); a specific path override always outranks a category default regardless of which layer set it. A committed `.claude-use.json` at a project's root makes this portable: anyone who clones the repo and runs `claude` inside it gets the same isolation rules with no local setup.
71
+ Sharing composes through a cascade (shipped defaults, then a user-global override, then the active configuration profile, then directory rules for `$PWD`, shallowest to deepest); a specific path override always outranks a category default regardless of which layer set it. A committed `.agent-shim.json` at a project's root makes this portable: anyone who clones the repo and runs `claude` inside it gets the same isolation rules with no local setup.
61
72
 
62
- `claude` refuses to launch while `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_OAUTH_TOKEN` or a `CLAUDE_CODE_USE_BEDROCK`/`VERTEX`/`FOUNDRY` variable is set in the environment, because those outrank every identity's stored credential and would make all identities authenticate as the same account. Opt in deliberately with `CLAUDE_USE_ALLOW_AMBIENT_CREDENTIAL=1` for one launch or `claude-use identity set <name> --allow-ambient-credential`.
73
+ `claude` refuses to launch while `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_OAUTH_TOKEN` or a `CLAUDE_CODE_USE_BEDROCK`/`VERTEX`/`FOUNDRY` variable is set in the environment, because those outrank every identity's stored credential and would make all identities authenticate as the same account. Opt in deliberately with `AGENT_SHIM_ALLOW_AMBIENT_CREDENTIAL=1` for one launch or `agent-shim identity set <name> --allow-ambient-credential`.
63
74
 
64
75
  Providers and identities take their token from one `credential` block: an ordered list of sources (`env`, `file`, `command`, and the `op` and `keychain` presets, plus a `literal` placeholder for a local proxy), tried in turn, and a target (`bearer`, `apiKey`, or `oauthToken` for an identity). The token reaches the child's environment only; `check`, `doctor` and `--json` report the source kind and target, never the value.
65
76
 
@@ -68,79 +79,79 @@ The full mechanics, including the credential block, the merge algorithm, conditi
68
79
  ## CLI reference
69
80
 
70
81
  ```
71
- claude-use <noun> <verb> [name] [options] # nouns: identity, profile, pool, provider, rule
72
-
73
- claude-use identity add <name>
74
- claude-use identity list [--json]
75
- claude-use identity show <name> [--json]
76
- claude-use identity set <name> [--default-profile <profile> | --no-default-profile] [--[no-]allow-ambient-credential]
77
- claude-use identity set <name> [--credential <source>]... [--credential-target <bearer|apiKey|oauthToken>] [--no-credential]
78
- claude-use identity remove <name> [--yes]
79
- claude-use identity use <name>
80
- claude-use @<name> # shorthand for `identity use <name>`
81
- claude-use identity resolve-conflicts <name> # interactively resolve a retained superseded farm's conflicts
82
-
83
- claude-use profile add [name] [--extends <profile>]... [--description <text>] # interactive with no options on a terminal
84
- claude-use profile set <name> [--category <category>=<bool>]... [--entry <category>/<path>=<bool>]...
85
- claude-use profile set <name> [--extends <profile>]... [--no-extends] [--description <text> | --no-description]
86
- claude-use profile set <name> [--[no-]launch-skip-permissions] [--[no-]launch-remote-control] [--[no-]launch-headroom] [--[no-]launch-track-usage]
87
- claude-use profile set <name> [--launch-provider <provider> | --no-launch-provider]
88
- claude-use profile list [--json]
89
- claude-use profile show <name> [--json]
90
- claude-use profile remove <name> [--yes]
91
- claude-use profile use <name> # the global default configuration profile
92
-
93
- claude-use pool add <name> --identity <identity>...
94
- claude-use pool set <name> --identity <identity>...
95
- claude-use pool list [--json]
96
- claude-use pool show <name> [--json]
97
- claude-use pool remove <name> [--yes]
98
- claude-use pool use <name>
99
- claude-use pool pick <name> [--json]
100
-
101
- claude-use provider add <name> --display-name <name> (--base-url <url> | --kind codex) (--credential <source>)... [--credential-target <bearer|apiKey>] [--env KEY=VALUE]...
82
+ agent-shim <noun> <verb> [name] [options] # nouns: identity, profile, pool, provider, rule
83
+
84
+ agent-shim identity add <name>
85
+ agent-shim identity list [--json]
86
+ agent-shim identity show <name> [--json]
87
+ agent-shim identity set <name> [--default-profile <profile> | --no-default-profile] [--[no-]allow-ambient-credential]
88
+ agent-shim identity set <name> [--credential <source>]... [--credential-target <bearer|apiKey|oauthToken>] [--no-credential]
89
+ agent-shim identity remove <name> [--yes]
90
+ agent-shim identity use <name>
91
+ agent-shim @<name> # shorthand for `identity use <name>`
92
+ agent-shim identity resolve-conflicts <name> # interactively resolve a retained superseded farm's conflicts
93
+
94
+ agent-shim profile add [name] [--extends <profile>]... [--description <text>] # interactive with no options on a terminal
95
+ agent-shim profile set <name> [--category <category>=<bool>]... [--entry <category>/<path>=<bool>]...
96
+ agent-shim profile set <name> [--extends <profile>]... [--no-extends] [--description <text> | --no-description]
97
+ agent-shim profile set <name> [--[no-]launch-skip-permissions] [--[no-]launch-remote-control] [--[no-]launch-headroom] [--[no-]launch-track-usage]
98
+ agent-shim profile set <name> [--launch-provider <provider> | --no-launch-provider]
99
+ agent-shim profile list [--json]
100
+ agent-shim profile show <name> [--json]
101
+ agent-shim profile remove <name> [--yes]
102
+ agent-shim profile use <name> # the global default configuration profile
103
+
104
+ agent-shim pool add <name> --identity <identity>...
105
+ agent-shim pool set <name> --identity <identity>...
106
+ agent-shim pool list [--json]
107
+ agent-shim pool show <name> [--json]
108
+ agent-shim pool remove <name> [--yes]
109
+ agent-shim pool use <name>
110
+ agent-shim pool pick <name> [--json]
111
+
112
+ agent-shim provider add <name> --display-name <name> (--base-url <url> | --kind codex) (--credential <source>)... [--credential-target <bearer|apiKey>] [--env KEY=VALUE]...
102
113
  [--codex-default-model <model>] [--codex-model <tier=model>]... [--codex-effort <none|low|medium|high>]
103
- claude-use provider set <name> [--display-name <name>] ([--base-url <url>] | --kind codex) [--credential <source>]... [--credential-target <bearer|apiKey>] [--env KEY=VALUE]... [--unset-env KEY]...
114
+ agent-shim provider set <name> [--display-name <name>] ([--base-url <url>] | --kind codex) [--credential <source>]... [--credential-target <bearer|apiKey>] [--env KEY=VALUE]... [--unset-env KEY]...
104
115
  [--codex-default-model <model>] [--codex-model <tier=model>]... [--codex-effort <none|low|medium|high>]
105
- claude-use provider list [--json]
106
- claude-use provider show <name> [--json]
107
- claude-use provider remove <name> [--yes]
108
-
109
- claude-use rule add <path> [--config-profile <profile>] [--identity <identity>]
110
- claude-use rule set <path> [--config-profile <profile> | --no-config-profile] [--identity <identity> | --no-identity]
111
- claude-use rule list [--json]
112
- claude-use rule show <path> [--json]
113
- claude-use rule remove <path> [--yes]
114
-
115
- claude-use configure [path] [--identity <identity>]
116
- claude-use check [path] [--identity <identity>] [--json] [--strict]
117
- claude-use doctor [--json]
118
- claude-use headroom status [--json]
119
- claude-use codex status [--json]
120
- claude-use frontdoor status [--json]
121
- claude-use usage [--identity <name>] [--provider <name>] [--since <duration>] [--refresh] [--json]
122
- claude-use account show [<identity>] [--refresh] [--json]
123
- claude-use completion <bash|zsh|fish>
124
- claude-use shim enable [--dir <path>] [--force]
125
- claude-use shim disable [--dir <path>] [--force]
126
-
127
- claude-use run [@<identity>] [launch flags] [claude arguments]
116
+ agent-shim provider list [--json]
117
+ agent-shim provider show <name> [--json]
118
+ agent-shim provider remove <name> [--yes]
119
+
120
+ agent-shim rule add <path> [--config-profile <profile>] [--identity <identity>]
121
+ agent-shim rule set <path> [--config-profile <profile> | --no-config-profile] [--identity <identity> | --no-identity]
122
+ agent-shim rule list [--json]
123
+ agent-shim rule show <path> [--json]
124
+ agent-shim rule remove <path> [--yes]
125
+
126
+ agent-shim configure [path] [--identity <identity>]
127
+ agent-shim check [path] [--identity <identity>] [--json] [--strict]
128
+ agent-shim doctor [--json]
129
+ agent-shim headroom status [--json]
130
+ agent-shim codex status [--json]
131
+ agent-shim frontdoor status [--json]
132
+ agent-shim usage [--identity <name>] [--provider <name>] [--since <duration>] [--refresh] [--json]
133
+ agent-shim account show [<identity>] [--refresh] [--json]
134
+ agent-shim completion <bash|zsh|fish>
135
+ agent-shim shim enable [--dir <path>] [--force]
136
+ agent-shim shim disable [--dir <path>] [--force]
137
+
138
+ agent-shim run [@<identity>] [launch flags] [claude arguments]
128
139
  # launch flags, recognised only before a `--` terminator:
129
140
  # --identity <name> --config-profile <name> --provider <name> | --no-provider
130
141
  # --category <category>=<bool> --share <category>/<path> --hide <category>/<path> (each repeatable)
131
142
  # --[no-]skip-permissions --[no-]remote-control --[no-]headroom --[no-]track-usage --[no-]wait
132
- claude @<identity> ... # the same, once `claude-use shim enable` has run
143
+ claude @<identity> ... # the same, once `agent-shim shim enable` has run
133
144
  ```
134
145
 
135
- Every `list`, `show`, `check`, `doctor` and `headroom status` prints text by default and JSON with `--json`. Prompts appear only when standard input is a terminal; without one, a command that needs input fails with the option that supplies it (a `remove` needs `--yes`). Failures print as `claude-use: <message>` and exit 1, usage errors exit 2, a selected provider or identity whose credential block yields no token exits 64, and `CLAUDE_USE_DEBUG=1` adds stack traces to unexpected errors. `claude-use completion <bash|zsh|fish>` prints a shell completion script.
146
+ Every `list`, `show`, `check`, `doctor` and `headroom status` prints text by default and JSON with `--json`. Prompts appear only when standard input is a terminal; without one, a command that needs input fails with the option that supplies it (a `remove` needs `--yes`). Failures print as `agent-shim: <message>` and exit 1, usage errors exit 2, a selected provider or identity whose credential block yields no token exits 64, and `AGENT_SHIM_DEBUG=1` adds stack traces to unexpected errors. `agent-shim completion <bash|zsh|fish>` prints a shell completion script.
136
147
 
137
- `claude-use check [path]` resolves the full cascade for a directory without touching the farm, and is the primary way to answer "why is X shared or hidden here". `claude-use doctor` audits the whole `~/.claude-use` config graph at once: every identity, profile, `extends` chain, provider (naming the exact replacement for a file still in the format before the credential block) and directory rule, plus whether the right `claude-use` is the one actually on `PATH`.
148
+ `agent-shim check [path]` resolves the full cascade for a directory without touching the farm, and is the primary way to answer "why is X shared or hidden here". `agent-shim doctor` audits the whole `~/.agent-shim` config graph at once: every identity, profile, `extends` chain, provider (naming the exact replacement for a file still in the format before the credential block) and directory rule, plus whether the right `agent-shim` is the one actually on `PATH`.
138
149
 
139
150
  The full per-setting flag and environment-variable table (global, one-off, and directory-scoped forms of every setting), and the file-precedence rules `configure` uses when writing a toggle, are in [docs/cli-reference.md](docs/cli-reference.md).
140
151
 
141
152
  ## Architecture
142
153
 
143
- One compiled binary backs both `claude` and `claude-use`; the entrypoint dispatches on `path.basename(process.argv[1])`, so installation just needs two differently-named copies (or hardlinks) of the same executable on `PATH`.
154
+ One compiled binary backs both `claude` and `agent-shim`; the entrypoint dispatches on `path.basename(process.argv[1])`, so installation just needs two differently-named copies (or hardlinks) of the same executable on `PATH`.
144
155
 
145
156
  ```
146
157
  src/
@@ -160,7 +171,7 @@ install.sh # downloads, verifies, and installs the latest releas
160
171
 
161
172
  Every custom error extends `CliError`; `main()`'s top-level catch prints its message alone for an expected failure and a full stack trace for anything else. Config validation is Zod throughout, with `categories` a closed shape and `entries` an open, glob-capable record, since the two fields have opposite key cardinality. The resolver itself is pure: it takes filesystem, git, and environment facts as an injected parameter rather than reading them itself, which is what makes it unit-testable with fakes.
162
173
 
163
- The package also publishes a library surface alongside the binary: `import { resolveDecisions, resyncFarm, startConnectServer, runFrontDoorSupervisor, runSupervisor, detectAmbientCredential } from "claude-use"` (ESM or CJS, with type declarations). It re-exports only the pure, port-injected modules, so another tool can resolve identities, sync a farm, run the front door's CONNECT surface and supervisor and the headroom supervisor, or check the ambient-credential guard in process without the CLI installed. Nothing reachable from it imports `commander` or `@clack/prompts`, and the build fails if that stops being true. Its dependencies stay external, installed through the package's own `dependencies`.
174
+ The package also publishes a library surface alongside the binary: `import { resolveDecisions, resyncFarm, startConnectServer, runFrontDoorSupervisor, runSupervisor, detectAmbientCredential } from "agent-shim"` (ESM or CJS, with type declarations). It re-exports only the pure, port-injected modules, so another tool can resolve identities, sync a farm, run the front door's CONNECT surface and supervisor and the headroom supervisor, or check the ambient-credential guard in process without the CLI installed. Nothing reachable from it imports `commander` or `@clack/prompts`, and the build fails if that stops being true. Its dependencies stay external, installed through the package's own `dependencies`.
164
175
 
165
176
  The full source layout with per-file responsibilities, the schema design rationale, why config loading uses cosmiconfig's `load()` rather than `search()`, and the resolver's merge and materialisation mechanics are in [docs/architecture.md](docs/architecture.md).
166
177
 
@@ -174,7 +185,7 @@ The full CI pipeline (why the six platform builds also run on every PR, the sema
174
185
 
175
186
  ## Testing
176
187
 
177
- The resolver's cascade and materialisation logic is pure, taking filesystem, git, and environment facts as an injected parameter, so it is unit-tested extensively with fakes rather than a real filesystem, `git`, or `~/.claude-use`. `launcher.ts`, `check.ts`, and `doctor.ts` each get their own coverage for the real side effects the resolver's purity does not reach: symlink and materialised-directory writes, spawning the real `claude` binary, and the ambient-credential guard.
188
+ The resolver's cascade and materialisation logic is pure, taking filesystem, git, and environment facts as an injected parameter, so it is unit-tested extensively with fakes rather than a real filesystem, `git`, or `~/.agent-shim`. `launcher.ts`, `check.ts`, and `doctor.ts` each get their own coverage for the real side effects the resolver's purity does not reach: symlink and materialised-directory writes, spawning the real `claude` binary, and the ambient-credential guard.
178
189
 
179
190
  The full list of test cases, including the two-phase merge algorithm, conditional entries, farm reconciliation, and every command's own edge cases, is in [docs/testing.md](docs/testing.md).
180
191
 
@@ -189,7 +200,7 @@ pnpm build # bundle src/cli.ts with esbuild, then node --build-sea (needs
189
200
  pnpm schema # regenerate schema/*.schema.json from src/config/schema.ts; CI fails if this drifts from what's committed
190
201
  ```
191
202
 
192
- Run a single test file directly with `pnpm exec vitest run <path>`. Tests never touch a real identity: `vitest.config.ts` sets `CLAUDE_USE_HOME` to a throwaway directory, and a setup file refuses to run at all if that variable is unset or resolves to the real `~/.claude-use`.
203
+ Run a single test file directly with `pnpm exec vitest run <path>`. Tests never touch a real identity: `vitest.config.ts` sets `AGENT_SHIM_HOME` to a throwaway directory, and a setup file refuses to run at all if that variable is unset or resolves to the real `~/.agent-shim`.
193
204
 
194
205
  Commits are gated by Husky hooks: `commit-msg` enforces conventional-commit format, `pre-commit` runs `eslint --fix` on staged files and rejects merge/squash commits and mass deletions on `main`, and `pre-push` runs the full test suite and also rejects a push that would delete more than 100 files on the remote.
195
206
 
@@ -208,7 +219,7 @@ Issues and pull requests are welcome. Please keep the tool itself free of assump
208
219
 
209
220
  ## References
210
221
 
211
- - [docs/configuration-model.md](docs/configuration-model.md): identities, configuration profiles, category-based sharing, the cascade merge algorithm, directory rules, conditional matching, portable `.claude-use.json`, `~/.claude/projects/` pattern matching, providers, headroom routing, and launch flags.
222
+ - [docs/configuration-model.md](docs/configuration-model.md): identities, configuration profiles, category-based sharing, the cascade merge algorithm, directory rules, conditional matching, portable `.agent-shim.json`, `~/.claude/projects/` pattern matching, providers, headroom routing, and launch flags.
212
223
  - [docs/cli-reference.md](docs/cli-reference.md): the full flag and environment-variable table, `configure`'s file-write precedence, and the `check`/`doctor` debugging commands.
213
224
  - [docs/examples.md](docs/examples.md): worked configuration examples and a permutation reference.
214
225
  - [docs/architecture.md](docs/architecture.md): the source layout file by file, error reporting design, schema rationale, and resolver mechanics.