A powerful CLI for managing modular monolith applications built with the Modulator framework.
npm install @modulator/clish
npm install -g @modulator/cli
`
Or use with npx (no install required):
`sh
npx @modulator/cli
`
Or add as a dev dependency in your project:
`sh
npm install --save-dev @modulator/cli
`
Usage
Run CLI commands from your project root:
`sh
modulator
`
Or, if installed as a dev dependency:
`sh
npx modulator
`
Or via npm script (if your package.json has a script like "cli": "modulator"):
`sh
npm run cli --
`
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
Enable a module. Will check that all dependencies are enabled before proceeding.
- module:disable
Disable a module. Will prevent disabling if any enabled module depends on it.
- module:info
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 and module.json.
- prisma/ — Prisma schema and migrations (auto-initialized if missing).
Development
- Clone this repo and run CLI commands with ts-node for local development.
- To test changes to the core package, use npm link to link @modulator/core` locally.