Skip to main content
gaal sync runs the full reconciliation pipeline once and exits. gaal sync --service keeps the same pipeline running in a loop. Both produce identical state on disk, pick the one that matches how you use the machine.

One-shot sync (the default)

Runs the full pipeline: audit, plan, apply. Exits when finished. Use this when:
  • You want explicit control over when reconciliation happens.
  • You’re scripting in a Makefile, post-merge hook, or CI job.
  • You’re on a laptop where a background process would just waste battery.

Continuous service

Runs sync, sleeps, runs sync, sleeps. Forever. Catches SIGTERM and Ctrl-C cleanly. --interval accepts any Go duration string: 30s, 5m, 2h. Default is 5m. Use this when:
  • You’re on a long-lived dev workstation and want skills/MCP entries to stay in sync as you edit gaal.yaml.
  • You want a system service that keeps a fleet of machines aligned with a config file pulled from a shared dotfiles repo (paired with a git pull cron).

Incompatible with --service

Running sync as a system service

systemd (Linux)

launchd (macOS)

Periodic via cron

If a long-lived process feels like overkill, fire one-shot syncs from cron:

Logging

Pair service mode with a JSON log file for observability:
Each cycle writes structured events you can ship into the log pipeline of your choice.

Dry-run

Pruning

gaal sync