CleanCli 1.0.2

dotnet tool install --global CleanCli --version 1.0.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local CleanCli --version 1.0.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CleanCli&version=1.0.2
                    
nuke :add-package CleanCli --version 1.0.2
                    

CleanCli

Scaffold a production-ready .NET 9 Clean Architecture API in seconds.

cleancli

Install

dotnet tool install -g CleanCli

Usage

cleancli new

Answer a few prompts and your project is ready.

Project name: MyApp
Database: MSSQL / PostgreSQL
Include JWT authentication? Y/N
Include Docker support? Y/N
Output directory: ./MyApp
 
┌─────────────────────────────────┐
│ Setting        │ Value          │
│ Project Name   │ MyApp          │
│ Database       │ MSSQL          │
│ JWT Auth       │ Yes            │
│ Docker         │ Yes            │
│ Output         │ ./MyApp        │
└─────────────────────────────────┘
 
Generate project? Y
 
✓ Project generated successfully!
 
  cd ./MyApp
  dotnet restore
  dotnet run --project src/MyApp.Api

What Gets Generated

MyApp/
├── src/
│   ├── MyApp.Api               # Controllers, Program.cs, middleware
│   ├── MyApp.Application       # MediatR handlers, FluentValidation, DI
│   ├── MyApp.Domain            # Result<T>, Error, ErrorType
│   ├── MyApp.Infrastructure    # Dapper, DbConnectionFactory, DI
│   └── MyApp.Contracts         # Request/response DTOs
├── tests/
├── Dockerfile                  # (if Docker selected)
├── docker-compose.yml          # (if Docker selected)
└── MyApp.sln

Stack

Layer Tech
API ASP.NET Core 9, Serilog, Swagger
Application MediatR, FluentValidation
Infrastructure Dapper, MSSQL or PostgreSQL
Auth JWT Bearer (optional)
Containers Docker + docker-compose (optional)

Patterns Included

  • Result/Error patternResult<T>, Error, ErrorType out of the box, no exceptions for control flow
  • MediatR pipeline — ValidationBehavior wired up automatically
  • Global exception middleware — unhandled exceptions caught and returned as clean JSON
  • CorrelationId middlewareX-Correlation-ID header auto-generated or forwarded on every request
  • DI wired per layer — each layer has its own DependencyInjection.cs extension method

Requirements

Uninstall

dotnet tool uninstall -g CleanCli

License

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.2 128 3/26/2026
1.0.1 107 3/26/2026
1.0.0 107 3/26/2026