@modulator/cli
v1.1.1
Published
A powerful CLI for managing modular monolith applications built with the Modulator framework.
Readme
@modulator/cli
A powerful CLI for managing modular monolith applications built with the Modulator framework.
Installation
Install globally (recommended):
npm install -g @modulator/cliOr use with npx (no install required):
npx @modulator/cli <command>Or add as a dev dependency in your project:
npm install --save-dev @modulator/cliUsage
Run CLI commands from your project root:
modulator <command>Or, if installed as a dev dependency:
npx modulator <command>Or via npm script (if your package.json has a script like "cli": "modulator"):
npm run cli -- <command>Available Commands
setup:upgrade
Discover enabled modules and run their migrations/setup tasks.module:list
List all modules and their status (ENABLED/DISABLED).module:enable <name>
Enable a module. Will check that all dependencies are enabled before proceeding.module:disable <name>
Disable a module. Will prevent disabling if any enabled module depends on it.module:info <name>
Show detailed info about a module (metadata, dependencies, etc).db:migrate
Merge all module schemas and run Prisma migration.
Project Structure
config/modules.json— Tracks enabled/disabled modules.modules/— Each module has its own folder andmodule.json.prisma/— Prisma schema and migrations (auto-initialized if missing).
Development
- Clone this repo and run CLI commands with
ts-nodefor local development. - To test changes to the core package, use
npm linkto link@modulator/corelocally. - Pull requests and contributions are welcome!
License
MIT
