Skip to content

Add 'cratis render' as a root command for rendering a Screenplay solution #62

Description

@woksin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions