zupdate - Complete System Maintenance¶
One-command maintenance that performs git sync, cache optimization, compilation, and integrity checks. Think of it as apt update for your shell configuration.
Overview¶
zupdate is the recommended way to keep your ZSHAND installation current. It checks network connectivity, pulls the latest changes from git, prunes stale branches, fixes permissions, cleans cache artifacts, recompiles the framework, runs integrity checks, and optionally displays stability metrics.
When to use: Weekly, after pulling remote changes, or whenever you want to ensure everything is up to date and healthy.
Usage¶
No arguments or options — it runs the full maintenance cycle every time.
Examples¶
# Weekly maintenance
zupdate
# Add to cron for automatic upkeep (Sunday 3am)
0 3 * * 0 /path/to/zshand/bin/zupdate
What It Does¶
Operations run in this order:
- Network check — Pings 8.8.8.8 with a 1-second timeout. If offline, git operations are skipped gracefully.
- Git sync — Fetches with
--prune, pulls with--rebase, warns if local is behind remote. Runszbranch-cleanif available. - Permissions — Runs
chmod +xon all scripts inbin/. - Cache hygiene — Deletes stale
.zwc.oldfiles left from previous compilations. - Recompilation — Calls
zprime --quiet(orzr --quietas fallback) to rebuild all bundles. - Integrity audit — Runs
zcheckto verify environment health. - Stability report — Shows 24-hour success rate via
zpulseif available.
Offline Behavior¶
When the network check fails, zupdate skips git fetch/pull/branch cleanup and continues with local operations (permissions, compilation, integrity checks). This makes it safe to run anywhere.
Dependencies¶
- Required:
ping,git,chmod - Required:
zprimeorzr(compilation) - Optional:
zcheck(integrity audit),zbranch-clean(git cleanup),zpulse(telemetry)