Skip to main content
gaal sync [flags]
sync is the workhorse. It runs the audit, computes the plan, and applies it: clones or updates repositories, installs or refreshes skills, and upserts MCP entries.

Flags

FlagDefaultDescription
-s, --serviceoffRun as a continuous service (daemon mode).
-i, --interval <duration>5mPolling interval in service mode (e.g. 30s, 10m, 2h).
--dry-runoffPreview the plan without writing anything. See Dry-run.
--pruneoffRemove skills and MCP entries no longer in the config. See Pruning.
--forceoffInstall skills into all registered agents even when not detected. Applies only to agents: ["*"].
Plus all global flags.

Incompatible combinations

ComboResult
--dry-run --serviceRejected, a dry-run service loop is meaningless.
--prune --serviceRejected, destructive operations don’t belong in a loop.

Exit codes

CodeModeMeaning
0one-shotSuccess, nothing to change or all changes applied.
0--dry-runNo changes pending.
1--dry-runChanges are pending, run gaal sync to apply.
2anyError during planning or apply.

Examples

# One-shot sync
gaal sync

# Preview, no writes
gaal sync --dry-run

# Continuous loop, every 10 minutes
gaal sync --service --interval 10m

# Clean up orphans
gaal sync --prune

# Pre-stage a fresh machine, install for every registered agent
gaal sync --force

# Sandboxed sync (no risk to real files)
gaal --sandbox /tmp/sb sync

# Sync with structured logs
gaal --log-file /var/log/gaal.json sync --service --interval 5m

Sample output

$ gaal sync
✓ src/example          cloned
✓ code-review          installed in claude-code, cursor
✓ filesystem           upserted in claude_desktop_config.json
sync complete in 1.2s

Dry-run

Pruning

Sync vs. service mode