Skip to content

chore(cli): put weaver on PATH and scope the package name - #82

Merged
SunkenInTime merged 1 commit into
masterfrom
feat/cli-on-path
Sep 6, 2026
Merged

SunkenInTime merged 1 commit into
masterfrom
feat/cli-on-path

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Sep 6, 2026 •

Copy link
Copy Markdown
Collaborator

What

Two changes from the render-loop cadence experiment's open items.

npm run link puts weaver on PATH. npx --no-install weaver works only inside the repository tree; from a widget directory anywhere else, npm walks up, finds no workspace, and consults the registry:

npm error npx canceled due to missing packages and no YES option: ["weaver@0.3.1"]

That is not our package. Public npm weaver is an "Interactive process management system" last published 2022-06-28. Without --no-install it would be downloaded and run. Several agents read this error as a widget problem, and weaver init's "Next: weaver check

" hint named a binary that was not on PATH. The root script link runs npm link --workspace cli; the README quickstart uses it and invokes weaver … directly (14 node cli/bin/weaver.js invocations replaced).

The CLI package is @weaver/cli. A scoped name no one else can claim; @weaver/cli, @weaver/sdk, and @weaver/weaver all return 404 on the registry today. The bin stays weaver, the workspace is referenced by path, and nothing in scripts or CI referenced the old name.

Verified

  • After npm run link: which weaver → global bin symlink → lib/node_modules/@weaver/cli/bin/weaver.js.
  • From /tmp: weaver check <out-of-tree widget> passes.
  • npm test 117 passed.

Companion: #81 changes the conjure skill to invoke weaver … and states the npx caveat.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

`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-apps

greptile-apps Bot commented Sep 6, 2026

Copy link
Copy Markdown

Greptile Summary

This change lets developers link the repository’s CLI once and invoke it as weaver, scopes the CLI package as @weaver/cli, and updates shell quickstart commands.

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; weaver init completed successfully and created a widget.

Confidence Score: 5/5

Safe 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.

T-Rex T-Rex Logs

What T-Rex did

  • Validated that starting from an empty npm prefix, the repository link script resolves through @weaver/cli to the repository's cli/bin/weaver.js.
  • Linked the CLI into a separate prefix and ran weaver init linked-entrypoint-proof outside the repo, creating the requested widget.
  • Verified the PATH-based resolution and that after linking, the installed CLI maps to the repository script, and that weaver status runs but exits due to Linux support limitations, confirming the command is present.
  • Captured the end-to-end linking and entrypoint generation, showing the wrapper resolution and widget.tsx creation as part of the linked-entrypoint-proof workflow.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "chore(cli): put `weaver` on PATH and sco..." | Re-trigger Greptile

@SunkenInTime
SunkenInTime merged commit ec17cae into master Sep 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant