chore(cli): put weaver on PATH and scope the package name - #82
Conversation
`npx --no-install weaver` resolves the workspace bin only from inside the repository tree. From a widget directory anywhere else npm consults the registry and reports a missing weaver@0.3.1, which is a stranger's 2022 process-management package; without --no-install it would have been downloaded and run. Agents read that npm error as a widget problem, and the `weaver init` hint prints `weaver check <dir>` for a binary that was not on PATH. - `npm run link` (npm link --workspace cli) puts `weaver` on PATH for the checkout. README quickstart uses it and invokes `weaver …` directly. - The CLI package is now @weaver/cli, a name no one else can claim on the registry (verified 404 for @weaver/cli, @weaver/sdk, @weaver/weaver). The bin stays `weaver`; the workspace is still referenced by path. Verified: after `npm run link`, `which weaver` resolves to the global bin symlink into @weaver/cli, and `weaver check` on an out-of-tree widget passes from /tmp. npm test 117 passed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Greptile SummaryThis change lets developers link the repository’s CLI once and invoke it as Using isolated writable npm prefixes, the linked command was verified from outside the repository. It was unavailable before linking, then resolved to the local CLI wrapper after linking; Confidence Score: 5/5Safe to merge for the verified local CLI linking workflow. The two relevant user-facing failures were exercised using writable npm prefixes: linking selected the intended workspace, and invoking the installed command from outside the repository reached the expected entry point and initialized a widget successfully. Files Needing Attention: No files need follow-up for the verified linking behavior.
What T-Rex did
Reviews (1): Last reviewed commit: "chore(cli): put `weaver` on PATH and sco..." | Re-trigger Greptile |
What
Two changes from the render-loop cadence experiment's open items.
npm run linkputsweaveron PATH.npx --no-install weaverworks only inside the repository tree; from a widget directory anywhere else, npm walks up, finds no workspace, and consults the registry:That is not our package. Public npm
" hint named a binary that was not on PATH. The root scriptweaveris an "Interactive process management system" last published 2022-06-28. Without--no-installit would be downloaded and run. Several agents read this error as a widget problem, andweaver init's "Next: weaver checklinkrunsnpm link --workspace cli; the README quickstart uses it and invokesweaver …directly (14node cli/bin/weaver.jsinvocations replaced).The CLI package is
@weaver/cli. A scoped name no one else can claim;@weaver/cli,@weaver/sdk, and@weaver/weaverall return 404 on the registry today. The bin staysweaver, the workspace is referenced by path, and nothing in scripts or CI referenced the old name.Verified
npm run link:which weaver→ global bin symlink →lib/node_modules/@weaver/cli/bin/weaver.js./tmp:weaver check <out-of-tree widget>passes.npm test117 passed.Companion: #81 changes the conjure skill to invoke
weaver …and states the npx caveat.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.