Sequelize-Auto (v0.8.7) automatically generates bare Sequelize models from an existing database. Supports MySQL, MariaDB, PostgreSQL, SQLite, and MSSQL with their respective dialect packages. It runs via CLI, reads database schemas, and outputs model files (JavaScript or TypeScript with bundled types). Last release stable but low activity; no longer installs sequelize as a dependency, requiring users to manually add both sequelize and dialect packages. Key features: customizable case conventions for models, properties, and filenames; support for excluding/including specific tables; additional model options via JSON config files.
npm install cbt-sequelize-autoVerified import paths — ran on the pinned version, not inferred.
Generates Sequelize models for the 'users' table from a MySQL database into ./models folder.
npm install sequelize mysql2 (or your dialect) before running sequelize-auto.
Use -t "table1 table2" instead of -t table1 -t table2.
Ensure the path is correct: --additional ./config/options.json
Update models manually or use a newer version of sequelize-auto that targets Sequelize v6.
npm install sequelize
npm install mysql2 (or your dialect: pg, sqlite3, tedious)
Verify your database host address and ensure it's accessible.
Check that the JSON file exists and is correctly formatted.