Skip to content

modulus doctor

Validates the health of a Modulus-scaffolded solution without building it.

bash
modulus doctor [--solution <path>] [--json] [--strict]

What it checks

CheckSeverityWhat it looks for
Solution shapeFailA .slnx exists (auto-discovered or via --solution) with the expected src/ layout
Package versionsWarnAll ModulusKit.* entries in Directory.Packages.props share one version
Module artifactsWarnEach module under src/Modules/<Name>/ has its Domain/Application/Infrastructure/Integration projects
Messaging configWarnIf ModulusKit.Messaging is referenced: the Messaging section exists, Transport is valid, and broker transports have connection settings
Project referencesFailEvery <ProjectReference> target exists on disk
Migration guidanceWarnAddModulusOutbox/AddModulusInbox calls are paired with UseModulusMessagingMigrationsAsync()

Options

OptionDescription
--solution, -sPath to the solution file (default: auto-discover)
--jsonEmit a single JSON document instead of human-readable output
--strictWarnings affect the exit code

Exit codes

CodeMeaning
0All checks pass (warnings allowed without --strict)
1At least one check failed
2Warnings present and --strict was passed

Examples

bash
# Human-readable report
modulus doctor

# Machine-readable, warnings fail the build — useful as a CI gate
modulus doctor --json --strict

Released under the MIT License.