SuperAPI AI Directory

cleanddd-dotnet-init

General & other

View repository

Updated 10-16 01:35

About this skill

cleanddd dotnet init

Use dotnet new netcorepal-web to quickly create a CleanDDD dotnet project. The script only serves as an optional wrapper; agents/non-interactive scenarios can directly call dotnet.

When to use

  • Create a CleanDDD solution from scratch, or need to quickly generate a runnable boilerplate in a new directory.
  • When an existing old template needs to be upgraded, you can regenerate in a new directory and then migrate the code.

Prerequisite inputs

  • Framework (default net10.0): optional net8.0 / net9.0 / net10.0
  • Database (default MySql): optional MySql / SqlServer / PostgreSQL / Sqlite / GaussDB / DMDB / MongoDB
  • MessageQueue (default RabbitMQ): optional RabbitMQ / Kafka / AzureServiceBus / AmazonSQS / NATS / RedisStreams / Pulsar
  • UseAspire (default true): true / false
  • IncludeCopilotInstructions (default false): true / false
  • ProjectName (default current directory name, automatically converted to PascalCase,- replaced with .)
  • OutputDir (default current directory path)

Before executing the command: show the parameter summary and optional items, and continue only after obtaining user confirmation.

How to run (dotnet)

  1. Install the template (if not installed/needs updating)
dotnet new install NetCorePal.Template
  1. Create the project (example parameters, replace as needed)
dotnet new netcorepal-web \
  --Framework net10.0 \
  --Database MySql \
  --MessageQueue RabbitMQ \
  --UseAspire true \
  --name My.Project \
  --IncludeCopilotInstructions false \
  --output /path/to/target

Before executing dotnet new , first show the user the summary of the above parameters while providing optional parameters and obtain explicit confirmation, then execute the command after confirmation.

Optional script (interactive)

If parameter validation/interactive collection is needed, a wrapper script is available:

python3 scripts/interactive_init.py [同上参数,可省略进入交互]
  • When parameters are omitted, it enters interactive mode, and a command preview is shown before running.
  • By default automatically installs/updates NetCorePal.Template, if already installed you can add --skip-template-install。
  • Whether called by script or agent, the parameter summary should be shown before execution and the user should be asked for confirmation.

Parameter confirmation prompt (example)

  • "Preparing to execute the cleanddd template: Framework=net10.0, Database=MySql, MessageQueue=RabbitMQ, UseAspire=true, IncludeCopilotInstructions=false, ProjectName=My.Project, OutputDir=/path. Continue?"