A CLI tool and library for managing Contentful content model migrations. Version 1.2.1 provides a structured way to create, update, and delete content types and fields using JavaScript/TypeScript migration files. It clones a source environment (typically master), applies migrations, and can update aliases. Compared to raw Contentful Migration, this helper offers a higher-level API with environment cloning, confirmation prompts, and delete/alias commands. The package is stable with weekly releases on npm.
npm install contentful-migration-helperNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up config file and a sample migration to create a content type with a title field.
Use `yarn contentful-migration-helper migrate` instead of `yarn contentful migrate`.
Use Contentful Management API directly for alias updates.
Write migration files with `export = function (migration) {...}`. For TypeScript, run via ts-node.Always review environment names before using `--skip`.
Run `npm install contentful-migration-helper` in your project directory.
Create the config file in the root of your project with correct exports.
Ensure the export is `export = function (migration) {...}` (CommonJS) and the parameter name is correct.