Merge app CLI
What is Merge app CLI?
Merge app CLI allows you to use Merge app through the Contentful CLI. You can compare content type differences between environments, export a migration script and apply it right from the Contentful CLI, without switching to the developer's UI in the web app.
Automate merging your content type changes by integrating Merge app CLI into your CI/CD pipeline.
Merge content type changes with Contentful CLI
Merging content type changes between environments with Contentful CLI involves the following steps:
- View content type differences.
- Export differences as migration file.
- Apply differences to the target environment.
View content type differences
To view content type differences between your source and target environments, run the following command:
contentful merge show --te <target-environment-id> --se <source-environment-id>
Export differences as migration file
To download a content type migration script, run the following command:
contentful merge export --te <target-environment-id> --se <source-environment-id>
Apply differences to the target environment
To apply the exported migration script to your target environment, run the following command:
contentful space migration --space <space-id> --environment <target-environment-id> <path-to-migration-script>
Not what you’re looking for? Try our FAQ.