MTC is a powerful, architecture-aware CLI tool for scaffolding .NET projects. It supports Clean Architecture, MVC Monolith, and Vertical Slice patterns, allowing you to generate projects, features, value objects, and DTOs with ease.
- Project Scaffolding: Create new projects using pre-defined templates (
ConsoleApp,MvcMonolith,CleanArch,VerticalSlice). - Architecture Awareness: Automatically detects the project structure (MVC, Clean Arch, Vertical Slice) and places generated files in the correct layers/folders.
- Feature Generation: Generate full feature slices (Controller, Command/Query, Models) with a single command.
- Productivity Tools: Quickly add Value Objects and DTOs.
- User Configuration: Persist global preferences (e.g., Author name).
- Cross-Platform: Runs on Windows, Linux, and macOS.
yay -S mtc-bindotnet tool install -g MTCDownload the latest .deb release and run:
sudo dpkg -i mtc_1.0.0_amd64.debDownload the binary for your OS from Releases.
Windows:
- Download
mtc-win-x64-1.0.0.tar.gz. - Extract the contents (Windows 10/11 supports tar.gz natively, or use 7-Zip).
- Add the extracted folder to your System PATH.
Linux/macOS:
- Download the
.tar.gzfor your OS. - Extract and move the binary to
/usr/local/binor add to PATH.
mtc list# Console Application
mtc new ConsoleApp MyApp
# MVC Monolith
mtc new MvcMonolith MyWebApp
# Clean Architecture
mtc new CleanArch MyCleanApp
# Vertical Slice Architecture
mtc new VerticalSlice MyApiAppMTC automatically detects your project architecture and generates the appropriate files.
# Generates Controller, Commands/Queries, and Models based on your architecture
mtc add feature Product --fields "Name:string Price:decimal Stock:int"mtc add value-object Money --fields "Amount:decimal Currency:string"
mtc add value-object Email --fields "Value:string"mtc add dto UserDto --fields "Username:string Email:string Age:int"
mtc add dto ProductDto --fields "Id:guid Name:string Price:decimal"# Set a configuration value
mtc config set Author "Your Name"
mtc config set Company "Your Company"
# Get a configuration value
mtc config get Author
# List all configuration
mtc config list# Show detected project context (architecture, root path, etc.)
mtc debug-contextWhen using --fields, you can use these types:
string,int,decimal,bool,datetime,guid- Example:
"Name:string Price:decimal IsActive:bool CreatedAt:datetime"
dotnet builddotnet test./publish.sh./publish_aur.sh./publish_deb.shMIT