swarmvault hook

Manage SwarmVault's local git hook blocks for the nearest git repository.

Usage

swarmvault hook install
swarmvault hook uninstall
swarmvault hook status

What It Does

  • hook install writes marker-based post-commit and post-checkout hooks
  • hook uninstall removes only the SwarmVault-managed hook block
  • hook status reports whether those managed hook blocks are installed

The installed hooks run:

swarmvault watch --repo --once --code-only

from the vault root, so checkout and commit refreshes update code pages and graph structure quickly without introducing a second sync path. Run a normal swarmvault compile when you also want non-code semantic re-analysis.

Notes

  • Hook installation is local and opt-in
  • Existing hook content is preserved outside the SwarmVault-managed block
  • If your git repository is above the vault directory, the generated hook block still cds back into the vault root before running SwarmVault