CodeCLI 1.1.4

dotnet tool install --global CodeCLI --version 1.1.4
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 CodeCLI --version 1.1.4
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CodeCLI&version=1.1.4
nuke :add-package CodeCLI --version 1.1.4

CodeCLI

Introduction

The Code CLI is a simple command-line interface tool that you use to initialize, develop, scaffold, and maintain dotnet C# applications directly from a command shell.

Installation

Using the .net core CLI from a terminal window:

dotnet tool install --global CodeCLI

Note: restart your IDE after installation.

Usage

Invoke the tool on the command line through the dotnet code executable.

Open dotnet solution in Visual Studio

dotnet code .

Help

dotnet code --help

Commands

  • code
    • generate (g)
    • install (i)
    • config (c)

Generate Command

Generates and/or modifies files based on a schematic.

dotnet code generate --help

or

dotnet code g -h

Generate Sub Commands

dotnet code genarate or dotnet code g

  • C#
    • Class (c)
    • Interface (i)
    • Record (r)
    • Enum (e)
    • Service (s)
  • ASP.NET
    • Controller (ct)
    • Minimal Api (ma)
    • Middleware (mw)
    • Endpoint (ep) // with carter
  • Vertical slice (repr)
    • command (c)
    • query (q)
  • MediatR (m)
    • command (c)
    • query (q)
    • command-handler (ch)
    • query-handler (qh)
    • Notification (n)
    • Notification Handler (nh)
  • Fluent Validation (fv)
    • Validator (v)

Install Sub Commands

dotnet code install or dotnet code i add packages to the ASP.NET Core Project

  • code install (i)
    • MediatR (m)
    • FluentValidation (fv)
    • Carter (c)

Config Sub Command

dotnet code config comamnd registers the dependency to the ASP.NET Project.

  • code config (c)
    • MediatR (m)
    • FluentValidation (fv)
    • Carter (c)

Examples

dotnet code g c test-class // generate a class with the name of TestClass
dotnet code g i test-name // generate an interface with the name of test-name
dotnet code g e enum_name // enum
dotnet code g fv v nameValidator // fluent validation validator

Note: You can use any naming convention for the name parameter

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
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
1.1.4 105 3/30/2024
1.1.3 85 3/28/2024
1.1.2 117 3/28/2024
1.1.1 94 3/28/2024
1.1.0 105 3/27/2024
1.0.0 120 3/20/2024

support .NET 6 and beyond.