SmartAdmin.CLI 0.1.0

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

SmartAdmin Generator

SmartAdmin Generator is a .NET 8 command-line tool for scaffolding a clean-architecture admin API solution and generating CRUD module code from a SQL Server schema.

The current release target is an open-source MVP focused on reliable scaffolding, repeatable generation, clear templates, and safe regeneration behavior.

Install

Install from NuGet after the package is published:

dotnet tool install --global SmartAdmin.CLI
smartadmin --help

Install from a local package while developing:

dotnet pack src/SmartAdmin.CLI -c Release -o ./nupkg
dotnet tool install --global --add-source ./nupkg SmartAdmin.CLI
smartadmin --help

If an older local build is installed:

dotnet tool update --global --add-source ./nupkg SmartAdmin.CLI

Quick Start

mkdir MyAdmin
cd MyAdmin
smartadmin new . --name MyAdmin

Configure SQL Server and JWT settings in src/MyAdmin.API/appsettings.json, then create the database:

dotnet tool install --global dotnet-ef
dotnet ef migrations add InitialCreate --project src/MyAdmin.Infrastructure --startup-project src/MyAdmin.API
dotnet ef database update --project src/MyAdmin.Infrastructure --startup-project src/MyAdmin.API

Generate modules from your database:

smartadmin generate
dotnet run --project src/MyAdmin.API

Commands

Create a solution:

smartadmin new ./MyAdmin --name MyAdmin
smartadmin new . --name MyAdmin --architecture clean-architecture
smartadmin new --list-architectures

Generate modules:

smartadmin generate
smartadmin generate --tables dbo.Products,dbo.Orders
smartadmin generate --exclude dbo.AuditLogs --mode Incremental
smartadmin generate --templates ./templates --config ./smartadmin.json
smartadmin generate --mode Preview

Existing files are skipped by default. Use --mode Incremental to update files that still match the SmartAdmin manifest while preserving manually modified files. Use --force only when overwriting generated output is intentional.

Project Layout

smartadmin new creates:

  • src/<Name>.Domain
  • src/<Name>.Application
  • src/<Name>.Infrastructure
  • src/<Name>.API
  • src/<Name>.Shared
  • smartadmin.json
  • <Name>.sln

The scaffold uses the embedded clean-architecture template and records its templateVersion in smartadmin.json.

Templates

Default generation templates are embedded in SmartAdmin.Generator. A sample override set is available in examples/template-overrides.

smartadmin generate --templates /path/to/SmartAdmin/examples/template-overrides --mode Preview

When --templates is provided, files in that folder override matching embedded templates and all other templates fall back to the defaults.

Development

dotnet restore SmartAdmin.sln
dotnet build SmartAdmin.sln
dotnet run --project tests/SmartAdmin.Generator.Tests

Package as a local global tool:

dotnet pack src/SmartAdmin.CLI -c Release -o ./nupkg
dotnet tool install --global --add-source ./nupkg SmartAdmin.CLI

NuGet Metadata

The public packages use:

  • Repository URL: https://github.com/smartadmin/SmartAdmin
  • Repository type: git
  • Project URL: https://github.com/smartadmin/SmartAdmin
  • License: MIT
  • Version: 0.1.0

Documentation

Community

Known MVP Limits

  • SQL Server is the only production-ready database provider.
  • Generated code targets .NET 8.
  • The test harness is a console validation project rather than an xUnit/NUnit suite.
  • Connection strings are entered interactively for generation.
  • Template override validation is file-based and intentionally lightweight.

License

SmartAdmin is licensed under the MIT License.

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.1.0 123 6/14/2026

Initial open-source MVP release candidate with clean-architecture scaffolding, SQL Server schema-based CRUD generation, template overrides, safer regeneration behavior, and improved CLI help.