/vault-sync:vault-sync-install [--mode=full|fuse-only] [--role=leaf|snapshotter] [--service-scope=user|system] [--vault-path=<path>] [--fetch-projection=<absolute-path>|none] [--package-version=<ver>] [--package-commit=<sha>] [--dry-run] [--override-snapshotter]from vault-sync
Installs vault-sync on a host: deploys scripts, configures scheduler units, and registers with skillwiki. Supports full or FUSE-only modes and leaf/snapshotter roles.
Ships in vault-sync. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Install vault-sync on the current host. OS-detecting, idempotent installer that deploys scripts, installs scheduler units, and registers with skillwiki config.
--override-snapshotter)platform_detect_os. Fail on unsupported.--mode=full|fuse-only (default: full).--role=leaf|snapshotter (default: leaf). If snapshotter:
fleet.yaml from vault via fleet_load.fleet_validate_install $(hostname) snapshotter [--override-snapshotter].--service-scope=auto|user|system for Linux snapshotter or FUSE-only installs. auto uses system when run as root and user otherwise. Full leaf installs stay on user units.--vault-path=<path> for the FUSE-only mount guard. Defaults to ~/wiki.--fetch-projection=<absolute-path>|none (leaf/full only; env VS_FETCH_PROJECTION) optionally provisions or validates an independent sibling Git clone used by fetch. Omitted or none selects one-folder mode and persists vault_sync.fetch_projection=none, so fetch follows the live vault. An absolute projection must be distinct and non-nested with the live vault and must not reuse vault_sync.snapshot_worktree.--max-dir-cache=<duration> for the FUSE freshness envelope. Defaults to 15m.--package-version=<ver> / --package-commit=<sha> (optional) — set deploy provenance for runtime-manifest.json. Equivalent env: VS_PACKAGE_VERSION, VS_PACKAGE_COMMIT. Metadata only; does not change copied scripts. Required for honest manifests when the package root is rsynced without monorepo package.json / git.command -v rclone — required. Warn-only if not found, but install proceeds (rclone can be installed later).command -v git — required for --mode=full. Fail if missing.command -v launchctl — required.systemctl --user must be available. Fail with hint if not.systemctl must be available. User scope requires systemctl --user; system scope writes root units under /etc/systemd/system.none projection selects one-folder mode by writing vault_sync.fetch_projection=none; when this replaces a configured sibling, stop the existing fetch loop and preserve its active/enabled state for rollback. Never delete the sibling. For an absolute projection, stop the existing fetch loop, reject unresolved operation journals, and acquire the live vault's managed-write lock before cloning or changing projection config. For a missing target, clone the live vault's origin/main into a temporary sibling, verify origin, branch, SCHEMA.md, clean status, and zero meta/log-events/** paths, then atomically rename it. Existing targets are validated and never overwritten. A failed install restores the prior service state and config, releases any lock, and removes only a clone created by that installer run; it never removes the live vault or an existing projection. A fresh host with no old fetch units proceeds without treating absent units as an error.mkdir -p $(platform_share_dir)/bin
cp packages/vault-sync/scripts/*.sh $(platform_share_dir)/bin/
cp -r packages/vault-sync/scripts/lib $(platform_share_dir)/bin/
cp packages/vault-sync/skills/vault-presync/wiki-sync.sh $(platform_share_dir)/bin/wiki-sync.sh
chmod +x $(platform_share_dir)/bin/*.sh
For full installs, also create or repair ~/bin/wiki-sync.sh as a symlink
to $(platform_share_dir)/bin/wiki-sync.sh when safe. Do not clobber a real
non-symlink user file at that path.mkdir -p $(platform_rclone_config_dir)
cp packages/vault-sync/filters/wiki-push-filters.txt $(platform_rclone_config_dir)/
.plist.tmpl files with @SCRIPT_DIR@ → $(platform_share_dir)/bin, @LOG_DIR@ → $(platform_log_dir). Validate plist syntax plus Label / ProgramArguments[0], write to ~/Library/LaunchAgents/, then run launchctl bootstrap gui/$UID <plist>..service + .timer with @SCRIPT_DIR@ → $(platform_share_dir)/bin. Write to ~/.config/systemd/user/. Run systemctl --user daemon-reload && systemctl --user enable --now wiki-push.timer wiki-fetch.timer wiki-fuse-refresh.timer.wiki-snapshot.service + wiki-snapshot.timer plus wiki-fuse-refresh.service + wiki-fuse-refresh.timer. Write to /etc/systemd/system/ for --service-scope system or ~/.config/systemd/user/ for --service-scope user. Enable wiki-snapshot.timer on a 30-minute cadence (*:02 and *:32) plus the 5-minute FUSE refresh timer.wiki-fuse-refresh.sh --check-only --max-dir-cache 15m and surface a warning if the active mount exceeds the freshness envelope.loginctl enable-linger $USER. If this fails, surface as a hard error — without it, headless LXC will silently not sync.Persist fetch routing before service activation. An absolute `--fetch-projection` writes `vault_sync.fetch_projection=<absolute-path>`. Omitted or `none` writes `vault_sync.fetch_projection=none`, making `WIKI_PATH` / the live vault the fetch target. The fetch service reads this host-local key directly; MCP, authoring, push, `skillwiki path`, and `skillwiki copy-status` remain live-vault scoped.
skillwiki config set vault_sync.installed true
skillwiki config set vault_sync.role <role>
skillwiki config set vault_sync.scheduler <launchd|systemd>
skillwiki config set vault_sync.service_scope <user|system> # Linux only
skillwiki config set vault_sync.fuse_refresh_enabled <true|false>
skillwiki config set vault_sync.fuse_refresh_interval 300s # Linux only
skillwiki config set vault_sync.fuse_max_dir_cache 15m # Linux only
Some already-installed npm skillwiki 0.10.91 binaries predate this config-key schema and return INVALID_CONFIG_KEY for config get/set vault_sync.fetch_projection. The installer intentionally falls back to an exact raw ~/.skillwiki/.env write when that happens. For an attended one-folder migration, use this installer with --fetch-projection none; do not delete the sibling clone or require the old CLI to clear the key first.
Do not auto-set vault_sync.push_enabled=true. Install remains the full-role path. A fetch-only host is configured after install by setting vault_sync.push_enabled=false and leaving wiki-push disabled.
Snapshotter installs also record vault_sync.snapshot_script and the conventional profile path vault_sync.snapshot_profile=/etc/vault-sync/profiles/<host>-snapshotter.env.
The snapshotter profile is the operational authority for its host-local
rclone alias and should contain CLOUD_REMOTE=<remote:path>. Managed leaf
hosts should set WIKI_REMOTE=<remote:path> in ~/.skillwiki/.env. Rclone
remote names are local aliases and may legitimately differ between hosts.
Status treats a missing remote as unconfigured/unknown; it must not probe a
guessed alias and report a false outage.$(platform_share_dir)/runtime-manifest.json (package/installer version, host role, SHA-256 hashes of installed scripts and LaunchAgents plists).--dry-run mode: print the entire plan (paths, commands, fleet.yaml diff, and projection bootstrap/validation) but execute nothing.The projection option does not quarantine the live vault's .git metadata. That is a separate attended rollout step performed only after live MCP/S3 and projection acceptance succeeds.
Use --mode=fuse-only for Linux hosts where the wiki path is an rclone S3 FUSE mount and not a git-backed vault. This mode is intended for pvelxc/LXC consumers like /root/wiki -> wiki-s3:cloud/wiki.
FUSE-only mode:
findmnt -T <vault-path> reports fuse.rclone.rclone mount process and validates the helper dry-run before completing.wiki-fuse-refresh.sh and scripts/lib/.wiki-fuse-refresh.service and wiki-fuse-refresh.timer.~/.config/systemd/user and root/system units under /etc/systemd/system.HOME in the systemd service so logs land under $(platform_log_dir).vault_sync.fuse_refresh_enabled=true, vault_sync.fuse_refresh_interval=300s, and vault_sync.fuse_max_dir_cache=<duration>.wiki-push or wiki-fetch.vault_sync.installed=true; that key is reserved for the full role workflow.Do not use FUSE-only mode on a normal git-backed wiki vault.
Re-running the install upgrades scripts in-place. Existing scheduler units are reloaded, not duplicated.
On macOS, launchd install is an observed-state transaction:
launchctl print)EIO from launchctl is not special — it is reconciled only when launchctl print shows the label present (exit status only; no field parsing of launchctl output). Candidate plists are staged and moved into place only after registration is proven absent.
Rollback copies live under $(platform_cache_dir)/install-rollback/<timestamp>/ and are retained after success until a later status/live-verify step clears them. Do not delete rollback dirs merely because bootstrap returned success. The installer records whether each previous macOS plist passed integrity validation; only a valid previous plist is eligible for automatic restoration after a failed bootstrap. Invalid prior files remain diagnostic evidence and are never reinstalled as rollback.
After a successful non-dry-run install, $(platform_share_dir)/runtime-manifest.json records package/installer version, host role, and SHA-256 hashes of installed scripts and LaunchAgents plists.
Typical share / cache / log roots:
| OS | platform_share_dir | platform_cache_dir | platform_log_dir |
|---|---|---|---|
| macOS | ~/Library/Application Support/vault-sync | ~/Library/Caches/vault-sync | ~/Library/Logs |
| Linux | ~/.local/share/vault-sync | ~/.cache/vault-sync | ~/.local/state/vault-sync/log |
Pull log path for live verification: $(platform_log_dir)/wiki-pull.log (macOS: ~/Library/Logs/wiki-pull.log).
Repository tests green ≠ install work complete. After deploying to a real host, run this attended checklist before treating the install as done:
bash packages/vault-sync/skills/vault-sync-install/install.sh --role leaf --execute
bash packages/vault-sync/skills/vault-sync-status/status.sh --read-only
Expect vault_sync_jobs_enabled=pass and vault_sync_runtime_match=pass (valid on-disk LaunchAgent plists plus a parseable runtime-manifest.json).wiki-fetch cycle, or kickstart it / run the pull helper once so a live pull executes on the installed scripts.op=…) and no legacy wiki-pull auto-stash messages:
# macOS
grep -E 'op=|auto-stash' "$HOME/Library/Logs/wiki-pull.log"
# Linux
# grep -E 'op=|auto-stash' "$HOME/.local/state/vault-sync/log/wiki-pull.log"
# Exact path: $(platform_share_dir)/live-verify.ok
# macOS: ~/Library/Application Support/vault-sync/live-verify.ok
# Linux: ~/.local/share/vault-sync/live-verify.ok
touch "$HOME/Library/Application Support/vault-sync/live-verify.ok" # macOS
# touch "$HOME/.local/share/vault-sync/live-verify.ok" # Linux
Status reports vault_sync_live_verify=pass only when this marker exists. Status never writes the marker itself.npm run test:vault-sync (or CI) is necessary but not sufficient.status: completed only after live scheduled-cycle evidence is recorded in the work retro (attended checklist above, including live-verify.ok).--execute on sg01 from CI. Only hand-migration with human supervision.protected: true in fleet.yaml, the install proceeds (installing is non-destructive) but prints a warning.Resolve the vault-sync package root before invoking the companion script:
<repo>/packages/vault-syncskills/vault-sync-install (plugin cache)~/Library/Application Support/vault-sync or ~/.local/share/vault-sync) is runtime only — not package source for drift checks# monorepo
bash packages/vault-sync/skills/vault-sync-install/install.sh --role leaf --dry-run
bash packages/vault-sync/skills/vault-sync-install/install.sh --role leaf --vault-path /absolute/wiki --fetch-projection none --dry-run
bash packages/vault-sync/skills/vault-sync-install/install.sh --role leaf --vault-path /absolute/wiki --fetch-projection /absolute/wiki-git --dry-run
# plugin root (cwd = vault-sync plugin package)
bash skills/vault-sync-install/install.sh --role leaf --dry-run
Staged / rsync install (honest runtime-manifest without monorepo git tree):
VS_PACKAGE_VERSION=0.9.60 \
VS_PACKAGE_COMMIT=<source-git-sha> \
bash skills/vault-sync-install/install.sh --role snapshotter --service-scope system --execute
# or flags (same env SSOT):
# bash skills/vault-sync-install/install.sh --package-version 0.9.60 --package-commit <sha> ...
See docs/offline-host-runbook.md for the full staged-deploy matrix and satellite-only host notes.
# Companion script (interactive)
bash packages/vault-sync/skills/vault-sync-install/install.sh --role leaf --dry-run
bash packages/vault-sync/skills/vault-sync-install/install.sh --role snapshotter --service-scope system --dry-run
bash packages/vault-sync/skills/vault-sync-install/install.sh --mode fuse-only --vault-path /root/wiki --service-scope system --dry-run
# Companion script (headless / CI)
VS_ROLE=leaf VS_DRY_RUN=1 bash packages/vault-sync/skills/vault-sync-install/install.sh
VS_ROLE=leaf VS_VAULT_PATH=/absolute/wiki VS_FETCH_PROJECTION=none VS_DRY_RUN=1 bash packages/vault-sync/skills/vault-sync-install/install.sh
VS_ROLE=leaf VS_VAULT_PATH=/absolute/wiki VS_FETCH_PROJECTION=/absolute/wiki-git VS_DRY_RUN=1 bash packages/vault-sync/skills/vault-sync-install/install.sh
VS_ROLE=snapshotter VS_SERVICE_SCOPE=system VS_DRY_RUN=1 bash packages/vault-sync/skills/vault-sync-install/install.sh
VS_MODE=fuse-only VS_VAULT_PATH=/root/wiki VS_SERVICE_SCOPE=system VS_DRY_RUN=1 bash packages/vault-sync/skills/vault-sync-install/install.sh
VS_PACKAGE_VERSION=0.9.60 VS_PACKAGE_COMMIT=<sha> VS_ROLE=snapshotter VS_SERVICE_SCOPE=system VS_DRY_RUN=1 bash packages/vault-sync/skills/vault-sync-install/install.sh
Use bash install.sh --runtime-only --dry-run to preview an upgrade of an
existing configured installation, then --runtime-only --execute. This branch
preserves configuration, filters, push settings, units and timer state. It does
not start any job or change fleet authority. Python 3 and a runtime manifest are
required. Legacy installations refuse while an installed helper is active.
Helpers exec an immutable payload, so subsequent upgrades keep in-flight
libraries coherent. The old bin directory/release and previous manifest remain
available for rollback; do not delete them while processes might reference them.
The installed manifest hashes entry points, libraries and payload files and records
the exact package version/commit. An interrupted deploy lock requires operator
inspection; never clear it merely by age.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub karlorz/llm-wiki --plugin vault-sync6 skills in this plugin
/vault-fuse-freshnessAudit Linux rclone FUSE wiki freshness. Use when dir-cache-time drifts or a bounded vfs/refresh is needed./vault-presyncPre-sync lint, collision dedup, and rebase for ~/wiki. Use before wiki-sync or git push./vault-snapshotLinux-only S3-to-Git snapshot/promotion job with tombstone-aware no-resurrection and bounded remote pruning. Single-writer-git invariant — only one host per fleet may run this./vault-sync-statusHealth snapshot of vault-sync: scheduler, push/fetch recency, snapshot guard, FUSE timer. Use after install or CI checks./vault-sync-uninstallRemove vault-sync from current host. Stops scheduler jobs, leaves tombstone markdown, preserves logs.