Prerequisites
Before you begin, ensure you have:- KDX CLI installed (installation guide)
- An API key for your Kodexa environment (authentication guide)
- Access to a Kodexa organization with existing resources (data definitions, knowledge sets, etc.)
You can generate an API key from your Kodexa platform account settings. You will need the organization slug for your target organization — you can find this in the URL when viewing your organization in the Kodexa UI.
Step 1: Create Your Sync Directory
Create a new directory for your sync configuration. This will become the root of your GitOps repository.sync-config.yaml file that defines your environment and target:
sync-config.yaml
your-instance.kodexa-enterprise.com with your actual Kodexa platform URL, and your-org-slug with your organization’s slug.
Step 2: Discover Resources
The--discover flag queries your Kodexa environment, auto-generates a manifest.yaml, and pulls all resources to disk as YAML files.
First, set your API key as an environment variable:
--discover-dir resources flag tells the CLI to store resource files under a resources/ subdirectory and sets metadata_dir: resources in the generated manifest. You can omit it to store files next to the manifest.
This command does three things:
- Queries the API for all resources in your organization
- Generates
manifest.yamllisting every discovered resource by slug (withmetadata_dir: resources) - Pulls each resource to disk as a YAML file under
resources/
Step 3: Review What Was Pulled
Take a look at the files that were generated:Step 4: Make a Local Change
Open any resource YAML file and make a change. For example, update the description of a data definition:description field and update it:
Step 5: Push Changes
Always preview your changes with--dry-run before pushing:
Step 6: Set Up Version Control
Initialize a git repository to track your sync configuration. This enables team collaboration and provides a full audit trail of every change.Step 7: Customize Your Manifest
The auto-generated manifest includes every resource that was discovered. You can editmanifest.yaml to include only the resources you want to manage:
manifest.yaml
--discover again later, it will add newly created resources but will not re-add resources you have removed from the manifest.
What’s Next
Configuration
Set up multiple environments, targets, and branch-based automation
Manifests & Resource Types
Define exactly which resources to sync and how they are organized
Conflict Detection
Understand how changeSequence prevents accidental overwrites
CI/CD Integration
Automate sync with GitHub Actions for continuous deployment
