Skip to content

[Improvement]: Add deploy:replist script to re-apply gateway plist path after doctor --fix #15

@Arry8

Description

@Arry8

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

  • pnpm deploy:replist updates plist ProgramArguments[1] to ~/.openclaw/dist/index.js
  • Script unloads gateway, updates plist, reloads gateway, verifies with openclaw gateway status --deep
  • No-op if plist already points to the correct path
  • Script is idempotent and safe to run while gateway is running

Implementation plan

  1. Extract plist-update + restart steps from scripts/deploy-local.sh into a shared function or standalone script
  2. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions