Hooks let a config wrap sync with local commands. Common uses are snapshotting dotfiles before a sync, refreshing a checked-out docs repo afterwards, or rebuilding files generated from synced content.Documentation Index
Fetch the complete documentation index at: https://docs.getgaal.com/llms.txt
Use this file to discover all available pages before exploring further.
Basic shape
command plus args. There is no shell, so pipes, redirects, and globs are not interpreted. Put shell logic in a script and call that script.
Order
- gaal builds the sync plan.
pre-synchooks run in order.- Sync applies repositories, skills, content, and MCPs.
--pruneruns, when requested.- gaal prints the sync summary.
post-synchooks run in order.
post-sync only runs after a successful sync. It is skipped when planning, sync, or prune fails.
Platform filters
os: to restrict a hook to linux, darwin, or windows.
Environment
Every hook seesGAAL_HOOK_PHASE, GAAL_HAS_CHANGES, GAAL_HAS_ERRORS, and newline-separated lists of planned or changed resources. See Schema: hooks for the full list.
Dry-run
gaal sync --dry-run shows hooks in the plan but never executes them.
Service mode
In service mode, hooks run on every iteration. A failingpre-sync hook skips that iteration. A failing post-sync hook is logged and the loop continues.