The CLI needs a way to render a Screenplay solution, as a root command — cratis render — sitting alongside cratis run, in the same spirit as docker run / dotnet run / aspire run.
For now it only needs to support Cratis, pulling the rendering packages from Stage. When other targets arrive, that becomes an argument.
Shape
cratis render [PATH] where PATH is a .play file or a folder — mirroring screenplay validate, which already resolves either. Note cratis run currently takes a folder only; worth aligning the three while adding this.
It should be a sibling of run, not a mode of it: run hands a folder to a container and watches, render materializes in-process from SDK packages. They share only play-file discovery and target resolution.
Packages
Cratis.Stage and Cratis.Stage.Contracts are published, and IRenderer lives in Contracts. Cratis.Stage.Rendering.Cratis carries the Cratis implementation, with CratisRenderer.CreateDefault() as the entry point.
Two things to settle first
Version blocker. Taking Cratis.Stage.Contracts forces Cratis.Screenplay 1.8.0, which the CLI cannot currently take: the published Cratis.Arc.Screenplay is compiled against Cratis.Screenplay 1.5.2, and 1.7.0 added a parameter to the ApplicationSyntax primary constructor — source-compatible, binary-breaking. Generation dies at runtime with a missing-method error. An Arc release built against 1.8.0 unblocks this.
Hosting or materializing. Cratis.Stage needs a reachable Chronicle and MongoDB to materialize a model into. If render means "produce the code", the honest first cut needs neither — it is .play → renderer → files on disk. If it means "host it", it inherits the runtime dependency, and the sandbox run already uses is the obvious fallback.
The CLI needs a way to render a Screenplay solution, as a root command —
cratis render— sitting alongsidecratis run, in the same spirit asdocker run/dotnet run/aspire run.For now it only needs to support Cratis, pulling the rendering packages from Stage. When other targets arrive, that becomes an argument.
Shape
cratis render [PATH]where PATH is a.playfile or a folder — mirroringscreenplay validate, which already resolves either. Notecratis runcurrently takes a folder only; worth aligning the three while adding this.It should be a sibling of
run, not a mode of it:runhands a folder to a container and watches,rendermaterializes in-process from SDK packages. They share only play-file discovery and target resolution.Packages
Cratis.StageandCratis.Stage.Contractsare published, andIRendererlives in Contracts.Cratis.Stage.Rendering.Cratiscarries the Cratis implementation, withCratisRenderer.CreateDefault()as the entry point.Two things to settle first
Version blocker. Taking
Cratis.Stage.ContractsforcesCratis.Screenplay1.8.0, which the CLI cannot currently take: the publishedCratis.Arc.Screenplayis compiled againstCratis.Screenplay1.5.2, and 1.7.0 added a parameter to theApplicationSyntaxprimary constructor — source-compatible, binary-breaking. Generation dies at runtime with a missing-method error. An Arc release built against 1.8.0 unblocks this.Hosting or materializing.
Cratis.Stageneeds a reachable Chronicle and MongoDB to materialize a model into. Ifrendermeans "produce the code", the honest first cut needs neither — it is.play→ renderer → files on disk. If it means "host it", it inherits the runtime dependency, and the sandboxrunalready uses is the obvious fallback.