claude-use 0.4.0 → 0.5.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
@@ -74,6 +74,7 @@ Select an identity with:
74
74
  - `claude @<name>` — equivalent, once `claude-use shim enable` has been run (see [Install](#install))
75
75
  - `CLAUDE_ACCOUNT=<name> claude` — equivalent, via environment variable (this is `claude-use`'s own variable, read by its launcher; Anthropic's own multi-account convention is a plain `CLAUDE_CONFIG_DIR=<path> claude`, which `claude-use` builds on top of rather than replaces) — also needs the shim enabled first
76
76
  - `claude-use identity use <name>` — persistently, until changed again
77
+ - `claude-use @<name>` — the same, terser: shorthand for `claude-use identity use <name>`, matching the `@name` convention the other forms above already use. Deliberately requires the `@` prefix and requires `@<name>` to be the *only* argument — identity names are user-chosen and unconstrained against `claude-use`'s own subcommand vocabulary (`identity`, `profile`, `rules`, `check`, `configure`, `doctor`, `shim`, `run`), so a bare `claude-use <name>` (no `@`) is deliberately left alone as an "unknown command" error rather than risking a future identity name colliding with a future subcommand name
77
78
 
78
79
  A directory rule (see below) can also pin a specific identity to a path, overriding whichever one is otherwise active — useful as a safety net so a particular client's directory always uses the right login regardless of habit.
79
80
 
@@ -277,7 +278,7 @@ claude-use identity set <name> --allow-ambient-credential # persistently, for
277
278
 
278
279
  | What you're setting | Global (persistent) | Temporary (this run only) | Directory-scoped (persistent) |
279
280
  |---|---|---|---|
280
- | **Identity** | `claude-use identity use <name>` (writes `~/.claude-use/active-identity`) | `claude-use run @<name>` / `claude @<name>` (needs `claude-use shim enable`) / `CLAUDE_ACCOUNT=<name> claude` (same) | `claude-use rules add <path> --identity <name>`; or `.claude-use.json`'s `"identity"` |
281
+ | **Identity** | `claude-use identity use <name>` / `claude-use @<name>` (writes `~/.claude-use/active-identity`) | `claude-use run @<name>` / `claude @<name>` (needs `claude-use shim enable`) / `CLAUDE_ACCOUNT=<name> claude` (same) | `claude-use rules add <path> --identity <name>`; or `.claude-use.json`'s `"identity"` |
281
282
  | **Configuration profile** | `claude-use profile set-default <name>`; or `claude-use identity set-default-profile <identity> <profile>` | `claude --config-profile <name>` / `CLAUDE_USE_CONFIG_PROFILE=<name> claude` | `claude-use rules add <path> --profile <name>`; or `.claude-use.json`'s `"configProfile"` |
282
283
  | **A category** | `claude-use profile set <name> --category history=true`; or `claude-use configure <identity>` | `claude --category history=true[,knowledge=false,...]` / `CLAUDE_USE_CATEGORY_OVERRIDE="history=true,knowledge=false"` | `claude-use configure <identity>` run from inside the ruled directory; or `.claude-use.json`'s `"categories"` |
283
284
  | **An individual entry** | `claude-use profile set <name> --entry "path"=true`; or `claude-use configure <identity> <path>` | `claude --share <path>[,<path>,...]` / `claude --hide <path>[,<path>,...]` / `CLAUDE_USE_ENTRY_OVERRIDE="path=true,otherpath=false"` | `claude-use configure <identity> <path>` run from inside the ruled directory; or `.claude-use.json`'s `"entries"` |
@@ -291,6 +292,7 @@ The scriptable `claude-use profile set ...` commands exist alongside the interac
291
292
  ```
292
293
  claude-use identity add <name>
293
294
  claude-use identity use <name>
295
+ claude-use @<name> # shorthand for `identity use <name>`
294
296
  claude-use identity list
295
297
  claude-use identity set-default-profile <identity> <profile>
296
298
  claude-use identity set <name> [--allow-ambient-credential | --no-allow-ambient-credential]
package/dist/cli.cjs CHANGED
@@ -221857,7 +221857,7 @@ var categories_default_default = {
221857
221857
  // package.json
221858
221858
  var package_default = {
221859
221859
  name: "claude-use",
221860
- version: "0.4.0",
221860
+ version: "0.5.0",
221861
221861
  description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
221862
221862
  license: "Apache-2.0",
221863
221863
  author: "Joseph Mearman <joseph@mearman.co.uk>",
@@ -240196,6 +240196,19 @@ function useIdentity(paths, name) {
240196
240196
  writeTextAtomic(paths.activeIdentityFile, `${name}
240197
240197
  `);
240198
240198
  }
240199
+ function tryRunAtIdentityShortcut(paths, argv) {
240200
+ if (argv.length !== 1) {
240201
+ return false;
240202
+ }
240203
+ const [token] = argv;
240204
+ if (token === void 0 || !token.startsWith("@") || token.length === 1) {
240205
+ return false;
240206
+ }
240207
+ const name = token.slice(1);
240208
+ useIdentity(paths, name);
240209
+ console.log(`Active identity is now "${name}".`);
240210
+ return true;
240211
+ }
240199
240212
  function readActiveIdentity(paths) {
240200
240213
  if (!import_node_fs4.default.existsSync(paths.activeIdentityFile)) {
240201
240214
  return void 0;
@@ -241796,7 +241809,7 @@ function main() {
241796
241809
  const invokedName = import_node_path20.default.basename(process.argv[1] ?? "claude-use");
241797
241810
  if (isInvokedAsClaude(invokedName)) {
241798
241811
  runClaude();
241799
- } else {
241812
+ } else if (!tryRunAtIdentityShortcut(resolveLayoutPaths(), process.argv.slice(2))) {
241800
241813
  buildClaudeUseProgram().parse(process.argv);
241801
241814
  }
241802
241815
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Joseph Mearman <joseph@mearman.co.uk>",