claude-use 1.0.0 → 1.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.
- package/README.md +25 -0
- package/dist/cli.cjs +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -36,6 +36,29 @@ npm install -g claude-use
|
|
|
36
36
|
|
|
37
37
|
The npm package deliberately ships only the `claude-use` bin — not `claude` — specifically so there's no bin-name ambiguity for `npx` to ever get wrong (a real, observed bug in at least one current npm version: a package exposing two bin names, one matching the package name, could still resolve to the wrong one on a bare `npx <package>@version` invocation). `claude-use run [args...]` reaches the exact same launcher pipeline regardless of that. `claude-use shim enable` works here too on macOS/Linux — an npm install's own bundle is directly executable via its own shebang once hardlinked to a bare `claude` — though not on Windows, where an npm-installed claude-use running under Node has no bundled `.exe` to link from; use Scoop there instead.
|
|
38
38
|
|
|
39
|
+
**Alternative: GitHub Packages.** The identical npm bundle above is also published under a scoped alias, `@exadev/claude-use`, to GitHub Packages — for anyone who already authenticates against `npm.pkg.github.com` for other org packages and would rather not add npmjs.com as a second registry. GitHub Packages requires authentication for every install even though the package itself is public, so this needs a personal access token with at least `read:packages` scope and one line of `.npmrc` configuration before either command below works:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
echo "@exadev:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
|
43
|
+
echo "//npm.pkg.github.com/:_authToken=<a GitHub PAT with read:packages>" >> ~/.npmrc
|
|
44
|
+
|
|
45
|
+
npx @exadev/claude-use identity list
|
|
46
|
+
npm install -g @exadev/claude-use
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
See [Publishing to npm](#publishing-to-npm) for why this alias is published by its own separate CI job rather than as a second step of the plain npm one above.
|
|
50
|
+
|
|
51
|
+
**Alternative: directly from GitHub, no registry at all.** No npmjs.com, no GitHub Packages, no authentication of any kind — npm and npx both support installing straight from a git repository:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx github:ExaDev/claude-use identity list
|
|
55
|
+
npm install -g github:ExaDev/claude-use
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This clones the repo and builds it from source rather than fetching a published tarball: npm automatically runs the `prepare` script for any git-based install — unlike `prepublishOnly`, which only fires on `npm publish` — and `prepare` is what builds `dist/cli.cjs` here, the same script that sets up this repo's own git hooks for a contributor's local clone. Slower than every other channel (a real esbuild build in place of downloading a prebuilt artifact) and pinned to whatever ref you reference — append `#<tag-or-branch-or-commit>` after the repo (e.g. `github:ExaDev/claude-use#v1.1.0`) — rather than resolved by semver the way the other channels are.
|
|
59
|
+
|
|
60
|
+
**On npm ≥ 12**, git dependencies are refused unless allowed explicitly — add `--allow-git=root` to either command above (`--allow-git=all` crashes npm 12.0.2 outright; `root`, meaning "a direct dependency of the project being installed," is both narrower and the one that actually works). npm may also print a warning that `claude-use`'s `prepare` script was "blocked because they are not covered by allowScripts" — in testing against npm 12.0.2 the script still ran and produced a working install regardless of that message, but if a future npm patch actually enforces it, approve the script explicitly (`npm approve-scripts claude-use` on npm 11, `npm install-scripts approve claude-use` on npm 12 — the command was renamed between versions) before installing.
|
|
61
|
+
|
|
39
62
|
**Alternative: Homebrew (macOS and Linux).**
|
|
40
63
|
|
|
41
64
|
```bash
|
|
@@ -566,6 +589,8 @@ The release workflow's `publish-npm` job builds this bundle and publishes it as
|
|
|
566
589
|
|
|
567
590
|
The published JSON Schemas under `schema/` should self-reference (and, if ever submitted to a public schema catalog, be registered) via a **version-pinned** GitHub Release asset URL — `releases/download/<tag>/<file>` — never a live branch reference, which silently changes underneath every consumer on every push with no way to pin a version. This is deliberately a different URL form from [installing the binaries](#install)'s own `releases/latest/download/...`: the installer *wants* the newest release every time, but a schema an editor references long-term needs to stay stable at whatever version a given config file was written against, not shift underfoot on every future release.
|
|
568
591
|
|
|
592
|
+
The same build is also published as a second, scoped alias, `@exadev/claude-use`, to GitHub Packages (`npm.pkg.github.com`) by its own `publish-github-packages` job — useful for anyone with an org-scoped registry configured who would rather never touch npmjs.com. This is a genuinely separate job rather than an extra step in `publish-npm` above: GitHub Packages has no OIDC trusted-publishing exchange, and pnpm/npm attempt that exchange whenever a job holds `id-token: write` regardless of which registry a given step actually targets, so a shared job fails the GitHub Packages leg with a 401. `publish-github-packages` therefore never requests `id-token: write` at all, authenticating instead with a plain `packages: write`-scoped `GITHUB_TOKEN` — no separate secret needed. Because GitHub Packages requires a scoped name, the job rewrites the checked-out `package.json`'s `name` and `publishConfig.registry` in place with `npm pkg set` (the latter has to be set explicitly since it otherwise takes precedence over the `.npmrc` `registry-url` `actions/setup-node` wrote, silently sending the publish back to npmjs.org) rather than maintaining a second `package.json` that could drift from the real one.
|
|
593
|
+
|
|
569
594
|
## Testing strategy
|
|
570
595
|
|
|
571
596
|
the resolver's cascade and materialisation logic is exactly the kind of thing that's easy to get subtly wrong, so it gets thorough unit tests before anything else is built on it:
|
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: "1.
|
|
221860
|
+
version: "1.2.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>",
|
|
@@ -221884,7 +221884,7 @@ var package_default = {
|
|
|
221884
221884
|
"dist/cli.cjs"
|
|
221885
221885
|
],
|
|
221886
221886
|
scripts: {
|
|
221887
|
-
prepare: "husky",
|
|
221887
|
+
prepare: "husky && node scripts/build.mts --bundle-only",
|
|
221888
221888
|
typecheck: "turbo run _typecheck",
|
|
221889
221889
|
_typecheck: "tsc --noEmit",
|
|
221890
221890
|
lint: "turbo run _lint",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.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>",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist/cli.cjs"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"prepare": "husky",
|
|
30
|
+
"prepare": "husky && node scripts/build.mts --bundle-only",
|
|
31
31
|
"typecheck": "turbo run _typecheck",
|
|
32
32
|
"_typecheck": "tsc --noEmit",
|
|
33
33
|
"lint": "turbo run _lint",
|