Documentation
Diff
Compare local files against remote state
Overview
The configsync diff command shows a unified, colorized diff between your local tracked files and the remote state. Use it to see exactly what has changed before pushing or after pulling.
configsync diff
Flags
| --from <machine> | Compare against a specific machine's state |
| --snapshot <id> | Compare against a specific snapshot |
| --filter <filters...> | Only diff specific items (modules, configs, projects) |
| --stat | Show a summary of changes (files changed, insertions, deletions) |
| --name-only | Only list the names of changed files |
Output Format
By default, diff outputs a unified colorized diff for each changed file. File status indicators are shown next to each path:
- M — Modified (file content differs)
- D — Removed (exists remotely but not locally)
- Identical files are counted but not shown
Examples
Full diff against the default remote state:
configsync diff
Compare against a specific machine:
configsync diff --from work-macbook
Compare against a historical snapshot:
configsync diff --snapshot snap_abc123
Show only a summary of what changed:
configsync diff --stat
List just the names of changed files:
configsync diff --name-only
Diff only SSH module files:
configsync diff --filter module:ssh
diff --stat with push --changed for a quick review-then-push workflow.