This repository contains all creation templates used by Cratis. It holds project and item templates you can use to scaffold new Cratis-based applications, components, and sample projects.
Quick steps to scaffold projects from these templates:
- Install the templates locally (one-time):
dotnet new install Cratis.Templates- List available templates and note the
Short Nameyou want:
dotnet new --list- Create a new project from a template (replace
<shortname>):
dotnet new <shortname> -n MyApp -o MyApp- Many templates accept parameters; run
dotnet new <shortname> --helpto see available options.
Prerequisites:
- .NET SDK (recommended 8.0+)
- Node.js and npm (if testing frontend/Vite templates)
dotnet pack Cratis.Templates.csproj -c Release -o ./nupkgs
dotnet new -i ./nupkgsIf you prefer to install directly from the template folder (unpacked):
dotnet new -i ./Cratis.Templatesdotnet new --listdotnet new <shortname> -n MyTestApp
cd MyTestApp
dotnet restore
dotnet build
dotnet runcd path/to/generated/frontend
npm install
npm run devdotnet new -u <package-id-or-folder>Iterate on the template sources, repack, and reinstall to test changes quickly.