Skip to content

Cratis Templates

The Cratis Stack

Start your Cratis app with the conventions already in place

Every Cratis application follows the same conventions: vertical slices, model-bound commands and queries, events as facts, read models projected from the log. The Cratis templates give you a working application with those conventions already in place — a real project you can run in minutes, not a blank folder you fill in from documentation.

Install the .NET templates once:

Terminal window
dotnet new install Cratis.Templates

The Kotlin and Java templates ship as separate packages — Cratis.Templates.Kotlin and Cratis.Templates.Java — so they do not show up in dotnet new unless you want them; the Cratis CLI installs and invokes them directly when you create a JVM project.

  • Vertical slices — everything for a behavior lives in one folder: the C# command or query, the events it produces, the React component that calls it, and the generated TypeScript proxy.
  • Model-bound by default — commands and queries are plain records the framework maps to HTTP routes; no controllers to write.
  • Infrastructure included — a docker-compose.yml that starts a local Chronicle development container (with its bundled MongoDB) and an Aspire dashboard for telemetry.
  • AI-ready — every template ships a .cratis/ai.json with the Cratis AI profiles, languages, and coding agent harnesses for that template. Install the Cratis CLI and run cratis ai update to get the AI rules, skills, and harness integration in place — dotnet new prints this reminder after scaffolding.
  • Builds clean — the sample code compiles with zero warnings under the Cratis analyzers, so the first warning you see is your own.