dct 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global dct --version 0.0.1
                    
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 dct --version 0.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dct&version=0.0.1
                    
nuke :add-package dct --version 0.0.1
                    

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.scriban
  • handler.scriban
  • query.scriban

Edit these files to match your coding standards and patterns.

Development

Dependencies

License

MIT License


© 2024 MyName. See LICENSE for details.

Product 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.

Version Downloads Last Updated
0.0.7 578 7/22/2025
0.0.6 533 7/21/2025
0.0.5 166 7/18/2025
0.0.4 164 7/18/2025
0.0.3 179 7/17/2025
0.0.2 180 7/17/2025
0.0.1 176 7/17/2025