Summary
Add a deploy:replist npm script (and backing shell function) that re-applies the ~/.openclaw/dist/index.js plist entry without a full rebuild — for use after openclaw doctor --fix or daemon install reverts it.
Problem
deploy-local.sh correctly updates the LaunchAgent plist to run from ~/.openclaw/dist/index.js. However, openclaw doctor --fix and openclaw daemon install internally call daemon install --force, which uses process.argv[1] (the currently running CLI binary from the repo) to rewrite the plist. This silently reverts our plist update. Users need a quick way to re-apply the correct path without a full build cycle.
Acceptance criteria
Implementation plan
- Extract plist-update + restart steps from
scripts/deploy-local.sh into a shared function or standalone script
- Add
deploy:replist to package.json scripts
Files affected
scripts/deploy-local.sh (modify — extract/reuse plist+restart logic)
package.json (modify — add deploy:replist script)
Additional notes
Follow-on: investigate npm link from the repo root as a permanent fix — it symlinks the global openclaw bin to the repo so daemon install always writes the global prefix path (stable across doctor runs). That would eliminate the need for deploy:replist entirely.
AI-assisted (Claude Code, Opus 4.6).
Summary
Add a
deploy:replistnpm script (and backing shell function) that re-applies the~/.openclaw/dist/index.jsplist entry without a full rebuild — for use afteropenclaw doctor --fixordaemon installreverts it.Problem
deploy-local.shcorrectly updates the LaunchAgent plist to run from~/.openclaw/dist/index.js. However,openclaw doctor --fixandopenclaw daemon installinternally calldaemon install --force, which usesprocess.argv[1](the currently running CLI binary from the repo) to rewrite the plist. This silently reverts our plist update. Users need a quick way to re-apply the correct path without a full build cycle.Acceptance criteria
pnpm deploy:replistupdates plistProgramArguments[1]to~/.openclaw/dist/index.jsopenclaw gateway status --deepImplementation plan
scripts/deploy-local.shinto a shared function or standalone scriptdeploy:replisttopackage.jsonscriptsFiles affected
scripts/deploy-local.sh(modify — extract/reuse plist+restart logic)package.json(modify — adddeploy:replistscript)Additional notes
Follow-on: investigate
npm linkfrom the repo root as a permanent fix — it symlinks the globalopenclawbin to the repo sodaemon installalways writes the global prefix path (stable across doctor runs). That would eliminate the need fordeploy:replistentirely.AI-assisted (Claude Code, Opus 4.6).