docs: fix install instructions to use npm link instead of bun link

- Replace incorrect 'bun link' with 'npm link' in public usage section
- Add explicit warning: do NOT use 'npm install -g .' for development (creates stale copy)
- Document symlink verification command
- Clarify that git pull is sufficient after npm link (no reinstall needed)
This commit is contained in:
gitea committed 2026-07-29 18:40:35 +08:00
1 parent ef115835ac
commit f315fc7485
1 file changed
+16 -1
+16 -1
View File
@@ -28,10 +28,23 @@ Install the global CLI from a checkout:
git clone <repo-url>
cd seal-home
bun install
bun link
npm link
seal-home version
```
`npm link` creates a symlink from `/opt/homebrew/lib/node_modules/seal-home` → your local checkout. The `seal-home` binary on PATH then runs source files directly via bun — **no reinstall needed after editing source code**.
> ⚠️ **Do NOT use `npm install -g .`** for development. That copies files into the global node_modules directory and the copy becomes stale as soon as you edit the source. Always use `npm link` so edits take effect immediately.
To verify the symlink is in place (and not a stale copy):
```bash
ls -la $(dirname $(which seal-home))/../lib/node_modules/seal-home
# Should show: seal-home -> ../../../../Users/<you>/Code/seal-home
```
If it shows a plain directory instead of a symlink, re-run `npm link` from the repo root.
Create a user-level Hose enterprise config that works from any directory:
```bash
@@ -62,6 +75,8 @@ seal-home update
`seal-home update` runs `git pull --ff-only`, installs dependencies, and restarts the local service if it was running.
Because `npm link` makes the global command a symlink into your checkout, **updating the checkout is sufficient** — no reinstall step required. The symlink continues to point to the updated source.
Local enterprise config files are ignored by git:
```text