A CLI tool that automatically generates Sequelize model files for Egg.js from a MySQL database. Version 1.1.0, low release cadence (last update 2020). Key differentiator: generates TypeScript models with type definitions, specifically for Egg.js framework. Alternative to sequelize-auto with Egg.js integration and opinionated output structure. Produces both model and definition files under app/model/ and app/model/define/. Supports table selection, overwrite, and configurable output directory.
npm install egg-mysql-sequelize-autoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows installation, configuration via npm script, and CLI execution to generate Egg.js Sequelize models from a MySQL database.
Always pass -t tablename or use -- --t=tablename after the script.
Use MySQL 8+ or ensure mysql2 compatibility.
Always specify absolute path or ensure CWD is project root.
Install and configure egg-sequelize in config/plugin.js: exports.sequelize = { enable: true, package: 'egg-sequelize' }Run: npm install mysql2 --save
Add 'egg-sequelize' to package.json and enable in config/plugin.js
Add -t tableName to command or use -- --t=tableName