@yoooclaw/clawpilot
v0.2.1
Published
clawpilot CLI installer for Windows (x64/arm64). Downloads and verifies the release binary on install.
Readme
@yoooclaw/clawpilot
npm distribution of the clawpilot
CLI for Windows, published under the yoooclaw npm org. macOS and Linux are
not covered by this package — use install.sh for those.
npm install -g @yoooclaw/clawpilot
clawpilot versionHow it works
This package does not ship the clawpilot.exe binary. Its postinstall step
asks the same Janus update endpoint install.sh / install-clawpilot.ps1
already use for the latest Windows release, downloads it, verifies its SHA-256
against the checksum the server returned, extracts it with the tar.exe
bundled in Windows 10 (1803+) / Windows 11, and installs it to
vendor/clawpilot.exe inside this package. Finally it runs
clawpilot.exe version as a smoke test.
That smoke test is the point: a binary can download and verify perfectly and
still be unable to start, because antivirus quarantined it or blocked
CreateProcess. Checking at install time means npm install fails, loudly
and with an actionable message, instead of leaving a broken command for the
user to discover later.
Once installed, clawpilot is a pure passthrough — it execs the binary and
forwards stdio and the exit code. No update checks, no network access, no
per-invocation latency.
Upgrading is the binary's own job, exactly as it is for install.sh users:
clawpilot updateThis package's own version number is unrelated to which CLI version you get —
postinstall always fetches whatever the update server currently serves.
Republishing this package is only needed when the installer logic itself
changes.
Deliberately avoided:
- Download via Node's
https, notInvoke-WebRequest/BITS. Those tag downloaded files with Mark-of-the-Web (Zone.Identifier), which is what triggers SmartScreen's full-screen "Windows protected your PC" prompt. Plain Node HTTP requests don't set that tag. - Extraction via
tar.exe, notExpand-Archive.Expand-Archivepropagates a zip's own Mark-of-the-Web tag onto every file it extracts;tar.exedoesn't.
None of this replaces code signing — the archive this package downloads is whatever goreleaser produced and the update server registered. It only avoids adding extra SmartScreen triggers on top.
Requirements
- Windows 10 (1803+) or Windows 11, x64 or arm64.
- Node.js >= 18.
- Outbound HTTPS access to the update API (or set
CLAWPILOT_UPDATE_API_URLto point at a different one, e.g. a snapshot/staging environment).
Environment variables
| Variable | Purpose |
|---|---|
| CLAWPILOT_UPDATE_API_URL | Override the Janus update endpoint (default: https://openclaw-service.yoooclaw.com). Same variable name/semantics as install.sh / install-clawpilot.ps1. |
Troubleshooting
无法加载文件 ...\clawpilot.ps1,因为在此系统上禁止运行脚本 / UnauthorizedAccess
PowerShell's default execution policy blocks the .ps1 shim npm generates
alongside every global command. This affects all npm-installed CLIs, not just
this one. Either allow locally-installed scripts for your user:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned…or run the command from cmd.exe, which uses the .cmd shim and is not
subject to that policy.
install failed: ... antivirus
Add an exclusion for the package's vendor directory and reinstall.
vendor\clawpilot.exe is missing
The postinstall step never ran — most likely the install used
--ignore-scripts. Reinstall without it, or run
npm rebuild -g @yoooclaw/clawpilot.
Publishing a new version of this package
Only needed when bin/, lib/ or install.js changes — not for ordinary
CLI releases, which postinstall picks up on its own. Requires a yoooclaw
org account with publish rights and either 2FA enabled or a bypass-2FA
automation token (npm requires one of the two for every publish):
cd packaging/npm
npm version <version> --no-git-tag-version
npm publishpublishConfig.access is already set to public in package.json, so a
plain npm publish is enough — scoped packages default to private otherwise.
