dct 0.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global dct --version 0.0.2
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local dct --version 0.0.2
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dct&version=0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package dct --version 0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
dct (Dotnet CLI Tool)
A .NET global CLI tool to rapidly generate CQRS and Clean Architecture components such as commands, queries, handlers, classes, and interfaces. Streamline your development workflow and enforce best practices with customizable templates and configuration.
Features
- Generate CQRS artifacts: commands, queries, handlers
- Create classes and interfaces with a single command
- Initialize default config and templates
- Supports custom templates and configuration
- Fast, scriptable, and easy to use
Installation
After publishing to NuGet, install globally with:
dotnet tool install -g dct
Usage
Initialize configuration and templates
dct init
Generate an artifact (command, query, handler, class, interface)
dct create <artifact> <path>
<artifact>: Type of artifact to generate (e.g.,command,query,handler,class,interface)<path>: Target path or name for the generated file(s)
Examples
| Command | Description |
|---|---|
dct init |
Initialize config and templates |
dct create command User/CreateUser |
Generate a command in User/CreateUser |
dct create handler User/CreateUserHandler |
Generate a handler |
dct create query User/GetUser |
Generate a query |
dct create class Models/User |
Generate a class |
dct create interface Services/IUserService |
Generate an interface |
Customization
Configuration
Customize generation using .dctconfig.json in your project root. Example:
{
"namespace": "MyApp.Features",
"author": "YourName"
}
Templates
You can override default templates by placing your own in the Templates/ directory. Supported templates:
command.scribanhandler.scribanquery.scriban
Edit these files to match your coding standards and patterns.
Development
Dependencies
License
MIT License
© 2024 MyName. See LICENSE for details.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.