Registry / database / migratoryai

migratoryai

JSON →
library1.3.1jsnpmunverified

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 migratoryai
INSTALL
IMPORT
SIG · MIGRATORYAI
M
migratoryai
databasejavascriptv1.3.1
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.

CLI
npx migratoryai --help
Requiring the package in Node.js code
This is a CLI tool, not a library. Use npx or global install.
migratoryai
npm install -g migratoryai && migratoryai --help
migratoryAI --help (accepted but case-insensitive)
Package name is 'migratoryai' but binary also responds to 'migratoryAI'.

Runs a schema analysis of a MongoDB collection, inferring SQL tables and printing the relational model without migrating.

npx migratoryai analyze --source mongodb --mongodb-uri mongodb://127.0.0.1:27017 --mongodb-db sample_mflix --mongodb-collection movies --target postgres --pg-connection-string postgres://postgres:postgres@127.0.0.1:5432/migratoryai --sample-limit 5
Debug
Known issues
breakingRequires Node.js >=20. Older versions will fail.
fix
Update Node.js to v20 or later using nvm or your package manager.
affects: <20.0.0
gotchaMigration will stop if target tables already have rows without source_fingerprints (legacy rows). This is intentional to prevent mixing unmanaged data.
fix
Back up existing data, then drop or migrate legacy rows manually before rerunning migratoryai.
affects: >=1.0
deprecatedClaude LLM fallback is optional and usage requires an API key. As of v1.3.1 no known deprecation, but be aware of costs.
fix
Omit --llm-fallback unless you need it.
affects: >=1.0
Errors
Common errors & fixes
Error: Cannot find module '@anthropic-ai/sdk'
Missing optional dependency for LLM fallback when --llm-fallback is used.
fix
Install the module: npm install @anthropic-ai/sdk
Error: Connection refused to PostgreSQL at 127.0.0.1:5432
PostgreSQL is not running or connection string is incorrect.
fix
Ensure PostgreSQL is running and credentials are correct. Try: psql -U postgres -h 127.0.0.1
Error: Source adapter 'couchdb' not supported. Use 'mongodb', 'mongo', 'couchdb', or 'couch'.
Invalid source adapter argument.
fix
Use --source mongodb or --source couchdb.
Upgrade
Version history
1.3.1latest on npm
Audit
Dependencies
pgrequiredPostgreSQL driver for target database
mongodboptionalMongoDB driver for source adapter
nanooptionalCouchDB driver for source adapter
Agent activity
7 hits · last 30 days
node
6
Resources
migratoryai — npm install migratoryai · libregistry