wl sync
Apply desired state to local files and detect drift.
Synopsis
wl sync [--check] [--dry-run] [--locked]
Description
Applies the rendered desired state to disk. Without --check, writes files. With --check, only validates without writing (for CI).
info
This command is coming in Phase 1.
Options
| Option | Description |
|---|---|
--check | CI mode: validate without writing, exit non-zero on drift |
--dry-run | Show what would be done without writing |
--locked | Only apply locked versions |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success (or clean in --check mode) |
4 | Drift detected (--check mode) |
5 | Policy violation |
Examples
Check for Drift in CI
wl sync --check --locked
# Exit 0 if clean, exit 4 if drift
Apply Changes
wl sync
# Renders and writes files
Preview Changes
wl sync --dry-run
# Shows render plan without writing
Next Steps
- Check details — wl status
- See differences — wl diff
- Set up CI — CI/CD guide