Compare Files (zeysdk compare)
The compare command compares local files with their server versions to detect content and property differences.
Bash
zeysdk compare [ASSET_PATH...] [options]
Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
ASSET_PATH | Specific asset paths to compare | No | services/backup.ixml weblets/dashboard.ixml |
Options
| Option | Description |
|---|---|
--verbose | Show detailed output |
Process
-
State Loading
- Reads local sync configuration
- Loads local file metadata
- Fetches matching server metadata
-
Comparison
- Compares local file hashes with stored sync hashes
- Compares server hashes with stored sync hashes
- Checks metadata properties for differences
-
Output
- Groups results by asset type
- Marks local, server, and conflict states
- Opens a diff tool when comparing selected files with content differences
Status Indicators
| Symbol | Meaning |
|---|---|
+ | Created locally or added on server |
- | Deleted locally or deleted on server |
~ | Modified locally or modified on server |
! | Conflict |
<> | Property conflict |
-> | Local changes to be pushed |
<- | Server changes to be pulled |
Comparison Categories
The output is organized by asset type:
- Settings
- Services
- Assets
- Resources
- Weblets
Examples
Bash
zeysdk compare
zeysdk compare services/backup.ixml weblets/dashboard.ixml
zeysdk compare --verbose
Error Handling
| Error | Description | Resolution |
|---|---|---|
| Missing sync.json | No sync configuration | Run zeysdk link first |
| Invalid sync.json | Missing id/url | Re-link instance |
| Diff tool error | Tool launch failed | Select alternative tool |
| Server error | Cannot fetch remote | Check connection/auth |
| Parse error | Invalid file content | Check file format |
Notes
comparedoes not change local files or server statecomparereads the active instance and may fetch remote file contents to support a diffcomparedoes not acquire.zeysdk/.sync.lock; avoid running it during a modifying synchronization command if you need a consistent snapshot- Passing specific asset paths limits comparison and may open a diff workflow
- Metadata differences are reported separately from content changes
- Diff tool behavior depends on the global CLI configuration
- Remote snapshots reuse the content fetched during comparison, including empty files, and are removed after the comparison tool exits
- Beyond Compare uses its waiting launcher (
bcompon macOS,BComp.comon Windows), so an already-open window can read the remote snapshot before it is removed - Beyond Compare's normal result codes (
0,1,2,11–14) finish the comparison without prompting for another tool; launch failures and error codes remain failures - To use Hunk, install its CLI separately, then select Default Diff Tool → Hunk in
zeysdk configure; the viewer runs in the current terminal - Custom comparison commands must wait until the viewer is finished before exiting
Best Practices
- Run
zeysdk comparebeforepush,pull, orsyncwhen remote state may have changed - Compare specific files when investigating a focused change
- Configure a diff tool with
zeysdk configurefor easier conflict review - Resolve unexpected differences before running forced sync commands