MigratoryAI is a production-ready CLI tool for migrating NoSQL databases (MongoDB, CouchDB) to PostgreSQL with schema inference, rerun-safe idempotent migrations, and post-migration validation. Version 1.3.1 requires Node >=20. Key differentiators: automatic relational schema generation from nested NoSQL documents, dry-run previews, unique source fingerprints to prevent duplicates, transaction-based batch migration with savepoint rollback, validation of row counts and fingerprint integrity, and optional Claude LLM fallback for ambiguous log parsing. Published as an npm CLI package with npx support.
npm install migratoryaiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Runs a schema analysis of a MongoDB collection, inferring SQL tables and printing the relational model without migrating.
Update Node.js to v20 or later using nvm or your package manager.
Back up existing data, then drop or migrate legacy rows manually before rerunning migratoryai.
Omit --llm-fallback unless you need it.
Install the module: npm install @anthropic-ai/sdk
Ensure PostgreSQL is running and credentials are correct. Try: psql -U postgres -h 127.0.0.1
Use --source mongodb or --source couchdb.