Prerequisites & Installation
Modulus is a .NET global tool that scaffolds production-ready modular monolith solutions. This page covers everything you need to install and start using the CLI.
Prerequisites
.NET 10 SDK
The ModulusKit.Cli tool and every scaffolded solution require the .NET 10 SDK to run the CLI and build generated solutions. You need the SDK installed even if your own application targets an older LTS — the tool itself always runs on .NET 10.
Verify your installation:
dotnet --version
# 10.0.100 or laterLibrary packages also support .NET 8
The seven ModulusKit.* runtime library packages (Mediator, Mediator.Abstractions, Messaging, Messaging.Abstractions, Messaging.RabbitMq, Messaging.AzureServiceBus, Testing) multi-target net8.0;net10.0, so you can reference them from a .NET 8 LTS project. The CLI tool and its scaffolded solution templates remain .NET 10-only.
Docker (optional)
The generated solution includes integration tests powered by Testcontainers. If you plan to run integration tests locally, you need Docker Desktop or a compatible container runtime.
Not required for getting started
Docker is only needed for integration tests. You can scaffold solutions, build, and run unit tests without it.
Installation
Install the Modulus CLI as a .NET global tool:
dotnet tool install --global ModulusKit.CliVerify Installation
After installation, confirm the CLI is available:
modulus versionThis outputs the installed version of Modulus. If you receive a "command not found" error, ensure that the .NET global tools directory is on your PATH.
.NET global tools path
The default global tools directory is:
- Windows:
%USERPROFILE%\.dotnet\tools - macOS / Linux:
$HOME/.dotnet/tools
Add the appropriate path to your shell profile if it is not already present.
Update
To update to the latest version:
dotnet tool update --global ModulusKit.CliUninstall
To remove Modulus:
dotnet tool uninstall --global ModulusKit.CliNuGet Packages
Modulus ships as a CLI tool plus a set of companion library packages. The CLI automatically references the correct packages when scaffolding a solution, so you do not need to install them manually.
| Package | Description |
|---|---|
ModulusKit.Cli | CLI tool for scaffolding modular monolith solutions |
ModulusKit.Mediator | CQRS mediator with pipeline behaviors and Result pattern |
ModulusKit.Mediator.Abstractions | Mediator interfaces, Result types, and pipeline contracts |
ModulusKit.Messaging | Messaging core with in-memory transport, transactional outbox, and inbox |
ModulusKit.Messaging.RabbitMq | RabbitMQ transport for ModulusKit.Messaging |
ModulusKit.Messaging.AzureServiceBus | Azure Service Bus transport for ModulusKit.Messaging |
ModulusKit.Messaging.Abstractions | Messaging interfaces and integration event contracts |
ModulusKit.Generators | Roslyn source generators for handler registration and module discovery |
ModulusKit.Analyzers | Roslyn analyzers enforcing modular architecture (MOD001–MOD005) |
ModulusKit.Testing | Test harness, in-memory test transport, and outbox/inbox assertion helpers |
Abstractions packages
The Abstractions packages contain only interfaces and contracts with zero third-party dependencies. Reference them in your Domain and Application layers to keep those layers clean. The implementation packages (ModulusKit.Mediator and ModulusKit.Messaging) are referenced only in Infrastructure and host projects.
What's Next
Now that Modulus is installed, walk through the end-to-end tutorial to create your first modular monolith solution.