Registry / devops / migrateful

migrateful

JSON →
library0.1.0jsnpmunverified

Migrateful is a migration manager for the Contentful platform that enables managing data schemas as code with automated migration scripts, versioned releases for easy rollback, and separate environments for production, development, and features. Version 0.1.0 is the initial release. It differentiates from Contentful's low-level SDKs by providing an out-of-the-box migration system with version tracking and environment management, inspired by Contentful's scripting guide.

npm install migrateful
INSTALL
IMPORT
SIG · MIGRATEFUL
M
migrateful
devopsjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

migrateful
npx migrateful <env>
import migrateful from 'migrateful'
Migrateful is a CLI tool run via npx, not a library for direct import.

Creates a migration script and applies it to the master environment using npx.

mkdir migrations && cat > migrations/01-init.js << 'EOF' module.exports = function (migration, context) { const contentType = migration.createContentType('post') .name('Post') .description('A blog post'); contentType.createField('title') .name('Title') .type('Symbol') .required(true); }; EOF export CONTENTFUL_SPACE_ID='your_space_id' export CONTENTFUL_ACCESS_TOKEN='your_token' npx migrateful master
Debug
Known issues
gotchaRequires environment variables CONTENTFUL_SPACE_ID and CONTENTFUL_ACCESS_TOKEN to be set.
fix
Export both variables before running npx migrateful.
affects: >=0.0.1
gotchaMigrations must be placed in a folder named 'migrations' at the project root.
fix
Create the folder and name migration files as {version}-{name}.js (e.g., 01-init.js).
affects: >=0.0.1
gotchaSpace must have a master alias set up (default environment name 'master') or the alias must exist.
fix
Go to Settings > Environments and set up the first alias (rename master environment).
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'contentful-management'
Required dependency not installed globally or missing from project.
fix
Run 'npm install contentful-management' in the project root.
Error: Your contentful space does not have an alias called master
The master alias has not been set up in the Contentful space.
fix
Go to Contentful UI > Settings > Environments and set up the first alias (rename master environment).
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
contentful-managementrequiredRequired for Contentful management API interactions (creating environments, applying migrations).
Agent activity
7 hits · last 30 days
node
6
Resources
migrateful — npm install migrateful · libregistry