A command-line tool and library for managing Contentful content model migrations using incremental scripted changes (CMS as Code). Current stable version 0.1.0 (Node >=8). Based on the Contentful Migration tool syntax, it tracks migration state per content type in a dedicated 'Migration' content type. Differs from contentful-migration by providing state management, bootstrapping from existing spaces, and per-content-type folder organization.
npm install contentful-migrate-bseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows initialization and bootstrapping of Contentful space using ctf-migrate CLI.
If already initialized, you may skip init or delete the Migration content type via the Contentful web app before re-running.
Use with caution; version-control your migrations directory to recover history if needed.
Use nvm or similar to switch to a current Node version. Note that contentful-migrate may not be actively maintained for newer Node versions.
Verify credentials and space/environment IDs. Use --access-token, --space-id, --environment-id options as fallback.
Ensure scripts are placed in the correct subfolder matching the content type ID (e.g., `migrations/post/1513695986378-create-post.js`).
If you want to reinitialize, delete the 'Migration' content type via the Contentful web app or skip init if already present.
Install the peer dependency: `npm install contentful-migration`
Run the command in a project directory where you have write access, or use `sudo` (not recommended) on Unix systems.