CleanForge.Scaffold
1.0.3
dotnet tool install --global CleanForge.Scaffold --version 1.0.3
dotnet new tool-manifest
dotnet tool install --local CleanForge.Scaffold --version 1.0.3
#tool dotnet:?package=CleanForge.Scaffold&version=1.0.3
nuke :add-package CleanForge.Scaffold --version 1.0.3
CF CLI
A fast and developer-friendly command-line tool for scaffolding Clean Architecture projects in .NET.
CF CLI helps you generate a production-ready folder structure, boilerplate code, configuration layers, and best practices โ all with a single command.
๐ Features
- โก Instant scaffolding of .NET Clean Architecture projects
- ๐งฑ Pre-defined domain, application, infrastructure, and API layers
- ๐ฏ Best-practice templates based on real-world architecture
- ๐ฆ Automatic file and folder generation
- ๐ง Extensible โ add your own templates or customize existing ones
- ๐ ๏ธ Simple CLI commands, easy to remember and use
- ๐งน Opinionated but flexible project structure
๐ฅ Installation
Install CleanForge as a global .NET tool:
dotnet tool install -g CleanForge.Scaffold
To update to the latest version:
dotnet tool update -g CleanForge.Scaffold
๐ป Usage
Scaffold a new Clean Architecture project:
cleanforge --name MyProject --output ./MyProject
| Option | Description | Default |
|---|---|---|
--name |
Name of the project to generate | CleanForgeProject |
--output |
Output directory for the project | Current directory |
Then get started with your new project:
cd MyProject
dotnet restore
dotnet run --project MyProject.API
๐๏ธ Project Structure Generated
When you run the CF CLI to scaffold a new project, it generates the following folder structure:
MyCleanArchitectureProject/
โโโ MyCleanArchitectureProject.Domain/
โโโ MyCleanArchitectureProject.Application/
โโโ MyCleanArchitectureProject.Infrastructure/
โโโ MyCleanArchitectureProject.API/
โโโ MyCleanArchitectureProject.sln
Domain: Contains the core business logic and entities.Application: Contains use cases, services, and application logic.Infrastructure: Contains data access, external services, and implementations.API: Contains the web API layer and controllers.
๐ Core Configurations Included
The generated project includes essential configurations for a Clean Architecture setup:
- Dependency Injection setup for managing service lifetimes and dependencies.
- Logging configuration for tracking application behavior.
- Error Handling middleware for consistent error responses.
- MediatR integration for handling commands and queries.
- AutoMapper setup for object-to-object mapping.
- Fluent Validation structure for validating requests.
- Clean folder boundaries to enforce separation of concerns.
- Plug-and-play architecture for easy extension and modification.
- Docker Support with Dockerfiles for containerizing the application.
๐งฑ Why CF CLI?
CF CLI was created to solve a common problem:
Developers often waste hours or days setting up Clean Architecture manually.
CF CLI solves that problem by offering:
- โก Extremely fast scaffolding
- ๐ฏ Consistent structure across teams
- ๐งฉ Plug-and-play architecture
- ๐งช Test-ready layout
- ๐ Pattern discipline (CQRS, DI, SOLID, DDD-friendly)
- ๐ No repetitive setup work
Perfect for:
- ๐ค Solo developers
- ๐ฅ Teams adopting Clean Architecture
- ๐ข Bootstrapping enterprise applications
- ๐ Training new developers or onboarding juniors
๐ค Contributing
Contributions are welcome!
If you'd like to contribute:
- Fork the repo
- Create a feature branch
- Make your changes
- Submit a pull request
- Make sure your PR includes:
- Clear description
- Relevant screenshots if needed
โญ Support This Project
If CF CLI saves you setup time or helps your team stay consistent, please consider:
- Starring โญ the repo
- Sharing it with other .NET developers
- Opening issues & PRs
Your support motivates future improvements!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
This package has no dependencies.