Documentation Index
Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
When multiple people work on the same Kodexa environment — some editing resources in the UI and others pushing changes from YAML files — conflicts can occur. The CLI uses sync state files to detect when a resource on the server has changed since your last pull. This prevents accidental overwrites where one person’s changes silently replace another’s, giving you the chance to review and merge before pushing.How It Works
Each time you runkdx sync pull, the CLI records the changeSequence of every fetched resource in a state file at .sync-state/<env>.yaml. When you later run kdx sync push, the CLI compares the stored sequence against the server’s current value:
| Stored state | Server state | What happens |
|---|---|---|
| No entry (never pulled) | Any | Pushes normally — no baseline to compare |
| Sequences match | Same | Pushes normally — no server-side changes |
| Sequences differ | Changed | Conflict — resource skipped with warning |
| Entry exists | Resource deleted | Pushes normally — recreates the resource |
Example Conflict Output
When a conflict is detected, you will see a warning like:The --force Flag
Use --force to push conflicted resources anyway, overwriting server-side changes:
Sync State Files
State files are stored at.sync-state/<env>.yaml in your repository root, one per environment:
Recommended Workflow
For teams where some users edit resources in the Kodexa UI while others manage YAML files:Environment Name Resolution
The state file name is derived from the environment:--env dev4creates.sync-state/dev4.yaml--to-url https://dev4.kodexacloud.comcreates.sync-state/dev4.kodexacloud.com.yaml--to-profile myprofilederives the name from the profile’s URL
dev4 has no effect on pushes to staging.