The Chronicle Console template
The cratis-chronicle-console template is the smallest complete Chronicle application: a console project that connects to a running Chronicle, appends an event, and shows the event flowing through a projection and a reactor.
dotnet new cratis-chronicle-console -n MyConsoleThese templates scaffold a Chronicle client — pass --Database (MongoDB by default, or PostgreSQL, MsSql, SQLite) to choose which database the Chronicle kernel in docker-compose.yml persists to.
What you get
Section titled “What you get”A single Program.cs with the whole story:
- A
ChronicleClientconnected to the local development kernel (chronicle://localhost:35000, development credentials). - A
[EventType]record — the fact your application produces. - A model-bound
[FromEvent]projection — a read model kept in sync by Chronicle. - An
IReactor— a callback that fires the moment the event is observed.
Start the infrastructure, run the app, and watch the reactor print:
docker-compose up -ddotnet runWhat it is for
Section titled “What it is for”This template is the fastest way to check that your machine, your container, and your client packages agree — and the cleanest place to experiment with events, projections, and reactors without an HTTP layer in the way. When you are ready for commands, queries, and a frontend, move to the Cratis Web Application template.
AI assistance
Section titled “AI assistance”The scaffolded project includes a .cratis/ai.json with the Cratis AI profiles, languages, and coding agent harnesses for this template — the Chronicle-on-.NET selection. Make sure the Cratis CLI is installed, then run:
cratis ai updateThat installs the AI rules, skills, and harness integration for the coding agents you selected — AGENTS.md instructions plus .claude/, .cursor/, .github/, .opencode/, and .pi/ integration — and records what it installed in .cratis/ai.manifest.json. dotnet new prints this reminder after scaffolding, and re-running the command only refreshes Cratis-managed files, never yours. See the CLI AI documentation for the full command reference.