dotnet-forge
v0.1.0
Published
CLI to scaffold .NET projects
Downloads
13
Maintainers
Readme
dotnet-forge
CLI to scaffold and standardize .NET projects. It creates a solution with a Clean Architecture structure and can optionally add tests, Docker files, and DocFx tooling.
Features
forge newandforge doctorcommands- Clean Architecture project layout (Domain/Application/Infrastructure/API)
- Optional Docker scaffolding via
--docker - Optional test project via
--test - Optional DocFx tooling via
--documentation
Requirements
- .NET SDK 8+
- Node.js 18+ (for running the CLI)
- Git (recommended)
- Docker Desktop (optional, for
--docker)
Install
From npm:
npm install -g dotnet-forgeFrom the repo:
npm install
npm linkThen use forge from anywhere.
Usage
forge doctorforge new MyAppforge new MyApp --testforge new MyApp --test nunit --docker --documentationCommands
forge new <name>
- Creates a solution in a new folder named
<name> - Uses the Clean Architecture template by default
- Optional
-t, --test [framework]to add tests (xunit,nunit,mstest; default isxunitwhen omitted) - Optional
-d, --dockerto generateDockerfileanddocker-compose.yml - Optional
-docs, --documentationto add DocFx tooling
forge doctor
- Checks for .NET SDK, Git, and Docker
Project Structure
forge new creates:
src/<Name>.Domainsrc/<Name>.Applicationsrc/<Name>.Infrastructuresrc/<Name>.Api
It also adds solution references and basic folders for each layer.
Development
npm test
npm run lint
npm run formatLicense
MIT
